Mass Action to update variant price causes 500 error

  • Posts: 39
  • Thank you received: 2
  • Hikaserial Standard Hikashop Business
1 year 2 months ago #355843

-- HikaShop version -- : 5.0.0
-- Joomla version -- : 4.3.4
-- PHP version -- : 8.1.24
-- Error-message(debug-mod must be tuned on) -- : You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '`Gift Wrapping ($1`.`50)` NOT LIKE '%No%' AND hk_characteristic_parent1.chara...' at line 1

.../libraries/vendor/joomla/database/src/Mysqli/MysqliStatement.php:137

We have a Mass action to update the variant price by $0.50. When we run the action, it triggers a 500 mysql error.

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

  • Posts: 83022
  • Thank you received: 13403
  • MODERATOR
1 year 2 months ago #355847

Hi,

Can you provide a screenshot of your massaction settings please ?

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

  • Posts: 39
  • Thank you received: 2
  • Hikaserial Standard Hikashop Business
1 year 2 months ago #355850

Screenshot attached

Attachments:

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

  • Posts: 83022
  • Thank you received: 13403
  • MODERATOR
1 year 2 months ago #355851

Hi,

Thanks.
I see what's going on.
Add the line:

$filter['type'] = str_replace('.','', $filter['type']);
before the line:
$rquery = str_replace('`'.$filter['type'].'`','',$this->massaction->getRequest($filter));
in the file plugins/hikashop/massaction_product/massaction_product.php and it should fix the problem.
Let us know how it goes so that we can include the patch on our end.

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

  • Posts: 39
  • Thank you received: 2
  • Hikaserial Standard Hikashop Business
1 year 2 months ago #355881

I added the line as requested in the plugin and the Mass action is not throwing an error. However, it still does not seem to be updating the price as needed.

Please advixe.

Brian

Attachments:

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

  • Posts: 83022
  • Thank you received: 13403
  • MODERATOR
1 year 2 months ago #355903

Hi,

The patch is only to fix the error caused by the dot character in the name of the characteristic. That's something we had not anticipated.

For the fact that the mass action doesn't do anything, I would recommend to use a "display the results" action in order to see the list of elements found by the mass action.

For example, on our demo website with a similar mass action:
i.imgur.com/GYwY6Oy.png
I get these results:
i.imgur.com/XHTcEWv.png

I'm suspecting you actually have no values of your characteristics without the characters "no" in them.

So run a display the results action, and provide a screenshot of the settings of your characteristic.

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

  • Posts: 39
  • Thank you received: 2
  • Hikaserial Standard Hikashop Business
1 year 2 months ago #356044

Hi Nicolas,

You are correct in that I am not getting any products to match my filter. I can not figure out why. Here are my characteristics settings...

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

  • Posts: 83022
  • Thank you received: 13403
  • MODERATOR
1 year 2 months ago #356045

Hi,

Try changing the filter to "!=" (different) and as value use the full name "No gift wrap"

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

  • Posts: 39
  • Thank you received: 2
  • Hikaserial Standard Hikashop Business
1 year 1 month ago #356204

That worked - thank you!

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

Time to create page: 0.086 seconds
Powered by Kunena Forum