- Posts: 26
- Thank you received: 0
How to update the variants of a product
- kennethinsnow
-
Topic Author
- Offline
here is the code i use in the text area:
product_code, product_parent_id, price_value, product_quantity, Carrier, Capacity
Brand_New_Iphone_5,,550, Unlimited, Verizon, 16gb
Brand_New_Iphone_5_6_3, Brand_New_Iphone_5, 550, Unlimited, Verizon, 16gb
Brand_New_Iphone_5_6_4, Brand_New_Iphone_5, 580, 50, Verizon, 32gb
Brand_New_Iphone_5_6_5, Brand_New_Iphone_5, 610, 50, Verizon, 64gb
Brand_New_Iphone_5_7_3, Brand_New_Iphone_5, 530, Unlimited, AT&T or Unlocked, 16gb
Brand_New_Iphone_5_7_4, Brand_New_Iphone_5, 550, 50, AT&T or Unlocked, 32gb
Brand_New_Iphone_5_7_5, Brand_New_Iphone_5, 570, 50, AT&T or Unlocked, 64gb
Brand_New_Iphone_5_9_3, Brand_New_Iphone_5, 400, Unlimited, Sprint, 16gb
Brand_New_Iphone_5_9_4, Brand_New_Iphone_5, 410, 50, AT&T or Sprint, 32gb
Brand_New_Iphone_5_9_5, Brand_New_Iphone_5, 420, 50, AT&T or Sprint, 64gb
price and quantity are the two parameters i want to update, and "carrier" and "capacity" are the characteristics
Please Log in or Create an account to join the conversation.
How do you update these variants?
You should try by using the csv export and import, it's the best way to update informations of existing products.
Please Log in or Create an account to join the conversation.
- kennethinsnow
-
Topic Author
- Offline
- Posts: 26
- Thank you received: 0
eliot wrote: Hi there,
How do you update these variants?
You should try by using the csv export and import, it's the best way to update informations of existing products.
Please Log in or Create an account to join the conversation.
Do update your variants one by one?
Anyway, i still think that csv import is the best way to update many variants in a one shot.
Please Log in or Create an account to join the conversation.
- kennethinsnow
-
Topic Author
- Offline
- Posts: 26
- Thank you received: 0
eliot wrote: I don't understand what you mean by text.
Do update your variants one by one?
Anyway, i still think that csv import is the best way to update many variants in a one shot.
I used "Import products from text area" as shown here:
it did find all the variants but didn't update them, instead delete them.
To import from csv, do I have to specify all the parameters like images, descriptions or just the parameters(price & quantity) that I want to update?
thanks again
Please Log in or Create an account to join the conversation.
Also, please make sure that you don't add spaces between the commas and the values in your CSV as the system might not be able to find the data in such case. If you look at the exported CSV, there are no spaces between the commas and the values.
Please Log in or Create an account to join the conversation.
- kennethinsnow
-
Topic Author
- Offline
- Posts: 26
- Thank you received: 0
"product_id;""product_parent_id"";""product_name"";""product_description"";""product_quantity"";""product_code"";""product_published"";""product_hit"";""product_created"";""product_sale_start"";""product_sale_end"";""product_delay_id"";""product_tax_id"";""product_type"";""product_vendor_id"";""product_manufacturer_id"";""product_url"";""product_weight"";""product_keywords"";""product_weight_unit"";""product_modified"";""product_meta_description"";""product_dimension_unit"";""product_width"";""product_length"";""product_height"";""product_max_per_order"";""product_access"";""product_group_after_purchase"";""product_min_per_order"";""product_contact"";""product_last_seen_date"";""product_sales"";""product_waitlist"";""product_layout"";""product_average_score"";""product_total_vote"";""product_page_title"";""product_alias"";""product_price_percentage"";""product_canonical"";""product_msrp"";""categories_ordering"";""parent_category"";""categories_image"";""categories"";""price_value"";""price_currency_id"";""price_min_quantity"";""price_access"";""files"";""images"";""related"";""options"";""Capacity"";""Carrier"";""Function"";""Body"";""Cracked"," has bright spot or dead pixel"";""Screen"";""Back"";""Buttone & Switches"";",,
"1;0;""Brand New iPhone 5"";""<p>Brand New Phones must be purchased within one month", in its original box that has the matching IMEI number. There should be no sign of wear or tear, and all accessories should be wrapped in plastic," -$30 if the original manufacturer screen protectors were removed.</p>"";1996;""Brand_New_Iphone_5"";1;54;1370833313;0;0;0;11;""main"";0;0;"""";1.000;"""";""kg"";1371349193;"""";""m""
.250;5.700;1.750;10;""all"";"""";0;0;1372039040;9;0;"""";0;0;"""";"""";0.0000000;"""";0.0000000;1;"""";"""";""Brand New Phones"";550.00000;""USD"";0;""all"";"""";""iphone5white.jpg;iphone5black_1106602244.png"";"""";"""";""16gb"";""Verizon"";"""";"""";"""";"""";"""";"""";""8;"""";"""";"""";-1;""Brand_New_Iphone_5_6_3"";1;0;1370833313;0;0;0;11;""variant"";0;0;"""";0.000;"""";""kg"";1370833313;"""";""m"";0.000;0.000;0.000;10;""all"";"""";0;0;0;0;0;"""";0;0;"""";"""";0.0000000;"""";0.0000000;"""";"""";"""";"""";550.00000;""USD"";0;""all"";"""";"""";"""";"""";""16gb"";""Verizon"";"""";"""";"""";"""";"""";"""";",,,
"9;"""";"""";"""";50;""Brand_New_Iphone_5_6_4"";1;0;1370833313;0;0;0;11;""variant"";0;0;"""";0.000;"""";""kg"";1370833313;"""";""m"";0.000;0.000;0.000;0;""all"";"""";0;0;0;0;0;"""";0;0;"""";"""";0.0000000;"""";0.0000000;"""";"""";"""";"""";580.00000;""USD"";0;""all"";"""";"""";"""";"""";""32gb"";""Verizon"";"""";"""";"""";"""";"""";"""";",,,
Please Log in or Create an account to join the conversation.
- kennethinsnow
-
Topic Author
- Offline
- Posts: 26
- Thank you received: 0
nicolas wrote: You should leave all the columns as they are in the export CSV.
Also, please make sure that you don't add spaces between the commas and the values in your CSV as the system might not be able to find the data in such case. If you look at the exported CSV, there are no spaces between the commas and the values.
Please Log in or Create an account to join the conversation.
- kennethinsnow
-
Topic Author
- Offline
- Posts: 26
- Thank you received: 0
File exported(with quotations around text, semicolon as the delimiter):
Please log in or register to see it.
"product_id";"product_parent_id";"product_name";"product_description";"product_quantity";"product_code";"product_published";"product_hit";"product_created";"product_sale_start";"product_sale_end";"product_delay_id";"product_tax_id";"product_type";"product_vendor_id";"product_manufacturer_id";"product_url";"product_weight";"product_keywords";"product_weight_unit";"product_modified";"product_meta_description";"product_dimension_unit";"product_width";"product_length";"product_height";"product_max_per_order";"product_access";"product_group_after_purchase";"product_min_per_order";"product_contact";"product_last_seen_date";"product_sales";"product_waitlist";"product_layout";"product_average_score";"product_total_vote";"product_page_title";"product_alias";"product_price_percentage";"product_canonical";"product_msrp";"categories_ordering";"parent_category";"categories_image";"categories";"price_value";"price_currency_id";"price_min_quantity";"price_access";"files";"images";"related";"options";"Capacity";"Carrier";"Function";"Body";"Cracked, has bright spot or dead pixel";"Screen";"Back";"Buttone & Switches";
1;0;"Brand New iPhone 5";"<p>Brand New Phones must be purchased within one month, in its original box that has the matching IMEI number. There should be no sign of wear or tear, and all accessories should be wrapped in plastic, -$30 if the original manufacturer screen protectors were removed.</p>";1996;"Brand_New_Iphone_5";1;56;1370833313;0;0;0;11;"main";0;0;"";1.000;"";"lb";1372122893;"";"m"
.250;5.700;1.750;10;"all";"";0;0;1372105341;9;0;"";0;0;"";"";0.0000000;"";0.0000000;1;"";"";"Brand New Phones";550.00000;"USD";0;"all";"";"iphone5white.jpg;iphone5black_1106602244.png";"";"";"16gb";"Verizon";"";"";"";"";"";"";8;"";"";"";-1;"Brand_New_Iphone_5_6_3";1;0;1370833313;0;0;0;11;"variant";0;0;"";0.000;"";"kg";1370833313;"";"m";0.000;0.000;0.000;10;"all";"";0;0;0;0;0;"";0;0;"";"";0.0000000;"";0.0000000;"";"";"";"";550.00000;"USD";0;"all";"";"";"";"";"16gb";"Verizon";"";"";"";"";"";"";
9;"";"";"";50;"Brand_New_Iphone_5_6_4";1;0;1370833313;0;0;0;11;"variant";0;0;"";0.000;"";"kg";1370833313;"";"m";0.000;0.000;0.000;0;"all";"";0;0;0;0;0;"";0;0;"";"";0.0000000;"";0.0000000;"";"";"";"";580.00000;"USD";0;"all";"";"";"";"";"32gb";"Verizon";"";"";"";"";"";"";
File edited and saved (excel reported incompatible format, lose the quotation around the text, and delimiter was changed from semicolon to comma)
Please log in or register to see it.
product_id,product_parent_id,product_name,product_description,product_quantity,product_code,product_published,product_hit,product_created,product_sale_start,product_sale_end,product_delay_id,product_tax_id,product_type,product_vendor_id,product_manufacturer_id,product_url,product_weight,product_keywords,product_weight_unit,product_modified,product_meta_description,product_dimension_unit,product_width,product_length,product_height,product_max_per_order,product_access,product_group_after_purchase,product_min_per_order,product_contact,product_last_seen_date,product_sales,product_waitlist,product_layout,product_average_score,product_total_vote,product_page_title,product_alias,product_price_percentage,product_canonical,product_msrp,categories_ordering,parent_category,categories_image,categories,price_value,price_currency_id,price_min_quantity,price_access,files,images,related,options,Capacity,Carrier,Function,Body,"Cracked, has bright spot or dead pixel",Screen,Back,Buttone & Switches
1,0,Brand New iPhone 5,"<p>Brand New Phones must be purchased within one month, in its original box that has the matching IMEI number. There should be no sign of wear or tear, and all accessories should be wrapped in plastic, -$30 if the original manufacturer screen protectors were removed.</p>",1996,Brand_New_Iphone_5,1,56,1370833313,0,0,0,11,main,0,0,,1,,lb,1372122893,,m,3.25,5.7,1.75,10,all,,0,0,1372105341,9,0,,0,0,,,0,,0,1,,,Brand New Phones,550,USD,0,all,,iphone5white.jpg;iphone5black_1106602244.png,,,16gb,Verizon,,,,,,
8,,,,-1,Brand_New_Iphone_5_6_3,1,0,1370833313,0,0,0,11,variant,0,0,,1,,lb,1370833313,,m,0,0,0,10,all,,0,0,0,0,0,,0,0,,,0,,0,,,,,550,USD,0,all,,,,,16gb,Verizon,,,,,,
9,,,,50,Brand_New_Iphone_5_6_4,1,0,1370833313,0,0,0,11,variant,0,0,,1,,lb,1370833313,,m,0,0,0,0,all,,0,0,0,0,0,,0,0,,,0,,0,,,,,580,USD,0,all,,,,,32gb,Verizon,,,,,,
Tried to import anyway but received error messages:
The column 'has bright spot or dead pixel' is not in the list of possible columns : product_parent_id | product_name | product_description | product_quantity | product_code | product_published | product_hit | product_created | product_sale_start | product_sale_end | product_delay_id | product_tax_id | product_type | product_vendor_id | product_manufacturer_id | product_url | product_weight | product_keywords | product_weight_unit | product_modified | product_meta_description | product_dimension_unit | product_width | product_length | product_height | product_max_per_order | product_access | product_group_after_purchase | product_min_per_order | product_contact | product_last_seen_date | product_sales | product_waitlist | product_layout | product_average_score | product_total_vote | product_page_title | product_alias | product_price_percentage | product_canonical | product_msrp | price_value | price_value_with_tax | price_currency_id | price_min_quantity | price_access | files | images | parent_category | categories_namekey | categories_image | categories_ordering | categories | related | options | capacity | carrier | function | body | cracked, has bright spot or dead pixel | screen | back | buttone & switches. The column data was ignored
You need 63 arguments per line
The line '8,,,,-1,Brand_New_Iphone_5_6_3,1,0,1370833313,0,0,0,11,variant,0,0,,1,,lb,1370833313,,m,0,0,0,10,all,,0,0,0,0,0,,0,0,,,0,,0,,,,,550,USD,0,all,,,,,16gb,Verizon,,,,,,' could not be imported
The line '9,,,,50,Brand_New_Iphone_5_6_4,1,0,1370833313,0,0,0,11,variant,0,0,,1,,lb,1370833313,,m,0,0,0,0,all,,0,0,0,0,0,,0,0,,,0,,0,,,,,580,USD,0,all,,,,,32gb,Verizon,,,,,,' could not be imported
The line '10,,,,50,Brand_New_Iphone_5_6_5,1,0,1370833313,0,0,0,11,variant,0,0,,1,,lb,1370833313,,m,0,0,0,0,all,,0,0,0,0,0,,0,0,,,0,,0,,,,,620,USD,0,all,,,,,64gb,Verizon,,,,,,' could not be imported
The line '12,,,,-1,Brand_New_Iphone_5_7_3,1,0,1370833313,0,0,0,11,variant,0,0,,1,,lb,1370833313,,m,0,0,0,0,all,,0,0,0,5,0,,0,0,,,0,,0,,,,,530,USD,0,all,,,,,16gb,AT&T or Unlocked,,,,,,' could not be imported
The line '13,,,,50,Brand_New_Iphone_5_7_4,1,0,1370833313,0,0,0,11,variant,0,0,,1,,lb,1370833313,,m,0,0,0,0,all,,0,0,0,0,0,,0,0,,,0,,0,,,,,550,USD,0,all,,,,,32gb,AT&T or Unlocked,,,,,,' could not be imported
The line '14,,,,50,Brand_New_Iphone_5_7_5,1,0,1370833313,0,0,0,11,variant,0,0,,1,,lb,1370833313,,m,0,0,0,0,all,,0,0,0,0,0,,0,0,,,0,,0,,,,,570,USD,0,all,,,,,64gb,AT&T or Unlocked,,,,,,' could not be imported
The line '16,,,,-1,Brand_New_Iphone_5_9_3,1,0,1370833313,0,0,0,11,variant,0,0,,1,,lb,1370833313,,m,0,0,0,0,all,,0,0,0,0,0,,0,0,,,0,,0,,,,,385,USD,0,all,,,,,16gb,Sprint,,,,,,' could not be imported
The line '17,,,,50,Brand_New_Iphone_5_9_4,1,0,1370833313,0,0,0,11,variant,0,0,,1,,lb,1370833313,,m,0,0,0,0,all,,0,0,0,0,0,,0,0,,,0,,0,,,,,395,USD,0,all,,,,,32gb,Sprint,,,,,,' could not be imported
The line '18,,,,50,Brand_New_Iphone_5_9_5,1,0,1370833313,0,0,0,11,variant,0,0,,1,,lb,1370833313,,m,0,0,0,0,all,,0,0,0,0,0,,0,0,,,0,,0,,,,,405,USD,0,all,,,,,64gb,Sprint,,,,,,' could not be imported
The line '23,0,Brand New iPhone 4s,"
Brand New Phones must be purchased within one month, in its original box that has the matching IMEI number. There should be no sign of wear or tear, and all accessories should be wrapped in plastic, -$30 if the original manufacturer screen protectors were removed.
",997,Brand_New_Iphone_4s,1,23,1367817895,0,0,0,11,main,0,0,,1,,lb,1371349206,,in,3.25,5,1.8,0,all,,0,0,1372105334,3,0,,0,0,,,0,,0,2,,,Brand New Phones,390,USD,0,all,,iphone4s16gb-overview-large-white.png;iphone-4s-glass-back.jpg,,,16gb,AT&T or Unlocked,,,,,,' could not be imported
The line '45,0,Brand New iPhone 4,"
Brand New Phones must be purchased within one month, in its original box that has the matching IMEI number. There should be no sign of wear or tear, and all accessories should be wrapped in plastic, -$30 if the original manufacturer screen protectors were removed.
",998,Brand_New_Iphone_4,1,13,1367818541,0,0,0,11,main,0,0,,1,,lb,1371349221,,in,3.25,5,1.8,0,all,,0,0,1372105466,2,0,,0,0,,,0,,0,3,,,Brand New Phones,250,USD,0,all,,iphone4s16gb-overview-large-white.png;iphone-4s-glass-back.jpg,,,,AT&T or Unlocked,,,,,,' could not be imported
The line '55,0,Used iPhone 5,
Requirements:
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,' could not be imported
The line '"
1. Screen must be intact, no damage
",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,' could not be imported
The line '
2. No sign of water damage.
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,' could not be imported
The line '"
3. All functions are working properly including but not limited to Phone, Wi-Fi, Speaker, Camera.
",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,' could not be imported
The line '
4. All buttons and switches are working smoothly.
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,' could not be imported
The line '"
5. Without box or accessories is fine.
""",996,Used_Iphone_5,1,29,1367890600,0,0,0,11,main,0,0,,1,,lb,1371349997,,in,3.25,5.7,1.8,0,all,,0,0,1372093518,4,0,,0,0,,,0,,0,1,,,Used Phones,420,USD,0,all,,iphone5white.jpg;iphone5black_1106602244.png,,,,AT&T or Unlocked,,Normal,,,,,,,' could not be imported
The line '71,0,Used iPhone 4S AT&T or Unlocked,
Requirements:
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,' could not be imported
The line '"
1. Screen must be intact, no damage
",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,' could not be imported
...
The line '"
3. All functions are working properly including but not limited to Phone, Wi-Fi, Speaker, Camera.
",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,' could not be imported Product not found
The line '"
5. Without box or accessories is fine.
""",500,Used_Iphone_4_ATT,1,18,1367896672,0,0,0,11,main,0,0,,1,,lb,1371350111,,m,0,0,0,0,all,,0,0,1372044271,0,0,,0,0,,,0,,0,5,,,Used Phones,150,USD,0,all,,iphone4_white.png,,,,,,Normal,,Normal,Normal,,,,' could not be imported Product not found
Please let me know how i can export, edit and then import the products back to my shop.
Seems there are no ways to preserve the hikashop format by using excel, so i have to use a text editor to edit it. However is there another way editor that can both preserve the format while aligning the data with the column?
Please Log in or Create an account to join the conversation.
- kennethinsnow
-
Topic Author
- Offline
- Posts: 26
- Thank you received: 0
1. There is still an error message each time i import the csv file to the shop:
The column '' is not in the list of possible columns : product_parent_id | product_name | product_description | product_quantity | product_code | product_published | product_hit | product_created | product_sale_start | product_sale_end | product_delay_id | product_tax_id | product_type | product_vendor_id | product_manufacturer_id | product_url | product_weight | product_keywords | product_weight_unit | product_modified | product_meta_description | product_dimension_unit | product_width | product_length | product_height | product_max_per_order | product_access | product_group_after_purchase | product_min_per_order | product_contact | product_last_seen_date | product_sales | product_waitlist | product_layout | product_average_score | product_total_vote | product_page_title | product_alias | product_price_percentage | product_canonical | product_msrp | price_value | price_value_with_tax | price_currency_id | price_min_quantity | price_access | files | images | parent_category | categories_namekey | categories_image | categories_ordering | categories | related | options | capacity | carrier | function | body | cracked, has bright spot or dead pixel | screen | back | buttone & switches. The column data was ignored
2. I set "Append characteristics value to product name" to be yes, but the default characteristics are not shown with the name when entering the product page. For example, Iphone 5 has two characteristics, "carrier", and "capacity". The default values are "verizon" and "16Gb" for them, but when loading the product page, these default characteristics names are not appended to the product name. Only when you change one characteristic, the name get updated. Is there a way to make sure the default characteristics are displayed with the product name?
Thanks
Please Log in or Create an account to join the conversation.
1. You can ignore that.
That's probably because you have a custom field or a characteristic without a name and thus when you export it you get an empty column.
2. That's indeed the normal behavior. To change it, you can edit the file "show_default" via the menu Display>Views and change the line:
echo $this->element->main->product_name;
to:
echo $this->element->product_name;
Please Log in or Create an account to join the conversation.
- kennethinsnow
-
Topic Author
- Offline
- Posts: 26
- Thank you received: 0
nicolas wrote: Hi,
1. You can ignore that.
That's probably because you have a custom field or a characteristic without a name and thus when you export it you get an empty column.
2. That's indeed the normal behavior. To change it, you can edit the file "show_default" via the menu Display>Views and change the line:
echo $this->element->main->product_name;
to:
echo $this->element->product_name;
I made the modification, but it didn't work. here is the part that i changed:
<span id="hikashop_product_name_main" class="hikashop_product_name_main">
<?php
if (hikashop_getCID('product_id')!=$this->element->product_id && isset ($this->element->main->product_name))
echo $this->element->(main->)product_name;
else
echo $this->element->product_name;
?>
</span>
I removed the content within the bracket, but it is still not showing the variant's name
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
- kennethinsnow
-
Topic Author
- Offline
- Posts: 26
- Thank you received: 0
No, I am not using the default layout, probably "tabular" layout. what do i change to get that effect in that case?nicolas wrote: Then, it means that either you're not using the default layout for the product page but the tabular or the reversed layout or another one that you created yourself, or you're not editing the view file your frontend template.
I did change the layout to "default" and it works as you said, but I sorta like the "tabular" layout more.
Please Log in or Create an account to join the conversation.
So you have to edit the file "show_tabular" via the menu Display>Views.
Please Log in or Create an account to join the conversation.