{% set spacingSelect %} {{ pimcore_checkbox("checkSpacing", { "reload": true }) }}{% endset %}{% set noSpacingTop = '' %}{% set brickAnchorId = '' %}{% if pimcore_checkbox('checkSpacing').isChecked() %} {% set noSpacingTop = 'no-offset-top' %}{% endif %}{% set UID = uniqid() %}{% if pimcore_input("brickAnchorIdInput") is not empty %} {% set brickAnchorId = pimcore_input("brickAnchorIdInput")|lowercase %}{% endif %}{% set hasSliderSelect %} {{ pimcore_select("hasSlider", { "store": [ ["has-slider", "Slider"], ["no-slider", "Listenansicht"] ] }) }}{% endset %}{% set colSelect %} {{ pimcore_select("cols", { "store": [ ["xs-12 full", "Full"], ["xs-12 m-6 half", "Half"], ["xs-12 m-6 l-4 one-third", "one-third"] ] }) }}{% endset %}{% set colsSelectResult = pimcore_select("cols").getData() %}{% set contentblock = pimcore_block('contentblock') %}{% if editmode %} <div class="flex-col offset-bottom-single"> <div class="col xs-12 m-6 l-3"> <span class="hint">{{ 'admin.brick.hint.anchorId' |trans }}</span> {{ pimcore_input("brickAnchorIdInput") }} </div> <div class="col xs-12 m-6 l-3"> <div class="select-items"> <div class="hint"> {{ 'admin.brick.hint.paddingTop' |trans }} </div> {{ spacingSelect }} </div> </div> <div class="col xs-12 m-6 l-3"> <span class="hint">{{ 'admin.brick.hint.selectCol' |trans }}</span> {{ colSelect }} </div> <div class="col xs-12 m-6 l-3"> <span class="hint">{{ ' admin.brick.hint.displayMode' |trans }}</span> {{ hasSliderSelect }} </div> </div>{% endif %}{% if editmode %}<div class="admin teaser-panel-row"> {% endif %} <div id="{{ brickAnchorId }}" class="section {{ noSpacingTop }}"> <div class="panel {% if editmode %} {% else %}{{ pimcore_select("hasSlider").getData() }} {% endif %}{% if colsSelectResult == 'xs-12 m-6 half' %}half{% elseif colsSelectResult == 'xs-12 full' %}full{% else %}one-third{% endif %}"> <div class="main-content"> <div class="panel-container"> <div class="panel-content"> <div class="flex-col panel-slider"> {% for i in pimcore_iterate_block(contentblock) %} {% set productLink = pimcore_href("selectProduct").getElement() %} {% if editmode %} <div class="col"> <span class="hint">{{ 'admin.brick.hint.selectProduct'|trans }}</span> {{ pimcore_href("selectProduct", { "types": ["object"], "subtypes": { "types": ["object"], }, "classes": ["ProductFood", "ProductClothing", "Product"], "reload": true }) }} </div> {% endif %} {% if productLink == true %} {% if productLink.hasVariants() and productLink.getDefaultProduct() is not empty %} {% set defaultProduct = productLink.getDefaultProduct()[0] %} {% set price = defaultProduct.getOSPrice() %} {% set currency = price.getCurrency() %} {% set oldPrice = currency.toCurrency(defaultProduct.getPriceOld()) %} {% set articleNumber = defaultProduct.getArticleNumber() %} {% set productName = defaultProduct.getName() %} {% set detailViewUri = pimcore_url( { "name": defaultProduct.getUrlTitle(), "articlenumber": defaultProduct.getArticleNumber() }, "shopHandlerProductDetail" ) %} {% else %} {% set price = productLink.getOSPrice() %} {% set currency = price.getCurrency() %} {% set oldPrice = currency.toCurrency(productLink.getPriceOld()) %} {% set articleNumber = productLink.getArticleNumber() %} {% set productName = productLink.getName() %} {% set detailViewUri = pimcore_url( { "name": productLink.getUrlTitle(), "articlenumber": productLink.getArticleNumber() }, "shopHandlerProductDetail" ) %} {% endif %} {% set thumbnailUrl = productLink.getProductImage().getThumbnail({ "width": 420, "height": 190, "frame": true, "positioning": "center" }) %} <div class="col {{ colsSelectResult }}"> <div class="teaser image-text product"> <div class="teaser-content bb-flex-col"> <div class="image"> <a href="{{ detailViewUri }}"> <img src="{{ thumbnailUrl }}" title="{{ articleNumber }}"/> </a> </div> <div class="teaser-text-box bb-flex-1 bb-flex-col"> <div class="title-box"> <h4> <a href="{{ detailViewUri }}">{{ productName }}</a> </h4> </div> <div class="content-box product-price-container bb-flex-col bb-space-between-grow-1-i"> {% if (oldPrice!=0) and (price!=oldPrice) %} <p class="product-price old"> {{ oldPrice }} </p> {% endif %} {# Use has-old-price only in the CSS of the individual brand! #} <div class="product-price {% if (oldPrice!=0) and (price!=oldPrice) %}has-old-price{% endif %}">{{ price }}</div> {% if productLink.isFoodProduct() %} <div class="product-price-additional"> {% if productLink.getChildren() %} <div class="product-variation-container"> {{ 'Varianten vorhanden' |trans }} </div> {% else %} {% if productLink.hasVariants() and productLink.getDefaultProduct() is not empty %} {% set productInfo = defaultProduct %} {% else %} {% set productInfo = productLink %} {% endif %} {% set value = productInfo.getAmmount().getUnit().abbreviation | lower %} {% if value == 'mg' or value == 'g' or value == 'kg' %} <div>({{ productInfo.getPriceReferenceNew() |number_format(2, ',', '.') }} {{ '€' |trans }} / kg)</div> {% endif %} {% if value == 'ml' or value == 'l' %} <div>({{ productInfo.getPriceReferenceNew() |number_format(2, ',', '.') }} {{ '€' |trans }} / l)</div> {% endif %} {% if value == 'stk' %} <div>({{ productInfo.getPriceReferenceNew() |number_format(2, ',', '.') }} {{ '€' |trans }} / Stk)</div> {% endif %} {% endif %} {% if productLink.hasVariants() and productLink.getDefaultProduct() is not empty %} <div>{{ defaultProduct.getDeliveryCostHint() }}</div> {% else %} <div>{{ productInfo.getDeliveryCostHint() }}</div> {% endif %} </div> {% endif %} {% if productLink.hasVariants() and productLink.getDefaultProduct() is not empty %} {% if defaultProduct.getDeliverability() == 'unavailable' %} <div class="dark"> <br/>{{ defaultProduct.getDeliverability()|trans }}</div> {% else %} <p class="greyed">{{ defaultProduct.getDeliverability()|trans }}</p> {% endif %} {% else %} {% if productLink.getDeliverability() == 'unavailable' %} <div class="dark"> <br/>{{ productLink.getDeliverability()|trans }}</div> {% else %} <p class="greyed">{{ productLink.getDeliverability()|trans }}</p> {% endif %} {% endif %} {% if productLink.hasVariants() %} <div> <a class="button btn-default bb-line-height-normal" href="{{ detailViewUri }}">{{ 'Variante wählen'|trans }}</a> </div> {% elseif productLink.getDeliverability() == 'instant' %} <div class="product-action-wrapper" style=""> <form data-beer="1" method="post" class="js-submit-ajax" action="{{ pimcore_url({"action": "add"}, "shopHandlerCart") }}"> <div class="product-action-container" style="margin-top: 20px; align-items: center; justify-content: center;"> <div class="product-quantity"> <input type="number" name="quantity" style="color: #000; padding-top: 16px; padding-bottom: 16px;" min="1" value="1"/> <input type="hidden" name="article" value="{{ productLink.getArticleNumber() }}"> </div> <div class="product-action-button"> <button class="button btn-default bb-line-height-normal"> {{ 'Add to Cart'|trans }} </button> </div> </div> {% for message in app.flashes('error') %} {% if message.message %} {% if message.id == productLink.id %} <div class="error-message inline"> {{ message.message }} </div> {% endif %} {% else %} <div class="error-message inline"> {{ message }} </div> {% endif %} {% endfor %} <div data-product-id="{{ productLink.id }}" class="error-messages-container error-message" style="display: none;"></div> </form> {% if productLink.getPriceOld() and minimumPrice30DaysAllCountries[productLink.getId()]['DE'] is defined and minimumPrice30DaysAllCountries[productLink.getId()]['DE'] %} <div class="product-price-additional" style="font-size: 12px; margin: 8px 4px;"> {{ 'minPriceLast30Days' | trans }} {{ currency.toCurrency(minimumPrice30DaysAllCountries[productLink.getId()]['DE']) }} </div> {% endif %} </div> {% else %} <div class="product-action-wrapper"> {% if productStockInformCustomerData[productLink.getId()] is defined %} {% include 'Partials/productStockInformCustomer.html.twig' with {'backUrl': uri, 'user': user, 'product': productLink, 'productStockInformCustomerData': productStockInformCustomerData[productLink.getId()], 'labelBlack': true} %} {% endif %} </div> {% endif %} </div> </div> </div> </div> </div> {% endif %} {% endfor %} </div> </div> </div> </div> </div> </div> {% if editmode %}</div>{% endif %}