{% sw_extends '@Storefront/storefront/page/product-detail/tabs.html.twig' %}
{% block page_product_detail_tabs_navigation_review %}
{# standard content #}
{% if config('core.listing.showReview') %}
<li class="nav-item">
<a class="nav-link {% if (ratingSuccess == 1) or (ratingSuccess == -1) %}active{% endif %} product-detail-tab-navigation-link"
id="review-tab"
data-toggle="tab"
data-offcanvas-tabs="true"
href="#review-tab-pane"
role="tab"
aria-controls="review-tab-pane"
aria-selected="true">
{{ "detail.tabsReview"|trans|sw_sanitize }}
<span class="product-detail-tab-navigation-icon">
{% sw_icon 'arrow-medium-right' style {'pack':'solid'} %}
</span>
</a>
</li>
{% endif %}
{# extension for product equipment section #}
{% for item in page.crossSellings %}
{% set id = item.crossSelling.id %}
{% if item.crossSelling.active and item.getProducts().elements %}
<li class="nav-item">
<a class="nav-link product-detail-tab-navigation-link"
id="cs-{{ id }}-tab"
data-toggle="tab"
href="#cs-{{ id }}-tab-pane"
role="tab"
aria-controls="cs-{{ id }}-tab-pane"
aria-selected="true">
{{ item.crossSelling.translated.name }}
<span class="product-detail-tab-navigation-icon">
{% sw_icon 'arrow-medium-right' style {'pack':'solid'} %}
</span>
</a>
</li>
{% endif %}
{% endfor %}
{% endblock %}
{% block page_product_detail_tabs_content_review %}
{# standard content #}
{% if config('core.listing.showReview') %}
<div class="tab-pane fade show {% if (ratingSuccess == 1) or (ratingSuccess == -1) %}active{% endif %}"
id="review-tab-pane"
role="tabpanel"
aria-labelledby="review-tab">
{% sw_include '@Storefront/storefront/page/product-detail/review/review.html.twig' with {'reviews': page.reviews} %}
</div>
{% endif %}
{# extension for product equipment section #}
{% for item in page.crossSellings %}
{% set id = item.crossSelling.id %}
{% if item.crossSelling.active and item.getProducts().elements %}
<div class="tab-pane fade show"
id="cs-{{ id }}-tab-pane"
role="tabpanel"
aria-labelledby="cs-{{ id }}-tab">
{% set config = {
'title': {
'value': item.crossSelling.name
},
'border': {
'value': false
},
'rotate': {
'value': false
},
'products': {
'value': item.getProducts()
},
'boxLayout': {
'value': 'standard'
},
'elMinWidth': {
'value': '300px'
},
'navigation': {
'value': true
},
'displayMode': {
'value': 'minimal'
},
'verticalAlign': {
'value': 'top'
},
} %}
{% sw_include "@Storefront/storefront/element/cms-element-product-slider.html.twig" with {
sliderConfig: config,
element: {
'data': {
'products': {
elements: item.getProducts()
}
},
type: 'product-slider'
}
} only %}
</div>
{% endif %}
{% endfor %}
{% endblock %}