price_product_inactive¶
The price_product_inactive
macro is used to render a single inactive price for a given product. 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_inactive.twig" import price_product_inactive %}
{{ price_product_inactive('$12.34', 'Price:') }}
Macro source code¶
{% macro price_product_inactive(price, label = '', classNames = {}) %}
{% from "@macros/price_base.twig" import price_base %}
{{
price_base(price, label, {
price: 'price_s',
priceValue: 'price__value_inactive js__price__value_inactive',
})
}}
{% endmacro %}