custom/plugins/WynTheme/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.   <div class="product-action">
  5.     {% set isAvailable = not product.isCloseout or (product.availableStock >= product.minPurchase) %}
  6.     {% set displayFrom = product.calculatedPrices.count > 1 %}
  7.     {% set displayBuyButton = isAvailable and not displayFrom and product.childCount <= 0 %}
  8.     {% if (displayBuyButton or showAmountSelection) and config('core.listing.allowBuyInListing') %}
  9.       {% block component_product_box_action_buy %}
  10.         {# @var product \Shopware\Core\Content\Product\SalesChannel\SalesChannelProductEntity #}
  11.         <form
  12.           action="{{ path('frontend.checkout.line-item.add') }}"
  13.           method="post"
  14.           class="buy-widget"
  15.           data-add-to-cart="true"
  16.         >
  17.           {% block component_product_box_action_buy_csrf %}
  18.             {{ parent() }}
  19.           {% endblock %}
  20.           {% block component_product_box_action_form %}
  21.             {% block component_product_box_action_buy_redirect_input %}
  22.               {{ parent() }}
  23.             {% endblock %}
  24.             {% block page_product_detail_buy_product_buy_info %}
  25.               {{ parent() }}
  26.             {% endblock %}
  27.             {% block page_product_detail_product_buy_meta %}
  28.               {{ parent() }}
  29.             {% endblock %}
  30.             <wyn-button
  31.               variant="secondary"
  32.               href="{{ seoUrl('frontend.detail.page', {'productId': id}) }}"
  33.               class="details-link"
  34.             >
  35.               {{ "general.readMore"|trans|sw_sanitize }}
  36.             </wyn-button>
  37.             {% block wyn_product_compare_button_add %}
  38. {#              TODO class="btn btn-icon btn-icon--light btn-icon--with-shadow js-tooltip"#}
  39.               <wyn-button
  40.                 variant="secondary"
  41.                 icon-button
  42.                 class="compare-button js-tooltip"
  43.                 title="{{ "Vergleichen"|trans|striptags }}"
  44.               >
  45.                 {% sw_icon 'compare' style { 'slotAttr': 'icon' } %}
  46.               </wyn-button>
  47.             {% endblock %}
  48.             {% block page_product_detail_product_buy_button %}
  49.               <wyn-button
  50.                 variant="buy"
  51.                 type="submit"
  52.                 class="buy-button {% if not buyButtonNoTooltip %}js-tooltip{% endif %}"
  53.                 title="{{ "listing.boxAddProduct"|trans|striptags }}"
  54.               >
  55.               </wyn-button>
  56.             {% endblock %}
  57.           {% endblock %}
  58.         </form>
  59.       {% endblock %}
  60.     {% else %}
  61.       {% block component_product_box_action_detail %}
  62.         <wyn-button
  63.           variant="secondary"
  64.           href="{{ seoUrl('frontend.detail.page', {'productId': id}) }}"
  65.           class="details-link"
  66.         >
  67.           {{ "general.readMore"|trans|sw_sanitize }}
  68.         </wyn-button>
  69.       {% endblock %}
  70.       {% block wyn_product_compare_button_add_no_buy %}
  71. {#        TODO class="btn btn-icon btn-icon--light btn-icon--with-shadow js-tooltip"#}
  72.         <wyn-button
  73.           variant="secondary"
  74.           icon-button
  75.           class="compare-button js-tooltip"
  76.           title="{{ "Vergleichen"|trans|striptags }}"
  77.         >
  78.           {% sw_icon 'compare' style { 'slotAttr': 'icon' } %}
  79.         </wyn-button>
  80.       {% endblock %}
  81.     {% endif %}
  82.   </div>
  83.   {% block component_product_box_action_meta %}
  84.     {{ parent() }}
  85.   {% endblock %}
  86. {% endblock %}