Jump to content

Advanced stock management through webservice


asmoo252

Recommended Posts

Hi,

 

I am currently integrating Presta Shop with other system and i am using web service.

 

Shop is using advanced stock management and i have certain problem. I need to be able to change setting of all products to sue the following setup:

 

Yes I want to use the advanced stock management system for this product

Yes Available quantities for current product and its combinations are based on stock in the warehouses

No I want to specify available quantities manually

 

I know that first check box can be done but updating this field in product xml

 

<advanced_stock_management>

 

however i don't know how can i switch option from "I want to specify available quantities manually" to "Available quantities for current product and its combinations are based on stock in the warehouses" using web services.

 

1. Does anyone knows how to do this?

2. Or maybe some other way how to mass-change this options for all products on shop?

3. Is it possible to set this option when importing products from csv?

Edited by asmoo252 (see edit history)
Link to comment
Share on other sites

  • 1 month later...
  • 4 months later...

Just in case anybody is still looking for this, the relevant fields are in

/ps/api/stock_availables

<prestashop xmlns:xlink="http://www.w3.org/1999/xlink">
<stock_available>
<id_product required="true" format="isUnsignedId"/>
<id_product_attribute required="true" format="isUnsignedId"/>
<id_shop format="isUnsignedId"/>
<id_shop_group format="isUnsignedId"/>
<quantity required="true" format="isInt"/>
<depends_on_stock required="true" format="isBool"/>
<out_of_stock required="true" format="isInt"/>
</stock_available>
</prestashop>

 

An entry is created with product_attribute of 0 for items without such attributes.

Link to comment
Share on other sites

  • 8 months later...

Just in case anybody is still looking for this, the relevant fields are in

/ps/api/stock_availables

<prestashop xmlns:xlink="http://www.w3.org/1999/xlink">
<stock_available>
<id_product required="true" format="isUnsignedId"/>
<id_product_attribute required="true" format="isUnsignedId"/>
<id_shop format="isUnsignedId"/>
<id_shop_group format="isUnsignedId"/>
<quantity required="true" format="isInt"/>
<depends_on_stock required="true" format="isBool"/>
<out_of_stock required="true" format="isInt"/>
</stock_available>
</prestashop>
An entry is created with product_attribute of 0 for items without such attributes.

 

 

Do you know what other values can be used?

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...