custom/apps/zenitAppFloatingBuybox/Resources/views/storefront/zenit-floating-buybox/floating-buybox.html.twig line 1

Open in your IDE?
  1. {% block zenit_floating_buybox %}
  2.     {% set groupsToggleContainerClasses =        'col-auto' %}
  3.     {% set priceContainerClasses =               'col-auto' %}
  4.     {% set descriptionContainerClasses =         'col' %}
  5.     {% set formContainerClasses =                'col-12 col-md-auto' %}
  6.     {% if config('zenitAppFloatingBuybox.config.showPrice') and config('zenitAppFloatingBuybox.config.showConfigurator') %}
  7.         {% set groupsToggleContainerClasses =        'col col-sm' %}
  8.         {% set priceContainerClasses =               'col col-sm-auto' %}
  9.         {% set descriptionContainerClasses =         'col-6 col-sm-auto' %}
  10.         {% set formContainerClasses =                'col-12 col-md-auto' %}
  11.     {% endif %}
  12.     {% if customizedProductsTemplate is null  %}
  13.         {% if config('zenitAppFloatingBuybox.config.active') and page.product.translated.customFields.zenit_floating_buybox_hidden is not same as (true) %}
  14.             {% if not (page.product.parentId and page.configuratorSettings|length > 0) or page.product.parentId and page.configuratorSettings|length > 0 and config('zenitAppFloatingBuybox.config.showOnVariants') %}
  15.                 {# ... js config #}
  16.                 {% set floatingBuxboxOptions = {
  17.                     viewports: config('zenitAppFloatingBuybox.config.statemanager') ? config('zenitAppFloatingBuybox.config.statemanager') : ['XS', 'SM', 'MD', 'LG', 'XL'],
  18.                     offsetTop: config('zenitAppFloatingBuybox.config.offsetTop'),
  19.                     offsetBottom: config('zenitAppFloatingBuybox.config.offsetBottom'),
  20.                     scrollUpButtonHidden: config('zenitAppFloatingBuybox.config.scrollUpButtonHidden')
  21.                 } %}
  22.                 {# ... prices #}
  23.                 {% set price = page.product.calculatedPrice %}
  24.                 {% if page.product.calculatedPrices|length == 1 %}
  25.                     {% set price = page.product.calculatedPrices.first %}
  26.                 {% endif %}
  27.                 {% block zenit_floating_buybox_container %}
  28.                     <div class="buybox-floating js-hidden" data-floating-buybox="true" data-zen-app-floating-buybox-options="{{ floatingBuxboxOptions|json_encode }}">
  29.                         {% block zenit_floating_buybox_inner %}
  30.                             <div class="buybox-floating-inner" data-floating-buybox-collapse="true">
  31.                                 <div class="container{% if not config('zenitAppFloatingBuybox.config.innerContainer') %}-fluid{% endif %}">
  32.                                     {% block zenit_floating_buybox_configurator %}
  33.                                         {% if page.product.parentId and page.configuratorSettings|length > 0 and config('zenitAppFloatingBuybox.config.showConfigurator') and page.product.translated.customFields.zenit_floating_variant_configuration_hidden is not same as (true) %}
  34.                                             {% sw_include '@Storefront/storefront/zenit-floating-buybox/floating-buybox-configurator.html.twig' %}
  35.                                         {% endif %}
  36.                                     {% endblock %}
  37.                                     <div class="row mx-n1 mx-lg-n2 justify-content-center">
  38.                                         {% if page.product.parentId and page.configuratorSettings|length > 0 and config('zenitAppFloatingBuybox.config.showConfigurator') and page.product.translated.customFields.zenit_floating_variant_configuration_hidden is not same as (true) %}
  39.                                             <div class="product-detail-configurator-groups-toggle-container px-1 px-lg-2 {{ groupsToggleContainerClasses }}" data-floating-buybox-toggler="true">
  40.                                                 {% sw_include '@Storefront/storefront/zenit-floating-buybox/floating-buybox-configurator-groups-toggle.html.twig' %}
  41.                                             </div>
  42.                                         {% endif %}
  43.                                         {% block zenit_floating_buybox_price %}
  44.                                             {% if config('zenitAppFloatingBuybox.config.showPrice') %}
  45.                                                 <div class="product-detail-price-container px-1 px-lg-2 {{ priceContainerClasses }}">
  46.                                                     {% if page.product.calculatedPrices|length <= 1 %}
  47.                                                         {% if cms %}
  48.                                                             {{ block('buy_widget_price_content', '@Storefront/storefront/component/buy-widget/buy-widget-price.html.twig') }}
  49.                                                         {% else %}
  50.                                                             {{ block('page_product_detail_price_content', '@Storefront/storefront/page/product-detail/buy-widget-price.html.twig') }}
  51.                                                         {% endif %}
  52.                                                     {% endif %}
  53.                                                 </div>
  54.                                             {% endif %}
  55.                                         {% endblock %}
  56.                                         {% block zenit_floating_buybox_description %}
  57.                                             {% if config('zenitAppFloatingBuybox.config.showTitle') or config('zenitAppFloatingBuybox.config.showPurchaseunit') %}
  58.                                                 <div class="product-detail-name-container px-1 px-lg-2{% if config('zenitAppFloatingBuybox.config.showPurchaseunit') %} has-purchase-unit{% endif %} {{ descriptionContainerClasses }}">
  59.                                                     {% block zenit_floating_buybox_name %}
  60.                                                         {% if config('zenitAppFloatingBuybox.config.showTitle') %}
  61.                                                             <h6 class="product-detail-name"
  62.                                                                 itemprop="name">
  63.                                                                 {{ page.product.translated.name }}
  64.                                                             </h6>
  65.                                                         {% endif %}
  66.                                                     {% endblock %}
  67.                                                     {% block zenit_floating_buybox_purchaseUnit %}
  68.                                                         {% if config('zenitAppFloatingBuybox.config.showPurchaseunit') %}
  69.                                                             {% if page.product.purchaseUnit %}
  70.                                                                 {% if cms %}
  71.                                                                     {{ block('buy_widget_price_unit', '@Storefront/storefront/component/buy-widget/buy-widget-price.html.twig') }}
  72.                                                                 {% else %}
  73.                                                                     {{ block('page_product_detail_price_unit', '@Storefront/storefront/page/product-detail/buy-widget-price.html.twig') }}
  74.                                                                 {% endif %}
  75.                                                             {% endif %}
  76.                                                         {% endif %}
  77.                                                     {% endblock %}
  78.                                                 </div>
  79.                                             {% endif %}
  80.                                         {% endblock %}
  81.                                         {% block zenit_floating_buybox_form %}
  82.                                             <div class="product-detail-form-container px-1 px-lg-2 {{ formContainerClasses }}">
  83.                                                 {% sw_include '@Storefront/storefront/' ~ path ~ 'buy-widget-form.html.twig' with {
  84.                                                     floatingBuyboxId: 'Floating'
  85.                                                 } %}
  86.                                             </div>
  87.                                         {% endblock %}
  88.                                     </div>
  89.                                 </div>
  90.                             </div>
  91.                         {% endblock %}
  92.                     </div>
  93.                 {% endblock %}
  94.             {% endif %}
  95.         {% endif %}
  96.     {% endif %}
  97. {% endblock %}