Mass action update specific prices

  • Posts: 1055
  • Thank you received: 11
  • Hikashop Business
3 years 5 months ago #333248

-- HikaShop version -- : 4.4.3
-- Joomla version -- : 3.9.27

Hi,

I would like to update the prices of some products and i need some help!
The products are from one specific category and their price is 16.06 € including tax, what i need to do is decrease their price to 12,95 € including tax.
Could you please help me do that?

Thank you

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
3 years 5 months ago #333250

Hi,

You don't need a mass action anymore to do that.
A simpler solution is to go in your products listing in the backend and click on the category in the left explorer. Make sure you have all the products on the page and click on the main checkbox at the top left corner of the listing to select all the products of that category.
Once done, click on the "actions" button at the top.
That will open a popup. There, select the action "update the values" and select the price_value column. Select the type "float" and enter in the input field the value 12.95
Then, validate and that's it.

Please note that this supposes that the products already have their price with taxes in the database.
If that's not the case, then you need to first calculate the price without taxes that you want to user instead of 12.95 in the input field of the popup.

The following user(s) said Thank You: verzevoul

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

  • Posts: 28
  • Thank you received: 3
  • Hikashop Business
2 years 8 months ago #340075

Hi there
I have a similar question - BUT: I have to chnge prices of variants, in two currencies: I have 10 products in a specific category, each with 20 variants with different prices, depending on a characteristic. I want to set new prices for all variants with the same characteristic (the size in this case) for all products in the category - that means: a new price in CHF and a new price in EUR. How can I do that?

Thanks, Alexandra

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
2 years 8 months ago #340088

Hi,

You can't do it with an "update the values" action, as it will set the same price for both currencies.
And you can't also select some variants of a product based on a characteristic value with the mass actions system.
So you would have to directly run a complex MySql query in your PHPMyAdmin.
Something like that :

UPDATE #__hikashop_product as p
LEFT JOIN #__hikashop_product as pp ON pp.product_id = p.product_id
LEFT JOIN #__hikashop_product_category as pc ON pp.product_id = pc.product_id
LEFT JOIN #__hikashop_category as cat ON pc.category_id = cat.category_id
LEFT JOIN #__hikashop_price as price ON p.product_id = price.price_product_id
LEFT JOIN #__hikashop_currency as currency ON price.price_currency_id = currency.currency_id
LEFT JOIN #__hikashop_variant AS v ON p.product_id = v.variant_product_id
LEFT JOIN #__hikashop_characteristic AS c ON c.characteristic_id = v.variant_characteristic_id
SET price_value = XXX
WHERE cat.category_name = 'YYY'
AND c.characteristic_value = 'ZZZ'
AND currency.currency_code = 'AAA'
where XXX is the new price, YYY the name of the category, ZZZ the value of the characteristic, AAA the currency code AND #__ the table prefix of your website.
Note that I didn't test it...
If it's a one time thing and you only have a few products with a few variants to modify, I would recommend to simply modify them via the interface provided in the backend of HikaShop.

Last edit: 2 years 8 months ago by nicolas.

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

Time to create page: 0.069 seconds
Powered by Kunena Forum