Skip to main content

How could I remove price for products?

More
9 years 11 months ago #252131 by progreccor
-- 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.

More
9 years 11 months ago #252141 by nicolas
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.

More
9 years 11 months ago #252325 by progreccor
there is small mistake in your query:
Code:
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.

More
2 years 1 week ago #363294 by oxido
How to delete multiple prices for multiple products of the same category by specifying the category ID, but keeping the main price
Code:
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.244 seconds
Powered by Kunena Forum