custom/apps/AtlKatanaTheme/Resources/views/storefront/component/buy-widget/buy-widget.html.twig line 1

Open in your IDE?
  1. {% sw_extends '@Storefront/storefront/component/buy-widget/buy-widget.html.twig' %}
  2. {% block buy_widget_price %}
  3.     {% block buy_widget_headline %}
  4.         <div class="col product-detail-name-container">
  5.             {% block buy_widget_name %}
  6.                 <h1 class="product-detail-name"
  7.                     itemprop="name">
  8.                     {{ product.translated.name }}
  9.                 </h1>
  10.             {% endblock %}
  11.         </div>
  12.     {% endblock %}
  13.     {% block buy_widget_headline_reviews %}
  14.         {% if theme_config('atl-product-detail-reviews') == 'below-title' %}
  15.             {% sw_include '@Storefront/storefront/skin/global/component/buy-widget/buy-widget-reviews.html.twig' %}
  16.         {% endif %}
  17.     {% endblock %}
  18.     {{ parent() }}
  19. {% endblock %}
  20. {% block buy_widget_tax %}
  21.     <div class="product-detail-tax-container">
  22.         {% if context.taxState == "gross" %}
  23.             {% set taxText = 'atl-katana-theme.general.grossTaxInformation'|trans|sw_sanitize %}
  24.         {% else %}
  25.             {% set taxText = 'atl-katana-theme.general.netTaxInformation'|trans|sw_sanitize %}
  26.         {% endif %}
  27.         <p class="product-detail-tax">
  28.             {% block buy_widget_tax_link %}
  29.                 {{ taxText }}
  30.                 <a class="product-detail-tax-link"
  31.                    href="{{ path('frontend.cms.page',{ id: config('core.basicInformation.shippingPaymentInfoPage') }) }}"
  32.                    title="{{ taxText }}"
  33.                    {{ dataBsToggleAttr }}="modal"
  34.                    data-url="{{ path('frontend.cms.page',{ id: config('core.basicInformation.shippingPaymentInfoPage') }) }}">
  35.                     {{ 'checkout.summaryShipping'|trans|sw_sanitize }}
  36.                 </a>
  37.             {% endblock %}
  38.         </p>
  39.         {% block buy_widget_manufacturer %}
  40.             {% if product.manufacturer and theme_config('atl-product-detail-manufacturer') == 'default' %}
  41.                 <p class="product-detail-manufacturer">
  42.                     {% block buy_widget_manufacturer_link %}
  43.                         {% if product.manufacturer.media is empty and theme_config('atl-product-detail-manufacturer-layout') == 'logo' or
  44.                             theme_config('atl-product-detail-manufacturer-layout') == 'text' %}
  45.                             <span>{{ 'atl-katana-theme.detail.byManufacturer'|trans|sw_sanitize }}</span>
  46.                         {% endif %}
  47.                         <a href="{{ product.manufacturer.link }}"
  48.                            class="product-detail-manufacturer-link"
  49.                            rel="noreferrer noopener"
  50.                            target="_blank"
  51.                            title="{{ product.manufacturer.translated.name }}">
  52.                             {% if product.manufacturer.media and theme_config('atl-product-detail-manufacturer-layout') == 'logo' %}
  53.                                 {% block buy_widget_manufacturer_logo %}
  54.                                     <img src="{{ product.manufacturer.media|sw_encode_media_url }}"
  55.                                          class="product-detail-manufacturer-logo"
  56.                                          alt="{{ product.manufacturer.translated.name }}"/>
  57.                                 {% endblock %}
  58.                             {% else %}
  59.                                 {% block buy_widget_manufacturer_text %}
  60.                                     {{ product.manufacturer.translated.name }}
  61.                                 {% endblock %}
  62.                             {% endif %}
  63.                         </a>
  64.                     {% endblock %}
  65.                 </p>
  66.             {% endif %}
  67.         {% endblock %}
  68.     </div>
  69. {% endblock %}
  70. {% block buy_widget_reviews %}
  71.     {% if theme_config('atl-product-detail-reviews') == 'default' %}
  72.         {% sw_include '@Storefront/storefront/skin/global/component/buy-widget/buy-widget-reviews.html.twig' %}
  73.     {% endif %}
  74. {% endblock %}
  75. {% block buy_widget_delivery_informations %}
  76.     {% block buy_widget_features %}
  77.         {% sw_include '@Storefront/storefront/skin/global/component/product/features.html.twig' with { 'product': product } %}
  78.     {% endblock %}
  79.     {{ parent() }}
  80. {% endblock %}
  81. {% block buy_widget_ordernumber_container %}
  82.     <div class="product-detail-specifications">
  83.         {% if theme_config('atl-product-detail-show-product-number') == 'true' %}
  84.             {{ parent() }}
  85.         {% endif %}
  86.         {% block buy_widget_ean_container %}
  87.             {% if product.ean and theme_config('atl-product-detail-show-ean') == 'true' %}
  88.                 <div class="product-detail-ordernumber-container">
  89.                     {% block buy_widget_ean_label %}
  90.                         <span class="product-detail-ordernumber-label">
  91.                             {{ 'component.product.feature.label.ean'|trans|sw_sanitize }}
  92.                         </span>
  93.                     {% endblock %}
  94.                     {% block buy_widget_ean %}
  95.                         <span class="product-detail-ordernumber"
  96.                               itemprop="sku">
  97.                             {{ product.ean }}
  98.                         </span>
  99.                     {% endblock %}
  100.                 </div>
  101.             {% endif %}
  102.         {% endblock %}
  103.         {% block buy_widget_measures_container %}
  104.             {% if theme_config('atl-product-detail-measures') != 'hide' %}
  105.                 {% set width = product.width / theme_config('atl-product-detail-measures') %}
  106.                 {% set height = product.height / theme_config('atl-product-detail-measures') %}
  107.                 {% set length = product.length / theme_config('atl-product-detail-measures') %}
  108.                 {% set unit = 'mm' %}
  109.                 {% if theme_config('atl-product-detail-measures') == 10 %}
  110.                     {% set unit = 'cm' %}
  111.                 {% endif %}
  112.                 {% if width > 0 or height > 0 or length > 0 %}
  113.                     <div class="product-detail-measures">
  114.                         {% block buy_widget_measures_width %}
  115.                             {% if width > 0 %}
  116.                                 <div class="product-detail-ordernumber-container">
  117.                                     {{ 'component.product.feature.label.width'|sw_sanitize|trans }} {{ width|number_format(2, ',', '.') }} {{ unit }}
  118.                                 </div>
  119.                             {% endif %}
  120.                         {% endblock %}
  121.                         {% block buy_widget_measures_height %}
  122.                             {% if height > 0 %}
  123.                                 <div class="product-detail-ordernumber-container">
  124.                                     {{ 'component.product.feature.label.height'|sw_sanitize|trans }} {{ height|number_format(2, ',', '.') }} {{ unit }}
  125.                                 </div>
  126.                             {% endif %}
  127.                         {% endblock %}
  128.                         {% block buy_widget_measures_length %}
  129.                             {% if length > 0 %}
  130.                                 <div class="product-detail-ordernumber-container">
  131.                                     {{ 'component.product.feature.label.length'|sw_sanitize|trans }} {{ length|number_format(2, ',', '.') }} {{ unit }}
  132.                                 </div>
  133.                             {% endif %}
  134.                         {% endblock %}
  135.                     </div>
  136.                 {% endif %}
  137.             {% endif %}
  138.         {% endblock %}
  139.         {% block buy_widget_weight_container %}
  140.             {% if product.weight and theme_config('atl-product-detail-show-weight') == 'true' %}
  141.                 <div class="product-detail-ordernumber-container">
  142.                     {% block buy_widget_weight_label %}
  143.                         <span class="product-detail-ordernumber-label">
  144.                             {{ 'component.product.feature.label.weight'|trans|sw_sanitize }}
  145.                         </span>
  146.                     {% endblock %}
  147.                     {% block buy_widget_weight %}
  148.                         <span class="product-detail-ordernumber">
  149.                             {{ product.weight|number_format(2, ',', '.') }} kg
  150.                         </span>
  151.                     {% endblock %}
  152.                 </div>
  153.             {% endif %}
  154.         {% endblock %}
  155.     </div>
  156.     {% block buy_widget_collapses %}
  157.         {% if theme_config('atl-product-detail-tab-position') == 'buy-box' %}
  158.             <div class="cms-collapses">
  159.                 {% sw_include '@Storefront/storefront/skin/global/component/product/collapses.html.twig' %}
  160.             </div>
  161.         {% endif %}
  162.     {% endblock %}
  163.     {% block buy_widget_share %}
  164.         {% if theme_config('atl-product-detail-share') == 'buy-box-end' %}
  165.             {% if product.parentId %}
  166.                 {% set productUrl = seoUrl('frontend.detail.page', { productId: product.parentId }) %}
  167.             {% else %}
  168.                 {% set productUrl = seoUrl('frontend.detail.page', { productId: product.id }) %}
  169.             {% endif %}
  170.             <div class="product-detail-share">
  171.                 {% block buy_widget_share_label %}
  172.                     <span>{{ "atl-katana-theme.detail.shareLabel"|trans|sw_sanitize }}</span>
  173.                 {% endblock %}
  174.                 {% block buy_widget_share_facebook %}
  175.                     <a href="https://www.facebook.com/sharer.php?u={{ productUrl }}" title="Facebook" target="_blank" rel="noopener">
  176.                         {% sw_icon 'facebook' style {
  177.                             'namespace': 'AtlKatanaTheme',
  178.                             'pack':  theme_config('atl-icon-set'),
  179.                             'color': 'text-color',
  180.                             'size': 'sm'
  181.                         } %}
  182.                     </a>
  183.                 {% endblock %}
  184.                 {% block buy_widget_share_twitter %}
  185.                     <a href="https://twitter.com/share?text=1952&url={{ productUrl }}" title="Twitter" target="_blank" rel="noopener">
  186.                         {% sw_icon 'twitter' style {
  187.                             'namespace': 'AtlKatanaTheme',
  188.                             'pack':  theme_config('atl-icon-set'),
  189.                             'color': 'text-color',
  190.                             'size': 'sm'
  191.                         } %}
  192.                     </a>
  193.                 {% endblock %}
  194.                 {% block buy_widget_share_pinterest %}
  195.                     <a href="https://pinterest.com/pin/create/button/?url={{ productUrl }}" title="Pinterest" target="_blank" rel="noopener">
  196.                         {% sw_icon 'pinterest' style {
  197.                             'namespace': 'AtlKatanaTheme',
  198.                             'pack':  theme_config('atl-icon-set'),
  199.                             'color': 'text-color',
  200.                             'size': 'sm'
  201.                         } %}
  202.                     </a>
  203.                 {% endblock %}
  204.             </div>
  205.         {% endif %}
  206.     {% endblock %}
  207. {% endblock %}