Jump to content

Updating all products to advanced stock management


Recommended Posts

Hi all,

 

I've been searching the forums but cant find an answer. Hope someone can point me in the right direction! Thanks in advance :-)

 

I'm using the advanced stock management feature. But most of my products are still in manual stock. How can I update all products to advanced / based on warehouse data?

Ive tried changed the database, but it didnt work! Still on manual..

UPDATE `ps_product`
SET `advanced_stock_management` = '1'

 

 

Version: PrestaShop™ 1.5.6.2

Link to comment
Share on other sites

  • 7 months later...

Hi,

 

Take a look on: StockAvailable::setProductDependsOnStock

 

Using this you can figure out queries.

 

I used following:

-- enable asm on all products
update ps_product_shop
set advanced_stock_management = 1;

-- insert into ps_stock_available 
insert into 
ps_stock_available (id_product, id_product_attribute, id_shop, id_shop_group, quantity, depends_on_stock, out_of_stock)
select 
id_product, id_product_attribute, 2, id_shop_group, quantity, depends_on_stock, out_of_stock
from ps_stock_available
Edited by gloomybear (see edit history)
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...