RO CSVI

Setting up a front-end export template

| RO CSVI

A front-end template allows you to run an export from the menu or via a link.

Export via a menu item

To make a template show up in your menu, you can create a regular menu item and users can use this link to execute a template. First you will need to create an export template in CSVI, otherwise the menu won't know there is a template. How to create a template is explained in the Create a template tutorial.

The template settings need to look like this to be able to use it for a menu item:

CSVI edit menu template

These conditions apply to use a template for front-end export:

  • The template must be enabled
  • Enable front-end/cron must be enabled
  • A secret key must be set
  1. Go to Menus -> Manage
  2. Click on New to create a new menu item
  3. Enter a Menu Title
  4. Select the Menu Item Type Export front-end by clicking on the Select button
    CSVI Menu item type
  5. Select the template you want to use for the menu item
    CSVI Menu Select template
  6. Enter the secret key. This is required to prevent templates to be executed without authorization.
    CSVI Menu Secret key
  7. Set any other settings you would like to apply, for example a specific usergroup that is only allowed to use the menu item. When all done, the settings will look like this:
    csvi menu item template
  8. Save the menu item

 The menu item will now show up on the front-end if the user has the correct permissions.

 Export via a link

It is also possible to run an export via a link, this way the export doesn't have to be visible in the menu. The link can actually be seen in the menu item above as this will be the same link.

The link looks like this:
http://www.example.com/index.php?option=com_csvi&view=export&csvi_template_id=121&exportto=template&task=export&tmpl=component&key=abcd

The link has 3 important parts:

  • csvi_template_id
    This is the ID of the template you want to use. This number can be found when you edit the template
  • exportto
    This sets the location where the exported file should be sent to. By default this is template, meaning the settings in the template will be used. Other options are:
    • tofront
      Show the export result in the browser
    • todownload
      Download the export file
  • key
    This needs to be the same as the secret key set in the template

Styling the output

In case you have chosen to export the type HTML on the Options page, CSV Improved will render an HTML table. This table has no styling at all, however you can add your own CSS file and style the page as you wish.

Create a CSS file called exporttable.css and place it in the folder media/com_csvi/css and this file will be loaded when the table is rendered.

Override template settings

It is possible to override options you have in your template to make the export more flexible. Each option must begin with form_ and then followed by the name of the option. For example to set a specific order number in the HikaShop export, the URL will look like this:
http://www.example.com/index.php?option=com_csvi&view=export&csvi_template_id=121&exportto=template&task=export&tmpl=component&key=abcd&form_orderlist=15

This will export only order ID 15.

Read more ...

Import Source tab option to Load from database

| RO CSVI

Starting with RO CSVI 7.14.0 version, there is a new option added to Load from database if to use Local(Joomla) connection or Remote connection.

Read more ...

Source tab option to Load from FTP

| RO CSVI

Set the FTP details from where the file is read from.

  • FTP Host field for setting hostname.
  • FTP Port field for setting port number. For SFTP default is 22.
  • If it is SFTP connection set SFTP field to Yes.
  • FTP Username field for username
  • FTP Password field for password
  • FTP Root Folder to set the root folder path. Example /var/www/htdocs/example.com
  • FTP filename field to set the import filename. Example example_csvi_import.csv

Load from FTP

Test the FTP details button will tell us if the given FTP details are valid or not. When the details are not valid a message is shown as

FTP not valid

 

If the entered FTP details are valid then a message is shown as

Load from FTP valid 

 

Read more ...

Open a CSV file with Excel

| RO CSVI

Opening a CSV file with Excel correctly is somewhat of a hassle, here is a step by step instruction on how to do it correctly.

1. Open a new workbook

 

2. Choose From Text

 

3. Select the file to open and click Import

 

4. Start the Text Import Wizard and make sure the settings are the same as the screenshot and click Next

 

5. Set the delimiters to match the ones in your file and click Next

 

6. Check if your columns are OK and click Finish.

For columns not showing up correctly, set the column data format to Text. This is useful for SKUs that start with 0, this way the preceding 0 is not lost.

 

7. Click OK to insert the file into the workbook.

 

8. Now you are done and you can update your data.

Read more ...

Source tab option to Load from URL

| RO CSVI

Option to load the import file from a link. Include the link in Load from URL field.

Load from URL

Test URL button can be used to check if the given link is valid or not. If a link is not valid, a message shows as

URL not valid

If a link is valid, a message is shown as

URL is valid

Read more ...