Supplier catalogs

How to remove YML offers with available="false"

2026-06-29
Task

Some YML products are marked with available="false". These items should be removed from the result while available offers stay.

Short answer

Add an export condition to offer: the @available attribute must match ^(true|1|yes)$ (matches a value that is exactly true, 1, or yes).

How to do it in Eofferix

  1. In the XML/YML snapshot, select the repeated offer node.

  2. Open the node settings.

    Opening offer settings
    The animation shows opening the repeated product node settings.
  3. Add an export condition for @available: @available ^(true|1|yes)$.

    Export condition on offer
    The condition is applied to the whole item.

Before / after

Before

source data
<yml_catalog date="2026-06-29 10:00">
  <shop>
    <offers>
      <offer id="YML-2001" available="true"><name>Hudson lamp</name><categoryId>101</categoryId><price>24.90</price></offer>
      <offer id="YML-2002" available="false"><name>Parker chair</name><categoryId>205</categoryId><price>139.00</price></offer>
      <offer id="YML-2003" available="true"><name>Harbor shelf</name><categoryId>101</categoryId><price>16.40</price></offer>
    </offers>
  </shop>
</yml_catalog>

After

result
<yml_catalog date="2026-06-29 10:00">
  <shop>
    <offers>
      <offer id="YML-2001" available="true"><name>Hudson lamp</name><categoryId>101</categoryId><price>24.90</price></offer>
      <offer id="YML-2003" available="true"><name>Harbor shelf</name><categoryId>101</categoryId><price>16.40</price></offer>
    </offers>
  </shop>
</yml_catalog>

What to keep in mind

  • In YML, available is usually an attribute, so use the path with @available.
  • If a supplier uses in_stock or on, extend the expression only after checking source values.

Process data faster with Eofferix

Create a free account to automate catalogs and price lists around your own rules.

Sign up