Mass action not working with a trigger

  • Posts: 585
  • Thank you received: 23
  • Hikaserial Subscription Hikashop Multisite
5 years 2 months ago #310241

-- HikaShop version -- : 4.2.1
-- Joomla version -- : 3.9.12
-- PHP version -- : 7.3

Hi,

I have create a simple massaction to add weight to a product
and it's working when we process is manualy.
But when we use the triggers below none of them is working:
- before a product is create
- before a product is update
- after a product is create
- after a product is update

Is this an bug or do I something wrong?

Kind regards,
Lumiga


Kind regards,
Lumiga
Attachments:

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

  • Posts: 82868
  • Thank you received: 13375
  • MODERATOR
5 years 2 months ago #310243

Hi,

I did a test on my end and it works just fine with the same settings ( I tried both after a product is created and after a product is updated).
So please double check.
Make sure that the hikashop mass action product plugin is enabled as well as the system hikashop mass action plugin via the Joomla plugins manager.
And check that the category name is the exact same.

The following user(s) said Thank You: Lumiga

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

  • Posts: 585
  • Thank you received: 23
  • Hikaserial Subscription Hikashop Multisite
5 years 2 months ago #310272

Hi Nicolas,

I found out that the category_name is Casesensitive.

When I use "meubels" it give 32 results, what's correct, but with the name "Meubels" it give also 32 results.
But because the Category name is with a Capital it's only working with this version.
So it's strange that it give 32 results on the name without capital and also worked when we processed the action manualy.
These two reasons let me thing that the mass action was correct. But thanks for the tip to use the exact same name.

Kind regards,
Lumiga


Kind regards,
Lumiga

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

  • Posts: 82868
  • Thank you received: 13375
  • MODERATOR
5 years 2 months ago #310273

Hi,

Ah yes. When you click on the "process" button (or with the preview of the number of results of the filter), the filters are run with a MySQL query on all the products in the shop. However, when the mass action is run through triggers, the filters are run in PHP directly on the data sent by the trigger.
And with the MySQL query, the comparisons are done case insensitive (it's usually the case in MySQL databases to configure the tables to be searchable that way).
However, with the PHP check, it's done with a case sensitive check.
Changing the way the MySQL check is done won't be practical / easy and I don't think we want to change the PHP check to make it case insensitive. So I don't think we'll change the way it's done for now, but I agree that it's a bit misleading in cases such as yours.

The following user(s) said Thank You: Lumiga

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

Time to create page: 0.061 seconds
Powered by Kunena Forum