price_product_tile_special¶
The price_product_tile_special
macro is used to render a single special price on a product tile. Internally it's just a price_base macro with additional styling.
Definition¶
Input parameters¶
price¶
string
represents a price to render.
label¶
string
if set, an additional price label will be displayed.
Example¶
In this example we render a price with a label.
{% from "@macros/price_product_tile_special.twig" import price_product_tile_special %}
{{ price_product_tile_special('$12.34', 'Price:') }}
Macro source code¶
{% macro price_product_tile_special(price, label = '') %}
{% from "@macros/price_special.twig" import price_special %}
{{
price_special(price, label, {
priceValue: 'price__value_bold js__special-offer-price-value'
})
}}
{% endmacro %}