src/Develey/BornBundle/Resources/views/Product/listByProductCategoryId.html.twig line 16

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.                     "shopHandlerProductDetailBorn"
  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 class="delivery-cost-hint">{{ 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']) }} / {{ 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" style="padding-top:13px"/>
  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" style="margin:0">
  96.                                                                 {{ 'Add to Cart'|trans }}
  97.                                                             </button>
  98.                                                         </div>
  99.                                                     </div>
  100.                                                     {% for message in app.flashes('error') %}
  101.                                                         {% if message.message %}
  102.                                                             {% if message.id == product.id %}
  103.                                                                 <div class="error-message inline">
  104.                                                                     {{ message.message }}
  105.                                                                 </div>
  106.                                                             {% endif %}
  107.                                                         {% else %}
  108.                                                             <div class="error-message inline">
  109.                                                                 {{ message }}
  110.                                                             </div>
  111.                                                         {% endif %}
  112.                                                     {% endfor %}
  113.                                                     {% if enabledWebsiteFeatures is defined and enabledWebsiteFeatures['sidebarCart'] is defined and enabledWebsiteFeatures['sidebarCart'] == true %}
  114.                                                         <div class="error-messages-container error-message" data-product-id="{{ product['id'] }}" style="display: none;"></div>
  115.                                                     {% endif %}
  116.                                                 </form>
  117.                                                 {% if product['priceOld'] and product['minimumPrice30DaysAllCountries'][country] is defined and product['minimumPrice30DaysAllCountries'][country] %}
  118.                                                     <div style="font-size: 12px; margin: 8px 4px;">
  119.                                                         {{ 'minPriceLast30Days' | trans }} {{ currency.toCurrency(product['minimumPrice30DaysAllCountries'][country]) }}
  120.                                                     </div>
  121.                                                 {% endif %}
  122.                                             </div>
  123.                                         </div>
  124.                                     {% else %}
  125.                                         {% if (product['deliverability'] == 'unavailable') %}
  126.                                             <div class="product-ability" style="margin:-5px 0 -9px">
  127.                                                 <small>{{ product['deliverability'] |trans }}</small>
  128.                                             </div>
  129.                                         {% endif %}
  130.                                         <div class="product-action-wrapper">
  131.                                             {% include 'Partials/productStockInformCustomer.html.twig' with {'backUrl': uri, 'user': user, 'product': product, 'productStockInformCustomerData': productStockInformCustomerData[product['pimId']]} %}
  132.                                         </div>
  133.                                     {% endif %}
  134.                                 </div>
  135.                             </div>
  136.                         </div>
  137.                     </div>
  138.                 </div>
  139.             {% endfor %}
  140.         </div>
  141.     </div>
  142. {% endblock %}