I've just spent hours trying to figure out how to import multiple features via CSV, with a lot of Googling and not a lot of results. I figured for others' sanity, I'd document the "rules".
Most of the info is from http://kb.cs-cart.com/imported-fields-formatand I have advised them that the info needs updating.
That doc says:
All features that you import must be in the {Feature ID} (Group name) Feature name: Feature type[Feature value] format, where Feature ID - ID of the feature, Group name - Name of the feature group, Feature name - Name of the feature, Feature type - Type of the feature (C - checkbox, M - multiple checkboxes, S - text select box, N - number select box, E - extended selectbox, T - simple text, O - number, D - date), Feature value - Value of the feature (several values can be delimited by a comma). Several features must be delimited by a semicolon. Note, it is required to create features on the Product features page before (!) applying them to the products.
EXAMPLE: T[1233423423]; Release date: D[05/05/07]; Color: S[Red]
Two big things:
- As of v4.3.4 (possible earlier), the Features do not need to exist - the import process will add them (so be careful importing into a live site!)
- Feature Type "E - Extended Selectbox" is displayed as "Brand/Manufacturer" in the Admin area.
If your features already exist, run this SQL to see what it's Type code is:
SELECT pfd.description, pf.feature_type FROM cs_product_features pf join cs_product_features_descriptions pfd on pf.feature_id = pfd.feature_id
Let's imagine we have two Groups (in bold) with a couple of Features within:
-
Product Details
- Brand (Type: Select Box > Brand/Manufacturer = E)
- Country of Origin (Type: Select Box > Text = S)
-
General Info
- ​Size (Type: Others > Text = T)
- Weight (Type: Others > Number = O)
- Uses (Type: Checkbox > Multiple = M)
In your Product CSV, you only have one Features column to squish this all into.. Here's how:
- For a product with one feature having one variant
"(Group_Name) Feature_Name: Type_Code[Feature_Value]";
eg. "(Product Details) Brand: E[Johnson & Johnson]";
- For a product with one feature having two variants
"(Group_Name) Feature_Name: Type_Code[Feature_Value///Feature_Value2]";
eg. "(General Info) Uses: M[Face///Hands]";
- For a product with two features in the same group having one variant each
Note the space between the semicolon and the next Feature:
[Feature_Value]; (Group Name)
and no semicolon inside the quotes after the last value:
[Feature_Value]";
"(Group_Name) Feature_Name: Type_Code[Feature_Value]; (Group_Name) Feature_Name: Type_Code[Feature_Value]";
eg. "(Product Details) Brand: E[Johnson & Johnson]; (Product Details) Country of Origin: S[China]";
- For a product with features in different groups (per example above)
"(Group_Name) Feature_Name: Type_Code[Feature_Value]; (Group_Name) Feature_Name: Type_Code[Feature_Value]";
eg. "(Product Details) Brand: E[Johnson & Johnson]; (Product Details) Country of Origin: S[China]; (General Info) Size: T[Large]; (General Info) Weight: O[200]; Uses: M[Face///Hands]";
If your Features aren't in Groups, just leave the "(Group Name) " bits out.
I hope all of this ends up being helpful to someone else too. Best of luck.