{% sw_extends '@Storefront/storefront/page/product-detail/index.html.twig' %}
{% block base_content %}
{% set isRolle = (page.product is sc_rolle()) %}
{% set isZubehoer = (page.product is sc_zubehoer()) %}
{% block page_product_detail %}
{# (page.product.tags|first).name|default('Kein Tag vorhanden') #}
{# dump( page.product) #}
{% set properties = page.product.extensions.properties.property_options %}
{% set imgPhoto = "" %}
{% set img2D = "" %}
{% set imgFitting = "" %}
{% set img3D = (isRolle or isZubehoer) ? "check" : null %}
{% set mediaItems = page.product.media %}
{% set altPhoto = "" %}
{% set alt2D = "" %}
{% set altFitting = "" %}
{% set pos = 0 %}
{% for image in mediaItems|sort((a, b) => a.position <=> b.position) %}
{% set pos = pos + 1 %}
{% if pos == 1 %}
{# the photo #}
{% set imgPhoto = image.media.url %}
{% endif %}
{% if pos == 2 %}
{# the 2d drawing #}
{% set img2D = image.media.url %}
{% set alt2D = altPhoto ~ ", " ~ "steinco.productDetail.drawing.2D"|trans|sw_sanitize %}
{% endif %}
{% if pos == 3 %}
{# the fitting drawing #}
{% set imgFitting = image.media.url %}
{% if isZubehoer %}
{% set altFitting = altPhoto ~ ", " ~ "steinco.application"|trans|sw_sanitize %}
{% else %}
{% set altFitting = altPhoto ~ ", " ~ "steinco.productDetail.drawing.fitting"|trans|sw_sanitize %}
{% endif %}
{% endif %}
{% endfor %}
{% if showPrices %}
{# create a JS array to hold all prices #}
<script>
{% set prices = page.product.calculatedPrices %}
{% set quantity = 1 %}
const priceScale = [];
{% for price in prices|sort((a, b) => a.quantity <=> b.quantity) %}
priceScale.push([{{ quantity }}, '{{ price.unitPrice|currency }}']);
{% set quantity = price.quantity + 1 %} {# start der nächsten Rabattstufe #}
{% endfor %}
</script>
{% endif %}
{# TODO: page reload triggered by id 'sc-productDetailPage' always fires: "div id="sc-productDetailPage" class="row ge scsw-product-detail mt-5" #}
{% block sc_page_info %}
{# set <sc-page-info> to generate seo-path independent links in the language menu #}
{# this is done in steinco.js (TYPO3), function adjustLang(snippet) #}
<sc-page-info path="{{path('frontend.home.page')}}detail/{{page.product.id}}"/>
{% endblock %}
<div id="sc-productDetailPage" class="row ge scsw-product-detail mt-5">
<div class="col-xl-6 col-lg-6 col-md-12 col-12 scsw-pd-image">
{% block page_product_detail_main %}
{# removed #}
{% endblock %}
{% block page_product_detail_media %}
{% if mediaItems|length > 0 %}
<div
style="width: 100%; height: auto;">
{# define the image fullscreen overlay #}
<div
id="scswOverlay" class="scsw-img-overlay">
{# Button to close the overlay navigation #}
<div id="scswOverlayHeading" class="scsw-overlay-heading" style="display: none;">
<h2>
{% sw_include '@SteincoTheme/storefront/utilities/sc-product-title.html.twig' with { prod: product } %}
<span style="font-weight: 400">
{{ "steinco.product"|trans|sw_sanitize }}:
{{page.product.productNumber}}
</span>
</h2>
<a href="#0" class="scsw-closebtn" onclick="closeOverlay();">×</a>
</div>
<div id="scswOverlayActions" class="scsw-overlay-actions">
{% set classBtnDownload = "btn btn-block btn-buy" %}
{% set onClick = "onclick" %}
{% if not context.customer %}
{% set classBtnDownload = classBtnDownload ~ " disabled" %}
{% set onClick = "noclick" %}
{% else %}
{% set classBtnDownload = classBtnDownload ~ " btn-primary" %}
{% endif %}
<h4>{{ "steinco.cad.downloadTitle"|trans|striptags }}</h4>
<select id="scswCadFormats" class="scsw-cad-formats"></select>
<button id="scswCadDownload" class="{{classBtnDownload}}" {{onClick}}="downloadCadFile(this, '{{page.product.productNumber}}', '{{ "steinco.cad.limit"|trans|striptags }}');" title="{{ "steinco.cad.download"|trans|striptags }}" aria-label="{{ "steinco.cad.download"|trans|striptags }}">
{{ "steinco.cad.download"|trans|striptags }}
</button>
{% if not context.customer %}
<div class="account-menu-login">
<a href="{{ path('frontend.account.login.page') }}" title="{{ "account.loginSubmit"|trans|striptags }}" class="btn btn-primary account-menu-login-button">
{{ "account.loginSubmit"|trans|sw_sanitize }}
</a>
<div class="account-menu-register">
{{ "account.orRegister"|trans|sw_sanitize }}
<a href="{{ path('frontend.account.login.page') }}" title="{{ "account.orRegisterLink"|trans|striptags }}">{{ "account.orRegisterLink"|trans|striptags }}</a>
</div>
</div>
{% endif %}
</div>
{# overlay content #}
<div id="scswOverlayImageContainer" class="scsw-overlay-img">
<iframe id="scswOverlayRender3D" class="scsw-overlay-render3D" src="" scrolling="no" seamless="seamless" frameborder="0"></iframe>
<img id="scswOverlayImage" src="" alt="" style="max-height: 100%; max-width: 100%; width: auto; height: auto; padding: 5%; margin: auto;" onclick="closeOverlay();">
</div>
</div>
{% set altPhoto = page.product.productNumber ~ ", "
~ properties["Rolle_Bauart_Kundenfilter"].value|e ~ ", ∅ "
~ properties["Rad_Durchmesser_mm"].value|e ~ "steinco.property.mm"|trans ~ ", "
~ properties["Rad_Lager_Kundenfilter"].value|e ~ ", "
~ properties["Rad_Bereifung"].value|e ~ ", "
~ properties["Befestigung_Abmessungen_Gruppe"].value|e %}
{% if imgPhoto %}
{# the photo #}
<img id="scswImagePhoto" src="{{imgPhoto}}" alt="{{altPhoto}}" style="display:none;">
{% endif %}
{% if img2D %}
{# the 2d drawing #}
<img id="scswImage2D" src="{{img2D}}" alt="{{alt2D}} " style="display:none;">
{% endif %}
{% if imgFitting %}
{# the fitting drawing #}
<img id="scswImageFitting" src="{{imgFitting}}" alt="{{altFitting}}" style="display:none;">
{% endif %}
<div id="scswDetailImageContainer">
<span class="scsw-similar-image-details" onclick="openOverlay();">{{ "steinco.similarImage"|trans }}</span>
<img class="scsw-detail-image" src="{{imgPhoto}}" alt="{{altPhoto}}" id="scswDetailImage" onclick="openOverlay();" style="width: 100%; height: auto;">
</div>
</div>
{% endif %}
{# replaced #}
{# pdf dwonload #}
{% endblock %}
</div>
<div
class="col-xl-6 col-lg-6 col-md-12 col-12 scsw-pd-description">
{# title, icons, decription, add to cart #}
{% block page_product_detail_headline %}
<div class="product-detail-headline scsw-detail-headline mb-3">
<h1 style="line-height: 1.5rem; padding-bottom: 1rem;">
{% sw_include '@SteincoTheme/storefront/utilities/sc-product-title.html.twig' with { prod: page.product } %}
<span style="font-weight: 400;font-size: 1.5rem;"><br/>
{% if isRolle %}
{% sw_include '@SteincoTheme/storefront/utilities/sc-product-subtitle.html.twig' with { prod: page.product } %}
{% endif %}
{% if properties['Auslaufteil'].value == 'Auslaufartikel' %}
<div style="padding: 0.3rem; margin-top: 0.5rem;" class="scsw-intra">{{ "steinco.discontinuedArticle"|trans }}</div>
{% elseif properties['Status_Prodsystem'].value|default('Katalog') != 'Katalog' %}
<div style="padding: 0.3rem; margin-top: 0.5rem;" class="scsw-intra">{{ "steinco.noStandardProduct"|trans }}</div>
{% endif %}
</span>
{% if showPrices %}
<span style="font-weight: 400;font-size: 1rem;">
{% sw_include '@SteincoTheme/storefront/page/product-detail/availability.html.twig' with {
prod: page.product,
showQuantity: true
} %}
</span>
{% endif %}
</h1>
{# % sw_include '@Storefront/storefront/page/product-detail/headline.html.twig' % #}
</div>
{% endblock %}
{# Branchen-Icons #}
{% if not isZubehoer %}
<div class="scsw-images-branche">
{% set props = page.product.extensions.properties %}
{% if isRolle %}
{#
SELECT
CONCAT('{% set allowed_', id, ' = ["', id, '", "', GROUP_CONCAT(text ORDER BY Sprache_IsoAlpha2 ASC SEPARATOR '", "'), '"] %}') AS twig_set_statement
FROM
Beschreibungen
WHERE
id LIKE 'BR\_%'
GROUP BY
id;
#}
{% set allowed_Br_Betriebsausstattung = ["Br_Betriebsausstattung", "Betriebsausstattung", "Factory equipment", "Factory equipment", "Equipamiento empresarial", "Équipement professionnel", "Attrezzature industriali", "Производственное оборудование", "Factory equipment"] %}
{% set allowed_Br_Buero_u_Labor = ["Br_Buero_u_Labor", "Büro & Labor", "Office & laboratory", "Office & laboratory", "Oficinas y laboratorios", "Bureaux & laboratoires", "Uffici e laboratori", "Офисы и лаборатории", "Office & laboratory"] %}
{% set allowed_Br_Grosskueche = ["Br_Grosskueche", "Großküchenlogistik", "Central kitchen logistics", "Central kitchen logistics", "Logística de cocinas industriales", "Logistique Restauration collective", "Logistica per cucine industriali", "Логистика пищеблоков", "Central kitchen logistics"] %}
{% set allowed_Br_Ladenbau = ["Br_Ladenbau", "Ladenbau", "Shop fitting", "Shop fitting", "Establecimientos comerciales", "Construction de magasins", "Arredamento commerciale", "Торговые помещения", "Shop fitting"] %}
{% set allowed_Br_Luftfahrt = ["Br_Luftfahrt", "Luftfahrt", "Aviation", "Aviation", "Aeronáutica", "Aéronautique", "Aeronautica", "Воздушный транспорт", "Aviation"] %}
{% set allowed_Br_Medizintechnik = ["Br_Medizintechnik", "Medizintechnik", "Medical equipment", "Medical equipment", "Dispositivos médicos", "Matériel médical", "Tecnologie medicali", "Медицинская техника", "Medical equipment"] %}
{% if intersect(props.branchen, allowed_Br_Medizintechnik) %}
<a href="{{path('frontend.home.page')}}search/Branche/Medizintechnik" style="text-decoration: none;">
<img class="scsw-img-branche" src="{{ asset('assets/icons/industries/Icon-Medizintechnik-white.svg','@SteincoTheme') }}"
alt="{{ "steinco.icons.Medizintechnik.alt"|trans}}"/>
</a>
{% endif %}
{% if intersect(props.branchen, allowed_Br_Grosskueche) %}
<a href="{{path('frontend.home.page')}}search/Branche/Großküchenlogistik" style="text-decoration: none;">
<img class="scsw-img-branche" src="{{ asset('assets/icons/industries/Icon-Lebensmittel-white.svg','@SteincoTheme') }}"
alt="{{ "steinco.icons.Grosskuechenlogistik.alt"|trans}}"/>
</a>
{% endif %}
{% if intersect(props.branchen, allowed_Br_Ladenbau) %}
<a href="{{path('frontend.home.page')}}search/Branche/Ladenbau" style="text-decoration: none;">
<img class="scsw-img-branche" src="{{ asset('assets/icons/industries/Icon-Ladenbau-white.svg','@SteincoTheme') }}"
alt="{{ "steinco.icons.Ladenbau.alt"|trans}}"/>
</a>
{% endif %}
{% if intersect(props.branchen, allowed_Br_Betriebsausstattung) %}
<a href="{{path('frontend.home.page')}}search/Branche/Betriebsausstattung" style="text-decoration: none;">
<img class="scsw-img-branche" src="{{ asset('assets/icons/industries/Icon-Betriebsausstattung-white.svg','@SteincoTheme') }}"
alt="{{ "steinco.icons.Betriebsausstattung.alt"|trans}}"/>
</a>
{% endif %}
{% if intersect(props.branchen, allowed_Br_Buero_u_Labor) %}
<a href="{{path('frontend.home.page')}}search/Branche/Büro & Labor" style="text-decoration: none;">
<img class="scsw-img-branche" src="{{ asset('assets/icons/industries/Icon-Labor-white.svg','@SteincoTheme') }}"
alt="{{ "steinco.icons.Buero.Labor.alt"|trans}}"/>
</a>
{% endif %}
{% if intersect(props.branchen, allowed_Br_Luftfahrt) %}
<a href="{{path('frontend.home.page')}}search/Branche/Luftfahrt" style="text-decoration: none;">
<img class="scsw-img-branche" src="{{ asset('assets/icons/industries/Icon-Luftfahrt-white.svg','@SteincoTheme') }}"
alt="{{ "steinco.icons.Luftfahrt.alt"|trans}}"/>
</a>
{% endif %}
{% else %}
{# Rad: Alle Branchen anzeigen, kein Link, da es keinen passenden Filter gibt #}
<img class="scsw-img-branche" src="{{ asset('assets/icons/industries/Icon-Medizintechnik-white.svg','@SteincoTheme') }}"
alt="{{ "steinco.icons.Medizintechnik.alt"|trans}}"/>
<img class="scsw-img-branche" src="{{ asset('assets/icons/industries/Icon-Lebensmittel-white.svg','@SteincoTheme') }}"
alt="{{ "steinco.icons.Grosskuechenlogistik.alt"|trans}}"/>
<img class="scsw-img-branche" src="{{ asset('assets/icons/industries/Icon-Ladenbau-white.svg','@SteincoTheme') }}"
alt="{{ "steinco.icons.Ladenbau.alt"|trans}}"/>
<img class="scsw-img-branche" src="{{ asset('assets/icons/industries/Icon-Betriebsausstattung-white.svg','@SteincoTheme') }}"
alt="{{ "steinco.icons.Betriebsausstattung.alt"|trans}}"/>
<img class="scsw-img-branche" src="{{ asset('assets/icons/industries/Icon-Labor-white.svg','@SteincoTheme') }}"
alt="{{ "steinco.icons.Buero.Labor.alt"|trans}}"/>
<img class="scsw-img-branche" src="{{ asset('assets/icons/industries/Icon-Luftfahrt-white.svg','@SteincoTheme') }}"
alt="{{ "steinco.icons.Luftfahrt.alt"|trans}}"/>
{% endif %}
{# <div>{{path('frontend.home.page')|replace({',': '•', '/': '|'})}}</div> #}
</div>
{% endif %}
{# description #}
<div class="scsw-pd-text mt-3 mb-2" style="line-height: 1rem;">
<steinco-article>
<strong>{{ "steinco.product"|trans|sw_sanitize }}:</strong>
{{ page.product.productNumber }}
{% if page.product.ean is not sc_empty %}
<br/>{{ "steinco.gtin_ean"|trans|sw_sanitize }}:
{{ page.product.ean }}
{% endif %}
{% if page.product.customFields.custom_product_ctn is not sc_empty %}
<br/>{{ "steinco.ctn"|trans|sw_sanitize }}:
{{ page.product.customFields.custom_product_ctn }}
{% endif %}
</steinco-article>
</div>
<div class="scsw-pd-text mb-4">
<steinco-article>
<strong>{{ "component.product.feature.label.description"|trans|sw_sanitize }}</strong>
</steinco-article>
{{ page.product.translated.description|raw }}
</div>
{% if properties['Beratungspflicht'] %}
{% if properties['Beratungspflicht'].value is sc_yes %}
<div class="scsw-pd-needs-consulting mb-4">
{{ "steinco.needsConsulting"|trans({'%article%': page.product.productNumber})|raw }}
</div>
{% endif %}
{% endif %}
{# add to cart #}
{% block page_product_detail_buy %}
{% sw_include '@Storefront/storefront/component/product/card/wishlist.html.twig' with {
showText: true,
size: 'md',
productId: page.product.id
} %}
{% endblock %}
</div>
<div class="pb-2 pt-4" style="width: 100%; padding: 3rem 1rem 0 !important;">
<h5
class="scsw-link-button-group">
{#% if imgPhoto %}
<a href="#0" onclick="setDetailPhoto();" class="scsw-link-button">
<span class="nowrap">{{ "steinco.productDetail.image"|trans|sw_sanitize }}</span></a>
{% endif %#}
{% set style = 'style="border: 1px solid var( --sc-black-20); width: 11rem; margin-bottom: 0.5rem;"' %}
{% if img2D %}
<button href="#0" onclick="setDetail2DImage();" {{ style|raw }} class="btn scsw-link-button">
<img class="scsw-link-button-icon" src="{{ asset('assets/icons/symbols/icon-2d-x2.png','@SteincoTheme') }}"/>
<span class="nowrap scsw-2d">{{ "steinco.productDetail.drawing.2D"|trans|sw_sanitize }}</span>
</button>
{% endif %}
{% if imgFitting %}
<button href="#0" onclick="setDetailFitting();" {{ style|raw }} class="btn scsw-link-button">
{% if isZubehoer %}
<img class="scsw-link-button-icon" src="{{ asset('assets/icons/symbols/icon-settings-x2.png','@SteincoTheme') }}"/>
<span class="nowrap">{{ "steinco.application"|trans|sw_sanitize }}</span>
{% else %}
<img class="scsw-link-button-icon" src="{{ asset('assets/icons/symbols/icon-2d-x2.png','@SteincoTheme') }}"/>
<span class="nowrap">{{ "steinco.productDetail.drawing.fitting"|trans|sw_sanitize }}</span>
{% endif %}
</button>
{% endif %}
{% if img3D %}
{% set errMsg %}{{ 'steinco.noCADData'|trans({'%prodnr%': page.product.productNumber})|sw_sanitize|e('js') }}{% endset %}
<button {{ style|raw }} class="btn scsw-link-button" href="#0" onclick="openOverlay3D('{{page.product.productNumber}}', '{{errMsg}}');">
<img class="scsw-link-button-icon" src="{{ asset('assets/icons/symbols/icon-3d-x2.png','@SteincoTheme') }}"/>
<span class="nowrap">{{ "steinco.productDetail.drawing.3D"|trans|sw_sanitize }}</span>
</button>
{% endif %}
{# Später notwendig: Übergabe an PDF set currentPath = seoUrl('frontend.detail.page', {'productId': page.product.id}) #}
{# <button onclick="location.href='{{ path('frontend.home.page') }}pdf/{{ page.product.productNumber }}?url={{ currentPath }}'" {{ style|raw }} class="btn scsw-link-button"> #}
<button onclick="location.href='{{ path('frontend.home.page') }}pdf/{{ page.product.productNumber }}'" {{ style|raw }} class="btn scsw-link-button">
<img class="scsw-link-button-icon" src="{{ asset('assets/icons/symbols/icon-pdf-x2.png','@SteincoTheme') }}"/>
<span class="nowrap">{{ "steinco.productDetail.pdf"|trans|sw_sanitize }}</span>
</button>
</h5>
</div>
{% block page_product_detail_tabs %}
{% set showVariants = false %}
<div class="col-xl-12 offset-xl-0 col-md-12 offset-md-0 sc-tab-container ge ge_tabs_container">
<nav id="scswDetailsTab" class="nav nav-tabs mb-1" role="tablist" style="float: left; width: 100%; border-top: 1px solid lightgray; margin-top: 1.5rem; padding-top: 1rem;">
<a id="tab-td" class="nav-item nav-link scsw-tab-link active" href="#tab-content-td" data-toggle="tab" role="tab" aria-controls="tab-content-td" aria-selected="true">
{{ "steinco.technicalData"|trans|sw_sanitize }}
</a>
<a id="tab-te" class="nav-item nav-link scsw-tab-link" href="#tab-content-te" data-toggle="tab" role="tab" aria-controls="tab-content-te" aria-selected="false">
{{ "steinco.technicalCharacteristics"|trans|sw_sanitize }}
</a>
{% if showVariants %}
<a id="tab-va" class="nav-item nav-link scsw-tab-link" href="#tab-content-va" data-toggle="tab" role="tab" aria-controls="tab-content-va" aria-selected="false">
{{ "steinco.variants"|trans|sw_sanitize }}
</a>
{% endif %}
{% if showPrices %}
<a id="tab-pr" class="nav-item nav-link scsw-tab-link" href="#tab-content-pr" data-toggle="tab" role="tab" aria-controls="tab-content-pr" aria-selected="false">
{{ "steinco.prices.prices"|trans|sw_sanitize }}
</a>
{% endif %}
</nav>
<div>
<div id="scswDetailsTab" class="tab-content">
<div id="tab-content-td" class="tab-pane fade ge ge_tabs_tab show active" role="tabpanel" aria-labelledby="tab-td" style="float: left;">
{% sw_include '@Storefront/storefront/page/product-detail/properties.html.twig'
with { subset: isRolle ? "td" : (isZubehoer ? "tz" : "tr") } %}
</div>
<div id="tab-content-te" class="tab-pane fade ge ge_tabs_tab" role="tabpanel" aria-labelledby="tab-te" style="float: left;">
{% sw_include '@Storefront/storefront/page/product-detail/properties.html.twig' with { subset: "te" } %}
</div>
{% if showVariants %}
<div id="tab-content-va" class="tab-pane fade xyz ge ge_tabs_tab" role="tabpanel" aria-labelledby="tab-va" style="float: left;">
{% sw_include '@Storefront/storefront/utilities/alert.html.twig' with {
type:"info",
content: 'steinco.text.noVariants'|trans|sw_sanitize
} %}
{% sw_include '@Storefront/storefront/page/product-detail/properties.html.twig' with { subset: "all" } %}
</div>
{% endif %}
{% if showPrices %}
<div id="tab-content-pr" class="tab-pane fade ge ge_tabs_tab" role="tabpanel" aria-labelledby="tab-pr" style="float: left;">
{% sw_include '@Storefront/storefront/page/product-detail/properties.html.twig' with { subset: "pr" } %}
</div>
{% endif %}
</div>
{% endblock %}
</div>
{% endblock %}
{% endblock %}