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:
luklpz 2026-05-17 17:43:10 +02:00
parent 60dba82f32
commit 83bd37efa9
1 changed files with 1 additions and 0 deletions

View File

@ -74,6 +74,7 @@ public class PrestashopClient {
.queryParam("output_format", "JSON")
.queryParam("display", "full")
.queryParam("filter[reference]", exactRef)
.queryParam("filter[active]", "[1]")
.build())
.retrieve()
.body(PrestashopProductDto.ListResponse.class);