Skip to content

Price engine templates

Catalog/Subrequests/product.html.twig

This template is used on product detail page. It defines the parameters for price rendering and includes the product_price.html.twig template.

Catalog/listProductNode.html.twig

This template is used on product detail page. It defines the parameters for price rendering and includes the product_price.html.twig template.

Catalog/Subrequests/product_price.html.twig

This is a common template for rendering the price, displaying a label about the price type (e.g. list price) and the price source (e.g. ERP).

It includes PriceField.html.twig to render the price.

Accepted parameters

1
2
3
4
5
6
7
'renderParams': renderParams


'labelParams': labelParams 


'displaySource' : true

Setting the parameters

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
{% set labelParams = {
 'priceRange' : {
 'cssClass': 'right_align block',
 'show': true
 },
 'customerPrice': {
 'show': true
 },
 'listPrice': {
 'show': true
 }
 }
%}

Fieldtypes/PriceField.html.twig

This template renders the given price from catalog element, see ses_render_price.

Accepted parameters

'params' : renderParams

Setting the parameters

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
{% set renderParams = {
 'outputPrice': {
 'cssClass': 'price price_med',
 'property': priceProperty
 },
 'vatLabel': {
 'cssClass': 'price',
 'show': true,
 'text': priceLabel
 }
 }
%}
Twig filter Description Usage
shipping Gets the list of shipping costs from the basket {% set shippingCosts = basket|shipping %}
basket_discounts Gets the list of discounts from the basket {% set discounts = basket|basket_discounts %}
basket_add_costs Gets the list of additional costs from the basket {% set addCosts = basket|basket_add_costs %}
basket_add_lines Gets the list of additional lines from the basket {% set addLines = basket|basket_add_lines %}
Twig function Description Usage
price_format Formats a price value {{ priceValue|price_format(currency, locale) }}
ses_render_price Renders a PriceField from CatalogElement {{ ses_render_price(catalogElement, minPrice, { 'outputPrice': {'cssClass': 'price price_med'} }) }}
Read the Docs