src/Develey/TabascoBundle/Resources/views/Product/listByProductCategoryId.html.twig line 1

Open in your IDE?
  1. {% extends 'pageTemplateDefault.html.twig' %}
  2. {% block content %}
  3.     {{ pimcore_areablock("content", {
  4.         "allowed": ["Breadcrumb", "MainStage", "MainStageCarousel", "StageSpecific", "StageFlat"],
  5.         "group": {
  6.             "Stage Variationen": ["Breadcrumb", "MainStage", "MainStageCarousel", "StageSpecific", "StageFlat"]
  7.         }
  8.     }) }}
  9.     <div class="section">
  10.         <div class="main-content flex-col product-list-view">
  11.             {% for productkey, product in products %}
  12.                 {% set detailViewUri    = pimcore_url(
  13.                 {
  14.                 "name": product.urlTitle,
  15.                 "articlenumber": product.articleNumber
  16.                 },
  17.                 "shopHandlerProductDetail"
  18.                 ) %}
  19.                 {% set price = product['osPrice'] %}
  20.                 {% set currency = price.getCurrency() %}
  21.                 <div class="col xs-12 m-6 l-4">
  22.                     <div class="teaser image-text product">
  23.                         <div class="teaser-content bb-flex-col">
  24.                             <div class="image">
  25.                                 <a href="{{ detailViewUri }}">
  26.                                     <img src="{{ product.thumbnailUrl }}"
  27.                                          alt="{{ product.thumbnailAlt }}"/>
  28.                                 </a>
  29.                             </div>
  30.                             <div class="teaser-text-box bb-flex-1 bb-flex-col">
  31.                                 <div class="title-box">
  32.                                     <h4>
  33.                                         <a href="{{ detailViewUri }}">{{ product.name |trademark }}</a>
  34.                                     </h4>
  35.                                 </div>
  36.                                 <div class="content-box product-price-container bb-flex-col bb-space-between-grow-1-i">
  37.                                     <div>
  38.                                         <div class="product-price">
  39.                                             {% if product['cachedPrice'] is defined %}
  40.                                                 {{ product['cachedPrice'] }}
  41.                                             {% else %}
  42.                                                 {{ product['price'] }}
  43.                                             {% endif %}
  44.                                             {% if (product['priceOld'] != 0 and product['priceReference'] != product['priceOld']) %}
  45.                                                 <span class="product-price old">
  46.                                             &nbsp;{{ product['priceOld'] |number_format(2, ',', '.') }} {{ '€' |trans }}
  47.                                         </span>
  48.                                             {% endif %}
  49.                                         </div>
  50.                                         {% if product['isProductFood'] %}
  51.                                             <div class="product-price-additional">
  52.                                                 {% if(product['hasVariants']) %}
  53.                                                     <div class="product-variation-container">
  54.                                                         {{ 'Varianten vorhanden' |trans }}
  55.                                                     </div>
  56.                                                 {% else %}
  57.                                                     <div>({{ product['priceReference'] |number_format(2, ',', '.') }} {{ '€' |trans }} / {{ product['unit'] }})</div>
  58.                                                 {% endif %}
  59.                                                 <div>{{ product['deliveryCostHint'] }}</div>
  60.                                             </div>
  61.                                         {% elseif product['deliveryCostHint'] is defined and product['deliveryCostHint'] is not empty %}
  62.                                             <div class="product-price-additional">
  63.                                                 <div>{{ product['deliveryCostHint'] }}</div>
  64.                                             </div>
  65.                                         {% endif %}
  66.                                     </div>
  67.                                     {% if product['hasVariants'] %}
  68.                                         <div>
  69.                                             <a class="button btn-default bb-line-height-normal" href="{{ detailViewUri }}">{{ 'Variante wählen'|trans }}</a>
  70.                                         </div>
  71.                                     {% elseif product['deliverability'] == 'instant' %}
  72.                                         {% if product['hasVariants'] %}
  73.                                             <div style="font-size: 1.2rem; font-weight: normal; margin-top: 6px;">
  74.                                                 {{ product['priceOriginal'] }} &minus; {{ product['amountValue'] | number_format(0, ',', '.') }}&nbsp;{{ product['amountAbbreviation'] }}
  75.                                                 {% if product['priceReference'] is defined %}
  76.                                                     <br/>
  77.                                                     {% set currency = product['osPrice'].getCurrency() %}
  78.                                                     ({{ currency.toCurrency(product['priceReference']) }} / 100&nbsp;{{ product['amountAbbreviation'] }})
  79.                                                 {% endif %}
  80.                                             </div>
  81.                                         {% endif %}
  82.                                             <div class="product-action-wrapper text-center">
  83.                                                 <div style="display:inline-block">
  84.                                                     {% set jsSubmitClass = '' %}
  85.                                                     {% if enabledWebsiteFeatures is defined and enabledWebsiteFeatures['sidebarCart'] is defined and enabledWebsiteFeatures['sidebarCart'] == true %}
  86.                                                         {% set jsSubmitClass = 'js-submit-ajax' %}
  87.                                                     {% endif %}
  88.                                                     <form method="post" class="{{ jsSubmitClass }}" action="{{ pimcore_url({"action": "add"}, "shopHandlerCart") }}">
  89.                                                         <div class="product-action-container" style="margin-top: 20px;">
  90.                                                             <div class="product-quantity">
  91.                                                                 <input class="product-quantity-w-min" type="number" name="quantity" min="1" value="1"/>
  92.                                                                 <input type="hidden" name="article" value="{{ product['articleNumber'] }}">
  93.                                                             </div>
  94.                                                             <div class="product-action-button">
  95.                                                                 <button class="button btn-default bb-line-height-normal">
  96.                                                                     {{ 'Add to Cart'|trans }}
  97.                                                                 </button>
  98.                                                             </div>
  99.                                                         </div>
  100.                                                         {% for message in app.flashes('error') %}
  101.                                                             <div class="error-message inline">
  102.                                                                 {{ message }}
  103.                                                             </div>
  104.                                                         {% endfor %}
  105.                                                         {% if enabledWebsiteFeatures is defined and enabledWebsiteFeatures['sidebarCart'] is defined and enabledWebsiteFeatures['sidebarCart'] == true %}
  106.                                                             <div class="error-messages-container error-message" style="display: none;"></div>
  107.                                                         {% endif %}
  108.                                                     </form>
  109.                                                     {% if product['priceOld'] and product['minimumPrice30DaysAllCountries'][country] is defined and product['minimumPrice30DaysAllCountries'][country] %}
  110.                                                         <div style="font-size: 12px; margin: 8px 4px;">
  111.                                                             {{ 'minPriceLast30Days' | trans }} {{ currency.toCurrency(product['minimumPrice30DaysAllCountries'][country]) }}
  112.                                                         </div>
  113.                                                     {% endif %}
  114.                                                 </div>
  115.                                             </div>
  116.                                     {% else %}
  117.                                         {% if (product['deliverability'] == 'unavailable') %}
  118.                                             <div class="product-ability" style="margin:-10px 0 -3px;color:#00833d">
  119.                                                 <small>{{ product['deliverability'] |trans }}</small>
  120.                                             </div>
  121.                                         {% endif %}
  122.                                         <div class="product-action-wrapper">
  123.                                             {% include 'Partials/productStockInformCustomer.html.twig' with {'backUrl': uri, 'user': user, 'product': product, 'productStockInformCustomerData': productStockInformCustomerData[product['pimId']]} %}
  124.                                         </div>
  125.                                     {% endif %}
  126.                                 </div>
  127.                             </div>
  128.                         </div>
  129.                     </div>
  130.                 </div>
  131.             {% endfor %}
  132.         </div>
  133.     </div>
  134. {% endblock %}