custom/plugins/CogiThemeTulip/src/Resources/views/storefront/component/product/card/box-standard.html.twig line 1

Open in your IDE?
  1. {% sw_extends '@Storefront/storefront/component/product/card/box-standard.html.twig' %}
  2. {% block component_product_box_rating %}
  3. {% if app.request.attributes.get('theme-name') != 'CogiThemeTulip' %}
  4. {{ parent() }}
  5. {% else %}
  6.     <div class="product-manufacturer">
  7.         {{ product.manufacturer.translated.name }}
  8.     </div>
  9.     {% if shopware.config.CogiThemeTulip.config.showReviews %}
  10.         <div class="product-rating text-center">
  11.             {% sw_include 'storefront/component/review/rating.html.twig' with {
  12.                 points: product.ratingAverage,
  13.                 style: 'text-primary'
  14.             } %}
  15.         </div>
  16.     {% endif %}
  17. {% endif %}
  18. {% endblock %}
  19. {% block component_product_box_badges %}
  20.     {{ parent() }}
  21.     {% if app.request.attributes.get('theme-name') == 'CogiThemeTulip' %}
  22.         <div class="product-buttons">
  23.             {% if not shopware.config.CogiThemeTulip.config.switchBasketDetailButtons %}
  24.                 {% if shopware.config.CogiThemeTulip.config.useQuickView %}
  25.                     <button
  26.                         class="btn btn-circle btn-light product-details-button cogi-quickview-btn"
  27.                         data-toggle="modal"
  28.                         data-url="/quickview/{{ id }}"
  29.                         data-modal-class="cogi-quickview"
  30.                         title="{{ "cogi.theme.tulip.quickview"|trans }}">
  31.                         {% sw_icon 'eye-open' %}
  32.                     </button>
  33.                 {% else %}
  34.                     <a href="{{ seoUrl('frontend.detail.page', {'productId': product.id}) }}" class="btn btn-circle btn-light product-details-button">
  35.                         {% sw_icon 'eye-open' %}
  36.                     </a>
  37.                 {% endif %}
  38.             {% else %}
  39.                 {% if not shopware.config.CogiThemeTulip.config.noBasketButton %}
  40.                     {% set isVariant = product.parentId is not null %}
  41.                     {% set isParent = product.childCount > 0 %}
  42.                     {% set isAvailable = not product.isCloseout or (product.availableStock >= product.minPurchase) %}
  43.                     {% if isAvailable and not isParent and not isVariant  %}
  44.                         <form action="{{ path('frontend.checkout.line-item.add') }}"
  45.                               method="post"
  46.                               class="buy-widget"
  47.                               data-add-to-cart="true">
  48.                             {% block component_product_box_action_buy_csrf %}
  49.                                 {{ sw_csrf('frontend.checkout.line-item.add') }}
  50.                             {% endblock %}
  51.                             {% block component_product_box_action_form %}
  52.                                 {% block component_product_box_action_buy_redirect_input %}
  53.                                     <input type="hidden" name="redirectTo" value="frontend.cart.offcanvas">
  54.                                 {% endblock %}
  55.                                 {% block page_product_detail_buy_product_buy_info %}
  56.                                     <input type="hidden" name="lineItems[{{ id }}][id]" value="{{ id }}">
  57.                                     <input type="hidden" name="lineItems[{{ id }}][referencedId]" value="{{ id }}">
  58.                                     <input type="hidden" name="lineItems[{{ id }}][type]" value="product">
  59.                                     <input type="hidden" name="lineItems[{{ id }}][stackable]" value="1">
  60.                                     <input type="hidden" name="lineItems[{{ id }}][removable]" value="1">
  61.                                     <input type="hidden" name="lineItems[{{ id }}][quantity]" value="1">
  62.                                 {% endblock %}
  63.                                 <button class="btn btn-circle btn-buy" title="{{ "listing.boxAddProduct"|trans|striptags }}">
  64.                                     {% if not shopware.config.CogiThemeTulip.config.useCartIcon %}
  65.                                         {% sw_icon 'bag' %}
  66.                                     {% else %}
  67.                                         {% sw_icon 'cart' %}
  68.                                     {% endif %}
  69.                                 </button>
  70.                             {% endblock %}
  71.                         </form>
  72.                     {% elseif isParent or isVariant %}
  73.                         {#
  74.                         <button class="btn btn-circle btn-buy"
  75.                             data-toggle="modal"
  76.                             data-url="/variantselect/{{ id }}"
  77.                             data-modal-class="cogi-quickview"
  78.                             title="{{ "cogi.theme.tulip.chooseVariantAndAddToBasket"|trans }}">
  79.                             {% if not shopware.config.CogiThemeTulip.config.useCartIcon %}
  80.                                 {% sw_icon 'bag' %}
  81.                             {% else %}
  82.                                 {% sw_icon 'cart' %}
  83.                             {% endif %}
  84.                         </button>
  85.                         #}
  86.                     {% endif %}
  87.                 {% endif %}
  88.             {% endif %}
  89.         </div>
  90.     {% endif %}
  91. {% endblock %}
  92. {#% block component_product_box_description %}
  93. {% if app.request.attributes.get('theme-name') != 'CogiThemeTulip' %}
  94. {{ parent() }}
  95. {% else %}
  96.     {% if shopware.config.CogiThemeTulip.config.showExcerpt %}
  97.         {{ parent() }}
  98.     {% endif %}
  99. {% endif %}
  100. {% endblock %#}
  101. {% block component_product_box_price %}
  102.     {{ parent() }}
  103.     <div class="mt-3">
  104.         {% if product.deliveryTime %}
  105.             {% sw_include '@Storefront/storefront/component/delivery-information.html.twig' %}
  106.         {% else %}
  107.             &nbsp;
  108.         {% endif %}
  109.     </div>
  110. {% endblock %}