Supplier catalogs

How to hide oldprice when it equals price in YML

2026-06-29
Task

In a YML feed, some products have oldprice equal to price or empty. That old price should not be exported.

Short answer

Open oldprice and add two conditions: oldprice is not empty and oldprice is not equal to {/yml_catalog/shop/offers/offer/price}.

How to do it in Eofferix

  1. In the XML/YML snapshot, select the oldprice value.

  2. Open the value settings.

    Opening value settings
    The animation shows opening settings for the selected value.
  3. Add an export condition on oldprice: oldprice is not empty and oldprice does not equal {/yml_catalog/shop/offers/offer/price}.

    Value condition
    This makes Eofferix take the value only from the needed repeated block.

Before / after

Before

source data
<yml_catalog date="2026-06-29 10:00">
  <shop>
    <offers>
      <offer id="YML-17001">
        <name>Hudson lamp</name>
        <price>1290.00</price>
        <oldprice>1490.00</oldprice>
        <currencyId>USD</currencyId>
      </offer>
      <offer id="YML-17002">
        <name>Parker chair</name>
        <price>8400.00</price>
        <oldprice>8400.00</oldprice>
        <currencyId>USD</currencyId>
      </offer>
      <offer id="YML-17003">
        <name>Harbor shelf</name>
        <price>990.00</price>
        <oldprice>
        </oldprice>
        <currencyId>USD</currencyId>
      </offer>
    </offers>
  </shop>
</yml_catalog>

After

result
<yml_catalog date="2026-06-29 10:00">
  <shop>
    <offers>
      <offer id="YML-17001">
        <name>Hudson lamp</name>
        <price>1290.00</price>
        <oldprice>1490.00</oldprice>
        <currencyId>USD</currencyId>
      </offer>
      <offer id="YML-17002">
        <name>Parker chair</name>
        <price>8400.00</price>
        <currencyId>USD</currencyId>
      </offer>
      <offer id="YML-17003">
        <name>Harbor shelf</name>
        <price>990.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