{% extends "template.html.twig" %} {% block content %} {% cache 'list_' ~ listType %} {% if listType starts with 'category_' %} {{ renderCategoryTree(categoryTree, category) | raw }} {% endif %} {% if listType starts with 'promos' %} {% for promo in promos %} PROMO: {{ promo.tag }} {% endfor %} {% endif %} {% if (listType starts with 'category_' and category == null) or not (listType starts with 'category_') or (listType starts with 'category_' and category is not null) %}
| Name | Categories | Lowest Price | Current Price | ||||
|---|---|---|---|---|---|---|---|
| {% if product.starred == true %}★{% else %} ☆ {% endif %} | {{ product.name }} {% if product.stock > 0 %} stock: {{ product.stock }} {% else %} out of stock {% endif %} {% if product.isDiscontinued() %} is discontinued {% endif %} {% if product.isNew() %} is new {% endif %} {{ product.subTitle }} {% if product.promotions is not null and product.promotions.hasPromotion %}PROMO: {{ product.promotions.tag }}{% endif %} | link | {% if product.isDiscontinued() or product.priceCurrent == product.productStandardPrice %} {{ product.priceLowest | format_currency(product.country.currency, {}, product.country.locale) }} {% else %} {% if product.priceLowest != product.priceCurrent %}{{ product.priceLowest | format_currency(product.country.currency, {}, product.country.locale) }}{% else %} now lowest{% endif %} | {% endif %}{{ product.priceCurrent | format_currency(product.country.currency, {}, product.country.locale) }} |
{% if product.priceCurrent != product.productStandardPrice %}{{ product.productStandardPrice | format_currency(product.country.currency, {}, product.country.locale) }}
{{ ((1 - product.priceCurrent / product.productStandardPrice)*100)|number_format(0) }}%
{% endif %}
|