custom/plugins/DmfManuTheme/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 {% if theme_config('dmf-product-box-wishlist-position') == 'button' %}wishlist-button{% endif %}">
  6.             {% set isAvailable = not product.isCloseout or (product.availableStock >= product.minPurchase) %}
  7.             {% set displayFrom = product.calculatedPrices.count > 1 %}
  8.             {% set displayBuyButton = isAvailable and not displayFrom and product.childCount <= 0 %}
  9.             {% if displayBuyButton %}
  10.                 {% block component_product_box_action_buy %}
  11.                     {# @var product \Shopware\Core\Content\Product\SalesChannel\SalesChannelProductEntity #}
  12.                     <form action="{{ path('frontend.checkout.line-item.add') }}" method="post" class="buy-widget" data-add-to-cart="true">
  13.                         {% block component_product_box_action_buy_csrf %}
  14.                             {{ sw_csrf('frontend.checkout.line-item.add') }}
  15.                         {% endblock %}
  16.                         {% block component_product_box_action_form %}
  17.                             {% block component_product_box_action_buy_redirect_input %}
  18.                                 {{parent()}}
  19.                             {% endblock %}
  20.                             {% block page_product_detail_buy_product_buy_info %}
  21.                                 {{parent()}}
  22.                             {% endblock %}
  23.                             {% block page_product_detail_product_buy_meta %}
  24.                                 {{parent()}}
  25.                             {% endblock %}
  26.                             <button class="btn btn-block btn-buy" title="{{ "listing.boxAddProduct"|trans|striptags }}">
  27.                                 <span class="mr-1">
  28.                                     {% sw_icon 'shopping-bag' style { 'color': 'bag', 'size': size, 'pack': 'default' } %}
  29.                                 </span>
  30.                                 {{ "listing.boxAddProduct"|trans|sw_sanitize }}
  31.                             </button>
  32.                         {% endblock %}
  33.                     </form>
  34.                 {% endblock %}
  35.             {% else %}
  36.                 {% block component_product_box_action_detail %}
  37.                     {{parent()}}
  38.                 {% endblock %}
  39.             {% endif %}
  40.             {% if theme_config('dmf-product-box-wishlist-position') == 'button' %}
  41.                 {% sw_include '@Storefront/storefront/component/product/card/wishlist.html.twig' with {
  42.                     appearance: 'circle',
  43.                     productId: id
  44.                 } %}
  45.             {% endif %}
  46.         </div>
  47.     {% endif %}
  48.     {% block component_product_box_action_meta %}
  49.         {{parent()}}
  50.     {% endblock %}
  51. {% endblock %}