vendor/shopware/storefront/Resources/views/storefront/element/cms-element-buy-box.html.twig line 1

Open in your IDE?
  1. {% block element_buy_box %}
  2.     {% set config = element.fieldConfig.elements %}
  3.     {% set buyBoxOptions = {
  4.         elementId: element.id
  5.     } %}
  6.     {% if element.data.product %}
  7.         <div class="cms-element-{{ element.type }}{% if config.alignment.value %} has-vertical-alignment{% endif %}"
  8.              data-buy-box="true"
  9.              data-buy-box-options='{{ buyBoxOptions|json_encode }}'>
  10.             {% block element_buy_box_inner %}
  11.                 {% if config.alignment.value %}
  12.                     <div class="cms-element-alignment{% if config.alignment.value == "center" %} align-self-center{% elseif config.alignment.value == "flex-end" %} align-self-end{% else %} align-self-start{% endif %}">
  13.                 {% endif %}
  14.                     {% sw_include '@Storefront/storefront/component/buy-widget/buy-widget.html.twig' with {
  15.                         'product': element.data.product,
  16.                         'configuratorSettings': element.data.configuratorSettings,
  17.                         'totalReviews': element.data.totalReviews,
  18.                         'elementId': element.id,
  19.                         'pageType': cmsPage.type
  20.                     } %}
  21.                 {% if config.alignment.value %}
  22.                     </div>
  23.                 {% endif %}
  24.             {% endblock %}
  25.         </div>
  26.     {% endif %}
  27. {% endblock %}