variants prices update using mass actions

  • Posts: 141
  • Thank you received: 3
4 years 1 week ago #315913

-- HikaShop version -- : 4.2.2
-- Joomla version -- : 3.9.15
-- PHP version -- : 7.3.1

Hi, Is it possible to update/change variants prices for certain product category using mass actions ?

Regards,
Greg

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

  • Posts: 81182
  • Thank you received: 12995
  • MODERATOR
4 years 1 week ago #315915

Hi,

Yes it's possible. You can use a filter to process only variants, a second one to limit the elements only to a particular category, and then an action "update the values" on the column price.price_value.

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

  • Posts: 141
  • Thank you received: 3
4 years 1 week ago #315978

Hi Nicolas, Thank you for the information. I have tried to process as you proposed but the results are not as expected.

I have characteristic: Format
This characteristic has three variants: Format_A, Format_B, Format_C
I have three products assigned to category: ABC with category_id 132
All these products have been assigned to characteristic Format and all have three variants (Format_A, Format_B, Format_C) with different prices.

I setup mass actions as following:

Data – Product

Filters:
Characteristics
Format LIKE Format_B
and
Category columns
Category_id=132

Actions
Update the values
price_value INT 50

I have expected to change the price of Format_B variant to value 50 for all products assigned to Category_id=132. So for all above products I should get new price equal to 50 only for Format_B variants.

Instead of above price was changed only for one product but for all variants: Format_A, Format_B, Format_C and additionally appeared a price in back-end product card (block “price and taxes”) set also as 50 – before mass action there was no price directly in product card (block “price and taxes”) and prices were assigned only to the Variants.

Regards,
Greg

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

  • Posts: 81182
  • Thank you received: 12995
  • MODERATOR
4 years 1 week ago #315992

Hi,

If you use a filter on "characteristics" then you're targeting the main product.
You're asking to do the action on the products with a variant with the format_B value selected for that format characteristic, and not to do the action of the variants with the format_B value selected for that format characteristic.
That's why you got that result.
You didn't specify that you wanted to filter the variants for only one characteristic value.
In that case, I would recommend using a filter on a product column instead of the "characteristics" filter.
For example, if the product_code of the variants end with the id of the value, you could have a filter on the product_code containing _X where X is the id of the value.

The following user(s) said Thank You: Greg_C

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

  • Posts: 141
  • Thank you received: 3
4 years 1 week ago #315994

Hi Nicolas, thank you for clarification
it works !

Regards,
Greg

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

Time to create page: 0.062 seconds
Powered by Kunena Forum