fix: filter only active products in getProductByReference
PS soft-deletes products (sets active=0) when deleted from admin, keeping them in the DB. The previous filter returned those inactive products, causing pushProduct to take the UPDATE path and silently re-update a soft-deleted product that remains invisible. Adding filter[active]=[1] ensures only visible products are matched. Products deleted in PS are now correctly re-created on next sync. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
60dba82f32
commit
83bd37efa9
|
|
@ -74,6 +74,7 @@ public class PrestashopClient {
|
||||||
.queryParam("output_format", "JSON")
|
.queryParam("output_format", "JSON")
|
||||||
.queryParam("display", "full")
|
.queryParam("display", "full")
|
||||||
.queryParam("filter[reference]", exactRef)
|
.queryParam("filter[reference]", exactRef)
|
||||||
|
.queryParam("filter[active]", "[1]")
|
||||||
.build())
|
.build())
|
||||||
.retrieve()
|
.retrieve()
|
||||||
.body(PrestashopProductDto.ListResponse.class);
|
.body(PrestashopProductDto.ListResponse.class);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue