Cross-Sell Variables

This page defines all properties available for a cross-sell.

Variable Usage
crossSell.id Returns the id for an cross-sell.
{% for crossSell in product.crossSells %}
    {{ crossSell.id }}
{% endfor %}
crossSell.base_price Returns the base price for an cross-sell (before discounts applied, if applicable).
{% for crossSell in product.crossSells %}
    {{ crossSell.base_price }}
{% endfor %}
crossSell.price Returns the total price for a cross-sell.
{% for crossSell in product.crossSells %}
    {{ crossSell.price }}
{% endfor %}
crossSell.name Returns the name of the cross-sell.
{% forcrossSell in product.crossSells %}
    {{ crossSell.name }}
{% endfor %}
crossSell.url_name Returns the URL name of the cross-sell. Example shows full path to cross-sell product.
{% for crossSell in product.crossSells %}
    {{ site_url('/product') }}/{{ crossSell.url_name }}
{% endfor %}
crossSell.sku Returns the sku for the cross-sell.
{% for crossSell in product.crossSells %}
    {{ crossSell.sku }}
{% endfor %}
crossSell.parentProduct Returns the parent product of the cross-sell.
{% for crossSell in product.crossSells %}
    {% set parent = crossSell.parentProduct %}
{% endfor %}
crossSell.product Returns the cross-sell product.
{% for crossSell in product.crossSells %}
    {% set product = crossSell.product %}
{% endfor %}
crossSell.variant Returns the cross-sell variant.
{% for crossSell in product.crossSells %}
    {% set variant = crossSell.variant %}
{% endfor %}