- Posts: 41
- Thank you received: 4
Mass Action to update variant price causes 500 error
2 years 11 months ago #355843
by Genr8r
Mass Action to update variant price causes 500 error was created by Genr8r
-- 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.
-- 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.
2 years 11 months ago #355847
by nicolas
Replied by nicolas on topic Mass Action to update variant price causes 500 error
Hi,
Can you provide a screenshot of your massaction settings please ?
Can you provide a screenshot of your massaction settings please ?
Please Log in or Create an account to join the conversation.
2 years 11 months ago #355850
by Genr8r
Replied by Genr8r on topic Mass Action to update variant price causes 500 error
Please Log in or Create an account to join the conversation.
2 years 11 months ago #355851
by nicolas
Replied by nicolas on topic Mass Action to update variant price causes 500 error
Hi,
Thanks.
I see what's going on.
Add the line:
before the line:
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.
Thanks.
I see what's going on.
Add the line:
Code:
$filter['type'] = str_replace('.','', $filter['type']);
Code:
$rquery = str_replace('`'.$filter['type'].'`','',$this->massaction->getRequest($filter));
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.
2 years 11 months ago #355881
by Genr8r
Replied by Genr8r on topic Mass Action to update variant price causes 500 error
Please Log in or Create an account to join the conversation.
2 years 11 months ago #355903
by nicolas
Replied by nicolas on topic Mass Action to update variant price causes 500 error
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.
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.
2 years 11 months ago #356044
by Genr8r
Replied by Genr8r on topic Mass Action to update variant price causes 500 error
Please Log in or Create an account to join the conversation.
2 years 11 months ago #356045
by nicolas
Replied by nicolas on topic Mass Action to update variant price causes 500 error
Hi,
Try changing the filter to "!=" (different) and as value use the full name "No gift wrap"
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.
2 years 11 months ago #356204
by Genr8r
Replied by Genr8r on topic Mass Action to update variant price causes 500 error
That worked - thank you!
Please Log in or Create an account to join the conversation.
Time to create page: 0.213 seconds