Skip to content

price_product_regular

The price_product_regular macro is used to render a single regular price for a given product. Internally it's just a price_base macro with additional styling.

Definition

{% price_product_regular(price, label = '') %}

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_regular.twig" import price_product_regular %}

{{ price_product_regular('$12.34', 'Price:') }}

Macro source code

{% macro price_product_regular(price, label = '')  %}
    {% from "@macros/price_base.twig" import price_base %}

    {{
        price_base(price, label, {
            price: 'price_l',
            priceValue: 'price__value_bold js__price-value'
        })
    }}
{% endmacro %}

Macros reference