RO CSVI

HikaShop Product Import

Creating the template

A template can be created by following these steps:

  1. Go to Components -> RO CSVI -> Templates
  2. Click New
  3. Give the template a name
  4. Set Action to Import
  5. Set Component to HikaShop
  6. Set Operation to Product
  7. Click Next: Select Source
  8. Source is set default to Load from your computer. No need for change.
  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.

HikaShop product import template

Adding the template fields

Template fields can be added by following these steps:

  1. Go to Components -> RO CSVI -> 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.

HikaShop product import template fields

Required fields

  • product_code

Criteria

These fields make up the criteria to determine if the record is going to be updated or added. If all the criteria fields match an existing record, the record will be updated. If not all the criteria fields match, the record will be added.
  • product_code

Run the import

The import can be run by following these steps:

  1. Go to Components -> RO CSVI -> Import
  2. Select the template created earlier
  3. Click Select file
  4. Select the file to import
  5. Click Preview
  6. You now see a preview of the file as to how CSVI sees the file
  7. Click Start import
  8. The import is run
  9. The Log details page will be shown with information regarding the import if the Enable logging is enabled in the template

HikaShop product import process

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.

default variant hikashop

Example file

import_hikashop_product.csv

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"

 

Related Articles