Catálogos de proveedores

Cómo ocultar oldprice cuando es igual a price en YML

2026-06-29
Tarea

En un YML, algunos productos tienen oldprice igual a price o vacío. Ese precio antiguo no debe exportarse.

Respuesta corta

Abra oldprice y agregue dos condiciones: oldprice no está vacío y oldprice no es igual a {/yml_catalog/shop/offers/offer/price}.

Cómo hacerlo en Eofferix

  1. En el snapshot XML/YML, seleccione el valor oldprice.

  2. Abra la configuración del valor.

    Apertura de valor
    La animación muestra la configuración del valor seleccionado.
  3. Agregue una condición de exportación sobre oldprice: oldprice no está vacío y oldprice no es igual a {/yml_catalog/shop/offers/offer/price}.

    Condición de valor
    Así Eofferix toma el valor solo del bloque repetido necesario.

Antes / después

Antes

datos de origen
<yml_catalog date="2026-06-29 10:00">
  <shop>
    <offers>
      <offer id="YML-17001">
        <name>Lampara Alba</name>
        <price>1290.00</price>
        <oldprice>1490.00</oldprice>
        <currencyId>EUR</currencyId>
      </offer>
      <offer id="YML-17002">
        <name>Sillon Costa</name>
        <price>8400.00</price>
        <oldprice>8400.00</oldprice>
        <currencyId>EUR</currencyId>
      </offer>
      <offer id="YML-17003">
        <name>Estante Norte</name>
        <price>990.00</price>
        <oldprice>
        </oldprice>
        <currencyId>EUR</currencyId>
      </offer>
    </offers>
  </shop>
</yml_catalog>

Después

resultado
<yml_catalog date="2026-06-29 10:00">
  <shop>
    <offers>
      <offer id="YML-17001">
        <name>Lampara Alba</name>
        <price>1290.00</price>
        <oldprice>1490.00</oldprice>
        <currencyId>EUR</currencyId>
      </offer>
      <offer id="YML-17002">
        <name>Sillon Costa</name>
        <price>8400.00</price>
        <currencyId>EUR</currencyId>
      </offer>
      <offer id="YML-17003">
        <name>Estante Norte</name>
        <price>990.00</price>
        <currencyId>EUR</currencyId>
      </offer>
    </offers>
  </shop>
</yml_catalog>

Procesa datos más rápido con Eofferix

Crea una cuenta gratis para automatizar catálogos y listas de precios según tus reglas.

Registrarse