{% extends 'pageTemplateDefault.html.twig' %}
{% block content %}
{{ pimcore_areablock("content", {
"allowed": ["Breadcrumb", "MainStage", "MainStageCarousel", "StageSpecific", "StageFlat"],
"group": {
"Stage Variationen": ["Breadcrumb", "MainStage", "MainStageCarousel", "StageSpecific", "StageFlat"]
}
}) }}
<div class="section">
<div class="main-content flex-col product-list-view">
{% for productkey, product in products %}
{% set detailViewUri = pimcore_url(
{
"name": product.urlTitle,
"articlenumber": product.articleNumber
},
"shopHandlerProductDetailBorn"
) %}
{% set price = product['osPrice'] %}
{% set currency = price.getCurrency() %}
<div class="col xs-12 m-6 l-4">
<div class="teaser image-text product">
<div class="teaser-content bb-flex-col">
<div class="image">
<a href="{{ detailViewUri }}">
<img src="{{ product.thumbnailUrl }}"
alt="{{ product.thumbnailAlt }}"/>
</a>
</div>
<div class="teaser-text-box bb-flex-1 bb-flex-col">
<div class="title-box">
<h4>
<a href="{{ detailViewUri }}">{{ product.name |trademark }}</a>
</h4>
</div>
<div class="content-box product-price-container bb-flex-col bb-space-between-grow-1-i">
<div>
<div class="product-price">
{% if product.cachedPrice is defined %}
{{ product.cachedPrice }}
{% else %}
{{ product.price }}
{% endif %}
{% if (product['priceOld'] != 0 and product['priceReference'] != product['priceOld']) %}
<span class="product-price old">
{{ product['priceOld'] |number_format(2, ',', '.') }} {{ '€' |trans }}
</span>
{% endif %}
</div>
{% if product['isProductFood'] %}
<div class="product-price-additional">
{% if(product['hasVariants']) %}
<div class="product-variation-container">
{{ 'Varianten vorhanden' |trans }}
</div>
{% else %}
<div>({{ product['priceReference'] |number_format(2, ',', '.') }} {{ '€' |trans }} / {{ product['unit'] }})</div>
{% endif %}
<div class="delivery-cost-hint">{{ product['deliveryCostHint'] }}</div>
</div>
{% elseif product['deliveryCostHint'] is defined and product['deliveryCostHint'] is not empty %}
<div class="product-price-additional">
<div>{{ product['deliveryCostHint'] }}</div>
</div>
{% endif %}
</div>
{% if product['hasVariants'] %}
<div>
<a class="button btn-default bb-line-height-normal" href="{{ detailViewUri }}">{{ 'Variante wählen'|trans }}</a>
</div>
{% elseif product['deliverability'] == 'instant' %}
{% if product['hasVariants'] %}
<div style="font-size: 1.2rem; font-weight: normal; margin-top: 6px;">
{{ product['priceOriginal'] }} − {{ product['amountValue'] | number_format(0, ',', '.') }} {{ product['amountAbbreviation'] }}
{% if product['priceReference'] is defined %}
<br/>
{% set currency = product['osPrice'].getCurrency() %}
({{ currency.toCurrency(product['priceReference']) }} / {{ product['amountAbbreviation'] }})
{% endif %}
</div>
{% endif %}
<div class="product-action-wrapper text-center">
<div style="display:inline-block">
{% set jsSubmitClass = '' %}
{% if enabledWebsiteFeatures is defined and enabledWebsiteFeatures['sidebarCart'] is defined and enabledWebsiteFeatures['sidebarCart'] == true %}
{% set jsSubmitClass = 'js-submit-ajax' %}
{% endif %}
<form method="post" class="{{ jsSubmitClass }}" action="{{ pimcore_url({"action": "add"}, "shopHandlerCart") }}">
<div class="product-action-container" style="margin-top: 20px;">
<div class="product-quantity">
<input class="product-quantity-w-min" type="number" name="quantity" min="1" value="1" style="padding-top:13px"/>
<input type="hidden" name="article" value="{{ product['articleNumber'] }}">
</div>
<div class="product-action-button">
<button class="button btn-default bb-line-height-normal" style="margin:0">
{{ 'Add to Cart'|trans }}
</button>
</div>
</div>
{% for message in app.flashes('error') %}
{% if message.message %}
{% if message.id == product.id %}
<div class="error-message inline">
{{ message.message }}
</div>
{% endif %}
{% else %}
<div class="error-message inline">
{{ message }}
</div>
{% endif %}
{% endfor %}
{% if enabledWebsiteFeatures is defined and enabledWebsiteFeatures['sidebarCart'] is defined and enabledWebsiteFeatures['sidebarCart'] == true %}
<div class="error-messages-container error-message" data-product-id="{{ product['id'] }}" style="display: none;"></div>
{% endif %}
</form>
{% if product['priceOld'] and product['minimumPrice30DaysAllCountries'][country] is defined and product['minimumPrice30DaysAllCountries'][country] %}
<div style="font-size: 12px; margin: 8px 4px;">
{{ 'minPriceLast30Days' | trans }} {{ currency.toCurrency(product['minimumPrice30DaysAllCountries'][country]) }}
</div>
{% endif %}
</div>
</div>
{% else %}
{% if (product['deliverability'] == 'unavailable') %}
<div class="product-ability" style="margin:-5px 0 -9px">
<small>{{ product['deliverability'] |trans }}</small>
</div>
{% endif %}
<div class="product-action-wrapper">
{% include 'Partials/productStockInformCustomer.html.twig' with {'backUrl': uri, 'user': user, 'product': product, 'productStockInformCustomerData': productStockInformCustomerData[product['pimId']]} %}
</div>
{% endif %}
</div>
</div>
</div>
</div>
</div>
{% endfor %}
</div>
</div>
{% endblock %}