Creating the template
A template can be created by following these steps:
- Go to Components -> RO CSVI -> Templates
- Click New
- Give the template a name
- Set Action to Import
- Set Component to HikaShop
- Set Operation to Product
- Click Next: Select Source
- Source is set default to Load from your computer. No need for change.
- Click Next: Select options
- The default values are OK, change if needed.
- Click Next: Select fields
- Nothing needed here as we set to Use column headers as configuration in step 10.
- Click Next: Finalize
- All done here
- Click Close to return to the list of templates or Edit if you want to fine-tune the template further.
Adding the template fields
Template fields can be added by following these steps:
- Go to Components -> RO CSVI -> Templates
- Click on Template fields
- In the Search Tools select your template
- 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.
Required fields
- product_code
Criteria
- product_code
Run the import
The import can be run by following these steps:
- Go to Components -> RO CSVI -> Import
- Select the template created earlier
- Click Select file
- Select the file to import
- Click Preview
- You now see a preview of the file as to how CSVI sees the file
- Click Start import
- The import is run
- The Log details page will be shown with information regarding the import if the Enable logging is enabled in the template
Examples
It is also possible to set a default variant while importing products in HikaShop. To do that, add field default_variant to the import file and set the value to 1 or Yes or Y for the product which needs to be set as default variant. Example content is given below
category_path,product_code,product_parent_code,product_type,product_name,product_description,product_published,size,default_variant
Pet Supplies/Pet Collars/Nylon Collars,1001,,main,Sample product 1,Sample product 1 description,1,Please select,
Pet Supplies/Pet Collars/Nylon Collars,1001L,1001,variant, Child product L, Child Product L size,1,L,
Pet Supplies/Pet Collars/Nylon Collars,1001XL,1001,variant, Child product XL, Child Product XL,1,XL,1
Pet Supplies/Pet Collars/Nylon Collars,1001XXL,1001,variant, Child product XXL, Child Product XXL size,1,XXL,
Pet Supplies/Pet Collars/Nylon Collars,1001XXXL,1001,variant, Child product XXXL, Child Product XXXL size,1,XXXL,
Pet Supplies/Pet Collars/Nylon Collars,1002,main,Sample product 2,Sample product 2 description,1,
After import the default variant in HikaShop will be set with the parent product. To check that go to Joomla administrator menu >> Components >> HikaShop >> Products >> Products. Click on the parent product from the imported category and check the Variants tab.
Example file
Further reading
RO CSVI will add price to 'all' usergroup as default for new prices if price_access field is not included in import file. For old prices, RO CSVI will look if the usergroup imported in price_access_new field is a valid one else will skip the import of price.
An example for importing a new product price
"product_code";"product_price";"price_access"
"JWL-01";"100";"Editor"
To update price to any new usergroup, set the price_access_new field to new usergroup and price_access to already set usergroup in database so csvi would identify the price row which has to be updated with combination of price_access and product_price field from the import file. If any of these do not match, RO CSVI would insert a new price for the product.
An example for updating price usergroup would look like
"product_code";"product_price";"price_access";"price_access_new"
"JWL-01";"100";"Editor";"all"