{% sw_extends '@Storefront/storefront/component/product/card/box-standard.html.twig' %}
{% block component_product_box_rating %}
{% if app.request.attributes.get('theme-name') != 'CogiThemeTulip' %}
{{ parent() }}
{% else %}
<div class="product-manufacturer">
{{ product.manufacturer.translated.name }}
</div>
{% if shopware.config.CogiThemeTulip.config.showReviews %}
<div class="product-rating text-center">
{% sw_include 'storefront/component/review/rating.html.twig' with {
points: product.ratingAverage,
style: 'text-primary'
} %}
</div>
{% endif %}
{% endif %}
{% endblock %}
{% block component_product_box_badges %}
{{ parent() }}
{% if app.request.attributes.get('theme-name') == 'CogiThemeTulip' %}
<div class="product-buttons">
{% if not shopware.config.CogiThemeTulip.config.switchBasketDetailButtons %}
{% if shopware.config.CogiThemeTulip.config.useQuickView %}
<button
class="btn btn-circle btn-light product-details-button cogi-quickview-btn"
data-toggle="modal"
data-url="/quickview/{{ id }}"
data-modal-class="cogi-quickview"
title="{{ "cogi.theme.tulip.quickview"|trans }}">
{% sw_icon 'eye-open' %}
</button>
{% else %}
<a href="{{ seoUrl('frontend.detail.page', {'productId': product.id}) }}" class="btn btn-circle btn-light product-details-button">
{% sw_icon 'eye-open' %}
</a>
{% endif %}
{% else %}
{% if not shopware.config.CogiThemeTulip.config.noBasketButton %}
{% set isVariant = product.parentId is not null %}
{% set isParent = product.childCount > 0 %}
{% set isAvailable = not product.isCloseout or (product.availableStock >= product.minPurchase) %}
{% if isAvailable and not isParent and not isVariant %}
<form action="{{ path('frontend.checkout.line-item.add') }}"
method="post"
class="buy-widget"
data-add-to-cart="true">
{% block component_product_box_action_buy_csrf %}
{{ sw_csrf('frontend.checkout.line-item.add') }}
{% endblock %}
{% block component_product_box_action_form %}
{% block component_product_box_action_buy_redirect_input %}
<input type="hidden" name="redirectTo" value="frontend.cart.offcanvas">
{% endblock %}
{% block page_product_detail_buy_product_buy_info %}
<input type="hidden" name="lineItems[{{ id }}][id]" value="{{ id }}">
<input type="hidden" name="lineItems[{{ id }}][referencedId]" value="{{ id }}">
<input type="hidden" name="lineItems[{{ id }}][type]" value="product">
<input type="hidden" name="lineItems[{{ id }}][stackable]" value="1">
<input type="hidden" name="lineItems[{{ id }}][removable]" value="1">
<input type="hidden" name="lineItems[{{ id }}][quantity]" value="1">
{% endblock %}
<button class="btn btn-circle btn-buy" title="{{ "listing.boxAddProduct"|trans|striptags }}">
{% if not shopware.config.CogiThemeTulip.config.useCartIcon %}
{% sw_icon 'bag' %}
{% else %}
{% sw_icon 'cart' %}
{% endif %}
</button>
{% endblock %}
</form>
{% elseif isParent or isVariant %}
{#
<button class="btn btn-circle btn-buy"
data-toggle="modal"
data-url="/variantselect/{{ id }}"
data-modal-class="cogi-quickview"
title="{{ "cogi.theme.tulip.chooseVariantAndAddToBasket"|trans }}">
{% if not shopware.config.CogiThemeTulip.config.useCartIcon %}
{% sw_icon 'bag' %}
{% else %}
{% sw_icon 'cart' %}
{% endif %}
</button>
#}
{% endif %}
{% endif %}
{% endif %}
</div>
{% endif %}
{% endblock %}
{#% block component_product_box_description %}
{% if app.request.attributes.get('theme-name') != 'CogiThemeTulip' %}
{{ parent() }}
{% else %}
{% if shopware.config.CogiThemeTulip.config.showExcerpt %}
{{ parent() }}
{% endif %}
{% endif %}
{% endblock %#}
{% block component_product_box_price %}
{{ parent() }}
<div class="mt-3">
{% if product.deliveryTime %}
{% sw_include '@Storefront/storefront/component/delivery-information.html.twig' %}
{% else %}
{% endif %}
</div>
{% endblock %}