Jump to content

SQL query to assign quantity 0 to a selection of products


zklid

Recommended Posts

Hi, could you help me figure out which query I need to use to do this:


assign quantity 0 to all products that have inactive status in the prestashop catalog.


I use prestashop 1.6.
Thanks to those who will help me

Link to comment
Share on other sites

On 7/8/2023 at 6:01 AM, ps8moduly.cz said:

Hi,

UPDATE ps_stock_available t1
INNER JOIN ps_product AS t2 ON t2.id_product = t1.id_product
SET t1.quantity = 0 
WHERE t2.active = 0;

 

Thanks for your help. I have only one doubt regarding the main table of products in prestashop 1.6:
the table to take into consideration is ps_product (like you did) or ps_product_shop?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...