How to use the Mass Action OPERATION?

  • Posts: 584
  • Thank you received: 22
  • Hikaserial Subscription Hikashop Multisite
4 years 9 months ago #307786

-- HikaShop version -- : 4.1.0
-- Joomla version -- : 3.9
-- PHP version -- : 7.3

Hi Hikashopteam,

I'm looking for a manual or link to some documentation where I can learn more about the syntax for the mass action OPERATION.

For now I want to fill a custom field with the name of the main product combined with the name of the variant.

Something like this:
product_new_custom_field = OPERATION = {MAIN product_name} (VARIANT product_name}

So that we can later sort on this field for a stock list.

Hope you can give me a hint.

Kind regards,
Lumiga


Kind regards,
Lumiga

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

  • Posts: 81476
  • Thank you received: 13059
  • MODERATOR
4 years 9 months ago #307790

Hi,

For the name of the product you can use product.product_name
And if you want to append two elements together, you can use concat() :
www.w3schools.com/sql/sql_ref_mysql.asp
You can use all these functions.
However, please not that with mass actions, each entry in the hikashop_product table is a different entry.
So it will handle both main products and variants. And so, product.product_name will be the name of the current entry, and if it's a main product it will be the main product name, and if it's a variant, it will be the variant name.
But there is no "tag" you can enter in there to use the name of a variant of a main product while it's processing a main product, or to user the name of the main product while it's processing a variant.
If you want to do that, I'm afraid you'll have to run a real MySQL query via phpmyadmin.

The following user(s) said Thank You: Lumiga

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

Time to create page: 0.057 seconds
Powered by Kunena Forum