{% set product = order_item.variant.product %}
{% form_theme form '@SyliusShop/Form/theme.html.twig' %}
<div id="sylius-product-selecting-variant">
{{ sonata_block_render_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': 'sylius-product-adding-to-cart',
'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"></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 %}
{# {{ form_row(form.cartItem.quantity) }}#}
{{ sonata_block_render_event('sylius.shop.product.show.add_to_cart_form', {
'product': product,
'order_item': order_item
}) }}
{# {{ form_widget(form.wishlists) }}#}
<br />
{% if product.getVendor() is null or product.getVendor().isEnabled() %}
<button type="submit" class="ui large right floated primary icon labeled button" id="buy-product">
Acheter
</button>
{% endif %}
{# <button#}
{# id="{{ form.addToWishlist.vars.id }}"#}
{# name="{{ form.addToWishlist.vars.full_name }}"#}
{# class="{{ form.addToWishlist.vars.attr.class }}"#}
{# data-bb-toggle="wishlist-variant"#}
{# {{ sylius_test_html_attribute('wishlist-add-variant') }}#}
{# >#}
{# <i class="heart icon"></i>#}
{# {{ form.addToWishlist.vars.label|trans }}#}
{# </button>#}
{{ form_row(form._token) }}
{{ form_end(form, {'render_rest': false}) }}
<a href="" class="ui large button" id="send-message">
Message
</a>
</div>
<style>
/*#sylius-product-selecting-variant{*/
/* display: flex;*/
/* flex-direction: row;*/
/* align-items: center;*/
/* justify-content: flex-end;*/
/* gap: 2rem;*/
/*}*/
/*#send-message, #buy-product{*/
/* width: fit-content;*/
/* padding: 1.25rem 2rem !important;*/
/* color: white;*/
/* height: fit-content;*/
/* font-weight: bold;*/
/* border-radius: 0 !important;*/
/*}*/
/*#buy-product{*/
/* background-color: black;*/
/*}*/
/*#send-message{*/
/* background-color: #E35E31;;*/
/*}*/
/*#sylius-product-adding-to-cart{*/
/* display: flex;*/
/* height: fit-content;*/
/*}*/
</style>