custom/plugins/zenitPlatformStratus/src/Resources/views/storefront/component/product/card/action.html.twig line 1

Open in your IDE?
  1. {% sw_extends '@Storefront/storefront/component/product/card/action.html.twig' %}
  2. {% block component_product_box_action_inner %}
  3.     {% set id = product.id %}
  4.     {% if config('core.listing.allowBuyInListing') %}
  5.         <div class="product-action">
  6.             {% set isAvailable = not product.isCloseout or (product.availableStock >= product.minPurchase) %}
  7.             {% set displayFrom = product.calculatedPrices.count > 1 %}
  8.             {% if theme_config('zen-product-listing-card-actions-details-btn-variants') %}
  9.                 {% set displayBuyButton = isAvailable and not displayFrom and product.childCount <= 0 and product.childCount is not null %}
  10.             {% else %}
  11.                 {% set displayBuyButton = isAvailable and not displayFrom and product.childCount <= 0 %}
  12.             {% endif %}
  13.             {% block zen_component_product_box_action_quickview_toggle_with_buy %}
  14.                 {% if theme_config('zen-product-listing-card-actions-quickview') and theme_config('zen-product-listing-card-actions') is same as ('default') %}
  15.                     {% sw_include '@zenitPlatformStratus/storefront/component/product/card/zen-action-quickview-toggle.html.twig' %}
  16.                 {% endif %}
  17.             {% endblock %}
  18.             {% if displayBuyButton %}
  19.                 {% block component_product_box_action_buy %}
  20.                     {# @var product \Shopware\Core\Content\Product\SalesChannel\SalesChannelProductEntity #}
  21.                     <form action="{{ path('frontend.checkout.line-item.add') }}"
  22.                           method="post"
  23.                           class="buy-widget"
  24.                           data-add-to-cart="true">
  25.                         {{ block('component_product_box_action_buy_csrf') }}
  26.                         {% block component_product_box_action_form %}
  27.                             {{ block('component_product_box_action_buy_redirect_input') }}
  28.                             {{ block('page_product_detail_buy_product_buy_info') }}
  29.                             {{ block('page_product_detail_product_buy_meta') }}
  30.                             {% if theme_config('zen-product-listing-card-actions-quantity-select') %}
  31.                                 {% sw_include '@zenitPlatformStratus/storefront/component/product/card/zen-action-buy-widget-container.html.twig' with {
  32.                                     quantityCol:  'col',
  33.                                     buttonCol: 'col-auto',
  34.                                 }  %}
  35.                             {% else %}
  36.                                 <button class="btn btn-block btn-buy"
  37.                                         title="{{ "listing.boxAddProduct"|trans|striptags }}">
  38.                                         {{ "listing.boxAddProduct"|trans|sw_sanitize }}
  39.                                 </button>
  40.                             {% endif %}
  41.                         {% endblock %}
  42.                     </form>
  43.                 {% endblock %}
  44.             {% else %}
  45.                 {% block component_product_box_action_detail %}
  46.                     <a href="{{ seoUrl('frontend.detail.page', {'productId': id}) }}"
  47.                        class="btn btn-block btn-light btn-details"
  48.                        title="{{ "listing.boxProductDetails"|trans|striptags }}">
  49.                         {{ "listing.boxProductDetails"|trans|sw_sanitize }}
  50.                     </a>
  51.                 {% endblock %}
  52.             {% endif %}
  53.         </div>
  54.     {% elseif theme_config('zen-product-listing-card-actions-details-btn') %}
  55.         <div class="product-action">
  56.             {% if theme_config('zen-product-listing-card-actions-details-btn') %}
  57.                 {% block zen_component_product_box_action_detail %}
  58.                     <a href="{{ seoUrl('frontend.detail.page', {'productId': id}) }}"
  59.                        class="btn btn-block btn-light btn-details"
  60.                        title="{{ "listing.boxProductDetails"|trans|striptags }}">
  61.                         {{ "listing.boxProductDetails"|trans|sw_sanitize }}
  62.                     </a>
  63.                 {% endblock %}
  64.             {% endif %}
  65.         </div>
  66.     {% endif %}
  67.     {{ block('component_product_box_action_meta') }}
  68. {% endblock %}