Strange SQL error in mass actions

  • Posts: 634
  • Thank you received: 16
9 years 1 month ago #215683

-- HikaShop version -- : 2.6.5
-- Joomla version -- : 3.4.3

I get this error in mass action:

An error has occurred.
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 ') OR product_parent_id IN ()) LIMIT 0, 500' at line 1 SQL=SELECT hk_product.* FROM tpjtx_hikashop_product as hk_product WHERE (product_id IN () OR product_parent_id IN ()) LIMIT 0, 500


This is when I filter products with category_parent_id = 14. If the value is 13 there is no problem.

I checked both categories exist and products for both categories have the Target field for which I am changing the value in action section.


Attachments:

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

  • Posts: 13201
  • Thank you received: 2322
9 years 1 month ago #215714

Hi,

I added a little fix on our end to avoid this error. But it is displayed because there is no products returned by this filter.
Are you sure that you want to filter on "category_parent_id" and not just "category_id" ?

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

  • Posts: 634
  • Thank you received: 16
9 years 1 month ago #215722

Hi,
about your question:

I want to reach all products under a certain MAIN_A category even if they are not directly in that category but under a child category of MAIN_A.

MAIN_A has several subcategories.

Isn't category_parent_id the right way to point al MAIN_A subelements at any sub-level deep?

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

  • Posts: 13201
  • Thank you received: 2322
9 years 1 month ago #215787

Hi,

Yes it is indeed the right way, I just tried on my end and it seems to be working as expected.
Please install this latest version of the plugin:

File Attachment:

File Name: plg_hikash...duct.zip
File Size:15 KB


My structure is:
Shoes (id 12)
- Men (id 13)
-Women (id 14)

So to get all the products under the "Shoes" category, I set the filter like you but with the id "12" in my case.

Attachments:
Last edit: 9 years 1 month ago by Xavier.

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

  • Posts: 634
  • Thank you received: 16
9 years 1 month ago #216170

Hi,

after the update I'm afraid the system works still unpredictable (to me).

Now no matter what category I put it always counts None or 1 results even I product has tenths of them. Also tried with other operators like "Doesn't contain"...

I simply uploaded your attached package and the installation process was successful.

Attachments:

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

  • Posts: 634
  • Thank you received: 16
9 years 1 month ago #216171

I have some extra data that might be of use for you to determine the problem in mass actions (as long as I think it is a malfunction and not a wrong understanding in my side)

If you want an online version to check please request it and I'll put in a matter of minutes or hours.


Attachments:

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

  • Posts: 13201
  • Thank you received: 2322
9 years 1 month ago #216257

Hi,

Yes please provide a backend and FTP access via our contact form.
Don't forget to give the url of that topic in the message.

Do you have the latest version of HikaShop ?

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

Time to create page: 0.093 seconds
Powered by Kunena Forum