SQL error when adding product variants manually

  • Posts: 250
  • Thank you received: 7
11 years 2 months ago #121169

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

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

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
11 years 2 months ago #121259

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

The following user(s) said Thank You: iedwards

Please Log in or Create an account to join the conversation.

  • Posts: 250
  • Thank you received: 7
11 years 2 months ago #121283

That's excellent support, thank you Nicolas. I have another question which I'll post as a new topic.

Ian

Please Log in or Create an account to join the conversation.

Time to create page: 0.063 seconds
Powered by Kunena Forum