SQL error when adding product variants manually
13 years 1 month ago #121169
by iedwards
SQL error when adding product variants manually was created by iedwards
I have encountered a couple of issues adding Variants.
1. If I switch off "Generate variants automatically" in advanced settings, go to a product without characteristics or variants and add characteristics to it, and then click on "Manage Variants" an SQL error occurs. It seems this view assumes there are always going to be variants
2. When adding characteristics to a product the multi-select checkbox at the top of the select column doesn't actually do anything, it's necessary to select characteristics individually which is a pain if you have a lot of characteristics on a lot of products (see attached capture3.jpg)
I hope you can address these two problems,
Thanks,
Ian
-- url of the page with the problem -- : not yet online
-- HikaShop version -- : 2.2.1
-- Joomla version -- : 3.1.5
-- PHP version -- : 5.3.1
-- Browser(s) name and version -- : Firefox 17.0.1
1. If I switch off "Generate variants automatically" in advanced settings, go to a product without characteristics or variants and add characteristics to it, and then click on "Manage Variants" an SQL error occurs. It seems this view assumes there are always going to be variants
1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') ORDER BY `ordering` ASC' at line 1 SQL=SELECT `ordering`,`variant_characteristic_id`,`variant_product_id` FROM ap_hikashop_variant WHERE variant_product_id IN() ORDER BY `ordering` ASC
2. When adding characteristics to a product the multi-select checkbox at the top of the select column doesn't actually do anything, it's necessary to select characteristics individually which is a pain if you have a lot of characteristics on a lot of products (see attached capture3.jpg)
I hope you can address these two problems,
Thanks,
Ian
-- url of the page with the problem -- : not yet online
-- HikaShop version -- : 2.2.1
-- Joomla version -- : 3.1.5
-- PHP version -- : 5.3.1
-- Browser(s) name and version -- : Firefox 17.0.1
Please Log in or Create an account to join the conversation.
13 years 1 month ago #121259
by nicolas
Replied by nicolas on topic SQL error when adding product variants manually
Hi,
Thank you for your feedback.
1. You can add the line:
if(!count($results)) return false;
before the line:
$query = 'SELECT `ordering`,`variant_characteristic_id`,`variant_product_id` FROM '.hikashop_table('variant');
in the file administrator/components/com_hikashop/classes/product.php
2. You can change the line:
<input type="checkbox" name="toggle" value="" onclick="hikashop.checkAll((this);" />
to:
<input type="checkbox" name="toggle" value="" onclick="hikashop.checkAll(this);" />
in the file administrator/components/com_hikashop/views/characteristic/tmpl/selectcharacteristic.php
Thank you for your feedback.
1. You can add the line:
if(!count($results)) return false;
before the line:
$query = 'SELECT `ordering`,`variant_characteristic_id`,`variant_product_id` FROM '.hikashop_table('variant');
in the file administrator/components/com_hikashop/classes/product.php
2. You can change the line:
<input type="checkbox" name="toggle" value="" onclick="hikashop.checkAll((this);" />
to:
<input type="checkbox" name="toggle" value="" onclick="hikashop.checkAll(this);" />
in the file administrator/components/com_hikashop/views/characteristic/tmpl/selectcharacteristic.php
The following user(s) said Thank You: iedwards
Please Log in or Create an account to join the conversation.
13 years 1 month ago #121283
by iedwards
Replied by iedwards on topic SQL error when adding product variants manually
That's excellent support, thank you Nicolas. I have another question which I'll post as a new topic.
Ian
Ian
Please Log in or Create an account to join the conversation.
Time to create page: 0.169 seconds