RO CSVI

Import of HikaShop Variants using RO CSVI

This document explains on how to import variants of HikaShop Product using Characteristics.

The import of variants is almost the same as a product import, just a few more fields are needed. Every product variant is linked to the parent product via a characteristic. The parent product has a block called SPECIFICATIONS which contains the characteristics assigned to that product.

HikaShop Variant product characteristics

In this example the product has 2 characteristics:

  • Color
  • Size

Characteristics can be added from HikaShop -> Products tab -> Characteristics page. Few things to remember with Characteristics

  • Update available fields once characteristics are added. This way RO CSVI recognises the newly added characteristics
  • Each characteristic must have an alias set. RO CSVI uses alias of Characteristics as template field in import file. The alias is the unique identifier for a characteristic and is shown in the image in lowercase letters.
  • Add the characteristic values before linking them to products.
 
For Color Characteristics
 
HikaShop Color Variant product characteristics
 
For Size Characteristics
HikaShop Size Variant product characteristics

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.

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.

Required fields

  • product_code
  • product_parent_code
  • product_type

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

 

Creating the import file

The import file is a combination of product information and characteristics. In this example we have the color and size characteristics. First is the parent product, this is required for new products. The parent product must always precede the child products, such is nature.

product_code,product_type,category_path,product_parent_code
Blue_stiletto,main,product category/Shoes/Women,
Blue_stiletto_6,variant,,Blue_stiletto
White_stiletto_7,variant,,Blue_stiletto
Green_stiletto_8,variant,,Blue_stiletto

Here we have the start of our file with a parent and a child product. Here are some observations:

  • The product_type for the parent is always main as this indicates it is a parent product
  • The product_parent_code for the parent is always empty
  • The product_type for the child is always variant as this indicates it is a child product
  • The product_parent_code for the child is always the value of the parent product_code field
  • The category_path for the child is always empty because it takes the category from the parent

Now that we have a parent and a child product we still need to indicate how the child is different from the parent, in other words what characteristics does the child have. We saw earlier the parent has 2 characteristics that can be set color and size. These fields must be added to the import file so RO CSVI knows it needs to process them.

product_code,product_type,category_path,product_parent_code,color,size
Blue_stiletto,main,product category/Shoes/Women,,,
Blue_stiletto_6,variant,,Blue_stiletto,Blue,6
White_stiletto_7,variant,,Blue_stiletto,White,7
Green_stiletto_8,variant,,Blue_stiletto,Green,8

 The values used for color and size must already exist, otherwise the child product will be added without any characteristics.

To set a child product as default variant, use default_variant field with value set to Yes/Y/1 in import file. No is the default value and it is not necessary to set N/No/0 value to the child rows which are not default variants. In the example content below color characteristic value Blue with size characteristic 6 is set as default variant

product_code,product_type,category_path,product_parent_code,color,size,default_variant
Blue_stiletto,main,product category/Shoes/Women,,,,
Blue_stiletto_6,variant,,Blue_stiletto,Blue,6,Y
White_stiletto_7,variant,,Blue_stiletto,White,7,
Green_stiletto_8,variant,,Blue_stiletto,Green,8,

The file is now ready for import as we have a parent and a child with characteristics.

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 RO 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

Video showing the process

 

Example file

hikashop_stiletto_variant.csv

After import with default_variant field, you can check the child variant product set to default from HikaShop -> Products page -> Click Product name/code-> variants tab

HikaShop Default variant 

Related Articles