fix: add required depends_on_stock field to stock_available XML body

PS WebService PUT /stock_availables requires depends_on_stock even when
updating only the quantity. Hard-coded to 0 (does not depend on warehouse).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
luklpz 2026-05-14 23:35:22 +02:00
parent 96d75b324a
commit 4ae72e3e05
1 changed files with 1 additions and 0 deletions

View File

@ -255,6 +255,7 @@ public class PrestashopClient {
String idAttr = dto.idProductAttribute() != null ? dto.idProductAttribute() : "0";
sb.append("<id_product_attribute>").append(idAttr).append("</id_product_attribute>");
sb.append("<quantity>").append(dto.quantity()).append("</quantity>");
sb.append("<depends_on_stock>0</depends_on_stock>");
sb.append("</stock_available>");
sb.append("</prestashop>");
return sb.toString();