Run cron using URL on frontend

You would have already come across Setting a cron using command line document to run import and export with cron using command line in CSVI. Here we would explain on how to run a import or export using URL on frontend.

So the first step is to create a template and do the needed settings. This document explains on how to run VirtueMart Product Import using frontend. The same procedure can be followed for any import and export in CSVI.

Creating the template

A template can be created by following these steps:

  1. Go to Components -> CSVI Pro -> Templates
  2. Click New
  3. Give the template a name, say for example VirtueMart Product import
  4. Set Action to Import
  5. Set Component to VirtueMart
  6. Set Operation to Product
  7. Click Next: Select Source
  8. Source is set default to Load from your computer. Change it Load from server or Load from FTP server and set a server location from where the import file has to be read.
    load from server settings
  9. Click Next: Select options
  10. The default values are OK, change if needed.
  11. Click Next: Select fields
  12. Nothing needed here as we set to Use column headers as configuration in step 10.
  13. Click Next: Finalize
  14. All done here
  15. Click Close to return to the list of templates or Edit if you want to fine-tune the template further.

VirtueMart Products import create template

Adding the template fields

Template fields can be added by following these steps:

  1. Go to Components -> CSVI Pro -> Templates
  2. Click on Template fields
  3. In the Search Tools select your template
  4. Click on New to add a single field or click on Quick Add to add multiple fields.

Quick Add

The Quick Add Option allows you to quickly add multiple fields to a template. It is not possible to set any settings per field here but that can be done after the fields have been added to the template.

VirtueMart product import create template fields

Setting up the template

Now in the import template change Enable Frontend/cron field to Yes and Set a secret key for the template.

csvi7 frontend cron settings

Creating menu item

To create menu item follow the steps

  1. Go to Joomla Menu >> Menu Items
  2. Click New
  3. Give a Menu title, say for example VirtueMart Product Import
  4. Select Menu item type >> Click on CSVI Pro >> Select Import front-end
    Frontend menu item
  5. Select the import template we just created
  6. Set the secret key as set in the template
  7. Save the menu item


Select template menu item

Run import on Front-end

Now that CSVI template and Joomla menu has been set. The menu link will be available on frontend. Click on the link so to run the import.

Frontend main menu

Frontend import finished

More articles on this subject