{% sw_extends '@Storefront/storefront/component/product/card/action.html.twig' %}
{% block component_product_box_action_inner %}
{% set id = product.id %}
<div class="product-action">
{% set isAvailable = not product.isCloseout or (product.availableStock >= product.minPurchase) %}
{% set displayFrom = product.calculatedPrices.count < 1 %}
{% set displayBuyButton = isAvailable and displayFrom and product.childCount <= 0 %}
{% if displayBuyButton and config('core.listing.allowBuyInListing') and context.customer %}
{% block component_product_box_action_buy %}
{{ parent() }}
{% endblock %}
{% else %}
{% block component_product_box_action_detail %}
{{ parent() }}
{% endblock %}
{% endif %}
</div>
{% block component_product_box_action_meta %}
{{ parent() }}
{% endblock %}
{% endblock %}