Skip to main content

Product sale elements

Product sale elements loop lists product sale elements from your shop. You may need to use the attribute combination loop inside your product sale elements loop.
{loop type="product_sale_elements" name="the-loop-name" [argument="value"], [...]}

Arguments

ArgumentDescriptionDefaultExample
currencyA currency idcurrency="1"
defaultA boolean value. If true, returns only the default product sale elements. If false, the default product sale element is not returneddefault="yes"
idA comma separated list of product sale elements id. Mandatory if the 'product' parameter is not presentid="1,3,8"
newA boolean value. If true, returns only product sale elements for which promo is on. The reverse with 'false'new="yes"
orderA list of values see sorting possible valuesrandomorder="promo,min_price"
productA single product id. Mandatory if the 'id' parameter is not presentproduct="2"
promoA boolean value. If true, returns only product sale elements for which new is on. The reverse with 'false'promo="yes"
visibleA boolean value, or * (the default) for ignoring this filter*visible="no"

Plus the global arguments and search arguments

Outputs

VariableValue
$EAN_CODEthe product sale element EAN Code
$IDthe product sale element id
$IS_DEFAULTreturns if the product sale element is the default product sale element for the product
$IS_NEWreturns if the product sale element is new
$IS_PROMOreturns if the product sale element is in promo
$PRICEthe product sale element price
$PRICE_TAXthe product sale element price tax
$PRODUCT_IDthe related product id
$PROMO_PRICEthe product sale element promo price
$PROMO_PRICE_TAXthe product sale element promo price tax
$QUANTITYthe product sale element stock quantity
$REFthe product sale element reference
$TAXED_PRICEthe product sale element taxed price
$TAXED_PROMO_PRICEthe product sale element taxed promo price
$WEIGHTthe product sale element weight

Plus the global outputs

Examples

I want to display all products sale elements for current product and show all the attribute combinations which matched it.

{loop name="pse" type="product_sale_elements" product="$PRODUCT_ID"}
<div>
{loop name="combi" type="attribute_combination" product_sale_elements="$ID"}
{$ATTRIBUTE_ID}. {$ATTRIBUTE_TITLE} = {$ATTRIBUTE_AVAILABILITY_ID}. {$ATTRIBUTE_AVAILABILITY_TITLE}<br />
{/loop}
<br />{$WEIGHT} g
<br /><strong>{if $IS_PROMO == 1} {$PROMO_PRICE} € (instead of {$PRICE}) {else} {$PRICE}{/if}</strong>
<br /><br />
Add
<select>
{for $will=1 to $QUANTITY}
<option>{$will}</option>
{/for}
</select>
to my cart
</div>
{/loop}

Order possible values

Arguments

Ascending valueDescending valueSorted fields
idid_reverseId
max_pricemin_pricePrice
newnew products first
promopromo products first
quantityquantity_reversequantity
random
refref_reversereference
weightweight_reverseweight