This document explains how to export an order immediately after an order has been created in HikaShop.
Required fields
The following is needed to export an order after it has been created in HikaShop:
- A HikaShop order export template must exist in RO CSVI
- The HikaShop RO CSVI Export plugin must be installed, active and the HikaShop order export template selected
- A Mass Action trigger for "After an order is created" needs to be created
HikaShop order export template
The first step is to create a HikaShop order export template in CSVI. Follow these steps:
- Go to Components -> RO CSVI
- Click on Templates -> Templates
- Click on New to create the new template
- Give the template a name
- Set the Enabled field to Yes
- Set the Enable front-end/cron field to Yes
- Set a Secret key, this is needed to run all automated import/export
- Set the Operations to:
- Fill in the rest of the template settings per your needs
- Save the template settings
- Go to Templates -> Fields
- Add the needed fields to your order export template
The destination of an export can be set to multiple locations:
- Download
- Save on server
- Save on FTP server
It will be good to know that the Download option cannot be used here because of the way the system works. It will not be much use either as you don't want the customer to get an export of the order.
HikaShop CSVI Export plugin
This plugin is needed because this picks up the trigger by HikaShop and calls RO CSVI to run the export. The plugin can be downloaded from the Download -> CSVI Extensions page.
After the plugin is downloaded it needs to be installed and configured following these steps:
- Go to Extensions -> Manage
- Install the HikaShop CSVI export plugin
- Once the installation is finished, go to Extensions -> Plugins
- Filter the list on csvi export
- Click on the HikaShop CSVI Export name to edit the plugin
- Select the HikaShop order template created earlier from the list
- Enter the secret key that was set in the template in step 7
- Set the Status to Enabled
- Optionally set also if you want to use the order ID as filename
- Optionally set a file extension
- Save the plugin settings
Mass Action trigger
To ensure that an export is run after an order is created in HikaShop, a mass action needs to be created.
- Go to Components -> HikaShop
- Click on System -> Mass actions
- Click on New to create a new mass action rule
- Fill in the details as below. The name can be anything you like.
- The other settings on the page are not needed.
- Save the Mass action
Ready for use
Now that everything is configured, the system is ready for use. The procedure that is being followed is this:
- Customer places an order in HikaShop
- HikaShop triggers the mass action "After on order is created"
- The trigger is picked up by the HikaShop CSVI Export plugin
- The plugin will trigger the RO CSVI template selected in the plugin
- The template will export the order placed by the customer