{% set product = order_item.variant.product %}
{% set variant = order_item.variant %}
{% set formId = 'sylius-product-adding-to-cart-' ~ product.id %}
{% form_theme form '@SyliusShop/Form/theme.html.twig' %}
{% if is_product_owned(product) is empty %}
<div class="addToCartButton mr-2">
{{ sylius_template_event('sylius.shop.product.show.before_add_to_cart', {'product': product, 'order_item': order_item}) }}
{{ form_start(form, {'action': path('sylius_shop_ajax_cart_add_item', {'productId': product.id}), 'attr': {'id': formId, 'class': 'ui loadable form', 'novalidate': 'novalidate', 'data-redirect': path(configuration.getRedirectRoute('summary'))}}) }}
{{ form_errors(form) }}
<div class="ui red label bottom pointing hidden sylius-validation-error" id="sylius-cart-validation-error" {{ sylius_test_html_attribute('cart-validation-error') }}></div>
{# {% if not product.simple %}#}
{# {% if product.variantSelectionMethodChoice %}#}
{# {% include '@SyliusShop/Product/Show/_variants.html.twig' %}#}
{# {% else %}#}
{# {% include '@SyliusShop/Product/Show/_options.html.twig' %}#}
{# {% endif %}#}
{# {% endif %}#}
{{ sylius_template_event('sylius.shop.product.show.add_to_cart_form', {'product': product, 'order_item': product|sylius_resolve_variant }) }}
{% if form._token is defined %}
{{ form_row(form._token) }}
{% endif %}
{{ form_end(form, {'render_rest': false}) }}
{% set price = variant.getChannelPricingForChannel(sylius.channel).price %}
{% if product.simple %}
<button class="ui primary button quick-add-to-cart" {{ sylius_test_html_attribute('add-cart-btn') }} data-form-id="{{ formId }}">
<span class="d-block d-md-none"> {{ 'sylius.ui.add_to_cart'|trans }}</span>
<img class="d-none d-md-block" src="{{ asset('assets/shop/img/addtocart.svg') }}" alt="Ajouter au panier" />
</button>
{% else %}
<a href="{{ path('sylius_shop_product_show', {'slug': product.slug}) }}" class="ui primary button see-more">
<span class="d-none d-md-block">+</span>
<span class="d-block d-md-none">{{ 'app.pages.blog.shop.article.see_more' | trans }}</span>
</a>
{% endif %}
</div>
{% endif %}