Task
An XML feed should export only offer elements with a filled picture element.
Short answer
Enable an element-level export condition on offer: the picture path must be not empty.
How to do it in Eofferix
- Open the XML snapshot and select the
offernode. - Set export scope to the whole element.
- Add a condition:
/catalog/offers/offer/pictureis not empty.
The condition is set on offer, so a product without an image is not exported at all. - Download a demo result and confirm that products without images are removed entirely.
What matters for the result
- Place the condition on
offer, not only onpicture; otherwise you may get an empty field instead of removing the product. - If XML contains several
pictureelements, check the path that is actually required by the marketplace. - After saving the template, run the transformation on the final step and verify that offers without images are gone entirely.
Before / after
The data below is a training example and does not belong to real user files.
Before
source data<offers>
<offer id="1001">
<picture>https://cdn.example.test/1001.jpg</picture>
</offer>
<offer id="1002">
<picture>
</picture>
</offer>
</offers>After
result<offers>
<offer id="1001">
<picture>https://cdn.example.test/1001.jpg</picture>
</offer>
</offers>