Supplier catalogs

How to remove YML offers with zero price

2026-06-29
Task

The supplier keeps YML products where price is 0 or empty. These items should not enter the import.

Short answer

Add export conditions to offer: price is not empty and price is greater than 0. If you need a variant without numeric comparison, use price is not empty and price is not equal to 0. Regular expression ^(?:[1-9][0-9]*(?:[,.][0-9]+)?|0[,.][0-9]*[1-9][0-9]*)$ matches a positive number and is needed only for a strict format check.

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 settings for the repeated product node.
  3. Method 1, first row: add condition price Is not empty.

    Export condition
    This is one condition variant; the other variants do not need to be added.
  4. Method 1, second row: add condition price Greater than 0.

    Export condition
    This is one condition variant; the other variants do not need to be added.
  5. Method 2: without numeric comparison, use price Not equal 0 together with the Is not empty check.

    Export condition
    This is one condition variant; the other variants do not need to be added.
  6. Method 3: use regular expression ^(?:[1-9][0-9]*(?:[,.][0-9]+)?|0[,.][0-9]*[1-9][0-9]*)$ (matches a positive number: an integer part greater than zero or a 0.xx decimal with a non-zero decimal part) for strict format checking.

    Export condition
    This is one condition variant; the other variants do not need to be added.

Before / after

Before

source data
<yml_catalog date="2026-06-29 10:00">
  <shop>
    <offers>
      <offer id="YML-12001" available="true">
        <name>Hudson lamp</name>
        <price>1290.00</price>
        <currencyId>USD</currencyId>
      </offer>
      <offer id="YML-12002" available="true">
        <name>Parker chair</name>
        <price>0</price>
        <currencyId>USD</currencyId>
      </offer>
      <offer id="YML-12003" available="true">
        <name>Harbor shelf</name>
        <price>
        </price>
        <currencyId>USD</currencyId>
      </offer>
    </offers>
  </shop>
</yml_catalog>

After

result
<yml_catalog date="2026-06-29 10:00">
  <shop>
    <offers>
      <offer id="YML-12001" available="true">
        <name>Hudson lamp</name>
        <price>1290.00</price>
        <currencyId>USD</currencyId>
      </offer>
    </offers>
  </shop>
</yml_catalog>

Process data faster with Eofferix

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

Sign up