How could I remove price for products?

  • Posts: 2293
  • Thank you received: 315
8 years 2 months ago #252131

-- HikaShop version -- : 2.6.4

I need to set prices for variants.
At this time I have prices for products but thats wrong.
Could I remove prices for products and keep prices for variants?


Я не явлюсь официальной службой поддержки!
Я здесь добровольно!

Хочешь получить купон на скидку Hikashop? Спроси меня как!

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

  • Posts: 83022
  • Thank you received: 13403
  • MODERATOR
8 years 2 months ago #252141

Hi,

There is no mass action to remove prices. So you would either have to do it one by one through the interface, or with a MySQL query in your PHPMyAdmin. Something like that:
DELETE * FROM #__hikashop_price WHERE price_product_id IN (SELECT product_id FROM #__hikashop_product WHERE product_parent_id = 0);
That will remove all the prices of the main products on your website whether they have variants or not but won't change the prices of the variants.

The following user(s) said Thank You: progreccor

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

  • Posts: 2293
  • Thank you received: 315
8 years 2 months ago #252325

there is small mistake in your query:

DELETE FROM #__hikashop_price WHERE price_product_id IN (SELECT product_id FROM #__hikashop_product WHERE product_parent_id = 0);

there is not need for the * in this query ;-)

but thank you for your support. This is why I love hika!


Я не явлюсь официальной службой поддержки!
Я здесь добровольно!

Хочешь получить купон на скидку Hikashop? Спроси меня как!
The following user(s) said Thank You: Mohamed Thelji

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

  • Posts: 231
  • Thank you received: 28
  • Hikashop Business
3 months 4 days ago #363294

How to delete multiple prices for multiple products of the same category by specifying the category ID, but keeping the main price

DELETE p
FROM #__hikashop_price p
JOIN #__hikashop_product_category pc ON p.price_product_id = pc.product_id
WHERE pc.category_id = 39
AND p.price_min_quantity > 0;

The following user(s) said Thank You: nicolas

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

Time to create page: 0.069 seconds
Powered by Kunena Forum