{% sw_extends '@Storefront/storefront/component/buy-widget/buy-widget.html.twig' %}
{#
OVERVIEW OF THE ENTRY POINTS
============================
A) Standard prouct layout
Set shopping cart >> @DreiscSet/src/Resources/views/storefront/page/product-detail/buy-widget.html.twig
Dreisc Registry and group listing >> @DreiscSet/src/Resources/views/storefront/page/product-detail/index.html.twig
"Buy this product in a set" and buy button >> @DreiscSet/src/Resources/views/storefront/page/product-detail/buy-widget-form.html.twig
Initial price before set cart update >> @DreiscSet/src/Resources/views/storefront/page/product-detail/buy-widget-price.html.twig
Controlling the detail tabs >> @DreiscSet/src/Resources/views/storefront/page/product-detail/tabs.html.twig and
@DreiscSet/src/Resources/views/storefront/page/product-detail/index.html.twig
B) Experience world product layout
Set shopping cart >> @this
Dreisc Registry and group listing >> @DreiscSet/src/Resources/views/storefront/block/cms-block-gallery-buybox.html.twig
"Buy this product in a set" and buy button >> @DreiscSet/src/Resources/views/storefront/component/buy-widget/buy-widget-form.html.twig
Initial price before set cart update >> @DreiscSet/src/Resources/views/storefront/component/buy-widget/buy-widget-price.html.twig
Controlling the detail tabs >> @DreiscSet/src/Resources/views/storefront/element/cms-element-product-description-reviews.html.twig
#}
{% block buy_widget_data %}
{% if page.product.extensions.dreiscSetOrderCartStruct %}
{% set dreiscSetCartOptions = {
dataUrl: url('frontend.widgets.dreisc.set.reload.set.cart'),
csrfToken: sw_csrf('frontend.widgets.dreisc.set.reload.set.cart', {'mode': 'token'})
} %}
{# At this point we issue the cart of the set. This is updated after each selection via javascript. #}
{% block dreisc_set__cart %}
<div class="dreisc-set-cart" data-dreisc-set-cart="true"
data-dreisc-set-cart-options="{{ dreiscSetCartOptions|json_encode }}">
{% sw_include '@DreiscSet/storefront/dreisc-set/configurator/set-cart.html.twig' with {
dreiscSetOrder: page.product.extensions.dreiscSetOrderCartStruct,
dreiscSetConfiguration: page.product.extensions.dreiscSetStruct.setConfigurationStruct
} %}
</div>
{% endblock %}
{% endif %}
{{ parent() }}
{% endblock %}
{% block buy_widget_price %}
{% if page.product.extensions.dreiscSetOrderCartStruct %}
{% block dreisc_set__sticky_container__start %}
<div class="sticky-container">
<div class="sticky-left-container">
{% endblock %}
{{ parent() }}
{% else %}
{{ parent() }}
{% endif %}
{% endblock %}
{% block buy_widget_tax %}
{% if page.product.extensions.dreiscSetOrderCartStruct %}
{{ parent() }}
{% block dreisc_set__sticky_container__middle %}
{# Close .sticky-left-container #}
</div>
<div class="sticky-right-container">
{% endblock %}
{% else %}
{{ parent() }}
{% endif %}
{% endblock %}
{% block buy_widget_buy_form %}
{% if page.product.extensions.dreiscSetOrderCartStruct %}
{{ parent() }}
{# Close .sticky-right-container #}
{% block dreisc_set__sticky_container__end %}
</div>
</div>
{% endblock %}
{% else %}
{{ parent() }}
{% endif %}
{% endblock %}
{% block buy_widget_reviews %}
{% if not page.product.extensions.dreiscSetStruct.setConfigurationStruct.mainProductHideReviewTab %}
{{ parent() }}
{% endif %}
{% endblock %}