{% import "@SyliusShop/Common/Macro/money.html.twig" as money %}
{% extends '@SyliusShop/layout.html.twig' %}
{% block title %}{{ variant.name }} - {{ parent() }}{% endblock %}
{% block metatags %}
{{ parent() }}
{% if app.request.locale|slice(0, 2) == 'en' %}
<meta name="description" content="{{ variant.name }} - Our tips for accessorizing it and matching it with our other products. Free delivery in store - Choose your color of {{ variant.product.name }}" />
{% else %}
<meta name="description" content="{{ variant.name }} - Nos astuces pour l’accessoiriser et l’assortir à nos autres produits. Livraison gratuite en boutique - Choisissez votre coloris de {{ variant.product.name }}" />
{% endif %}
{% endblock %}
{% block javascripts %}
{{ parent() }}
<script charset="utf-8" src="https://cl.avis-verifies.com/fr/cache/5/2/2/522a8f1f-9ade-fc14-a9e5-7424335e0efd/AWS/PRODUCT_API/tag.min.js"></script>
{% endblock %}
{% block content %}
<div class="product-page {% if variant.product.conditioning == 'card_kdo_per_euros_each_10_euros' %} kdo-product-page{% endif %}">
{# Fil d'ariane #}
{{ wo_render_breadcrumbs() }}
{# {{dump(variant.optionValues[0])}} #}
{# {{dump(variant)}} #}
{# Page produit = page d'une déclinaison produit #}
<div class="ui two column stackable grid product-ctn">
<div class="product-ctn-left">
{# Images du produits #}
<div class="images-ctn">
{% if is_mobile() and not is_device('iPad') %}
<div class="flag">
{% include 'partials/block-callout.html.twig' with {'callout': variant.badge} only %}
{# Octobre Rose #}
{# {% if variant.optionValues[0].code == "PL.RO.FU" %}
<img class="lazy oct-rose" src="{{ asset('webapic-theme/images/2024_oct-rose_ruban-fiche.svg') }}" alt="Octobre Rose" />
{% else %}
{% include 'partials/block-callout.html.twig' with {'callout': variant.badge} only %}
{% endif %} #}
</div>
{% if variant.product.images|length > 0 %}
<div class="images-mobiles">
{% for image in variant.imagesByType('image_product_main')|merge(variant.imagesByType('image_product_secondary')) %}
{% set path = image.path is not null ? image.path|imagine_filter('sylius_shop_product_large_thumbnail') : asset('assets/shop/img/200x200.png') %}
{% set original_path = image.path is not null ? image.path|imagine_filter('sylius_shop_product_original') : asset('assets/shop/img/200x200.png') %}
<a href="{{ original_path }}" class="ui fluid image image{{ loop.index }} variantimageright{{ variant.imagesByType('image_product_main')|merge(variant.imagesByType('image_product_secondary'))|length }}" data-lightbox="sylius-product-image" data-idvariant="{{ variant.id }}">
<img class="lazyload" data-src="{{ path }}" alt="{{ variant.name }}" />
</a>
{% endfor %}
</div>
{% endif %}
{% else %}
{% if variant.product.images|length > 1 %}
<div class="ui small images images-left">
<div class="images-left-sticky">
{% for image in variant.imagesByType('image_product_main')|merge(variant.imagesByType('image_product_secondary')) %}
{% set path = image.path is not null ? image.path|imagine_filter('sylius_shop_product_small_thumbnail') : asset('assets/shop/img/200x200.png') %}
<div class="ui image variantimageleft{{ variant.imagesByType('image_product_main')|merge(variant.imagesByType('image_product_secondary'))|length }}" data-idvariant="{{ variant.id }}">
<a href="{{ image.path|imagine_filter('sylius_shop_product_original') }}">
<img class="lazyload" data-src="{{ path }}" data-large-thumbnail="{{ image.path|imagine_filter('sylius_shop_product_large_thumbnail') }}" alt="{{ variant.name }}" />
</a>
</div>
{% endfor %}
</div>
</div>
{% endif %}
<div class="images-right">
<div class="flag">
{% include 'partials/block-callout.html.twig' with {'callout': variant.badge} only %}
{# Octobre Rose #}
{# {% if variant.optionValues[0].code == "PL.RO.FU" %}
<img class="lazy oct-rose" src="{{ asset('webapic-theme/images/2024_oct-rose_ruban-fiche.svg') }}" alt="Octobre Rose" />
{% else %}
{% include 'partials/block-callout.html.twig' with {'callout': variant.badge} only %}
{% endif %} #}
</div>
{# Icones enduction - enduit #}
{# {% if variant.coatingType is not empty %}
<div class="flag enduit">
{% if variant.coatingVegetal == true %}
<img src="{{ asset('webapic-theme/images/produit-enduit-vegetal.svg') }}" class="ui image" />
{% endif %}
{% if variant.coatingType == 'coating_mat' %}
<img src="{{ asset('webapic-theme/images/produit-enduit-exterieur.svg') }}" class="ui image" />
<img src="{{ asset('webapic-theme/images/produit-enduit-mat.svg') }}" class="ui image" />
{% elseif variant.coatingType == 'coating_brillant' %}
<img src="{{ asset('webapic-theme/images/produit-enduit-exterieur.svg') }}" class="ui image" />
<img src="{{ asset('webapic-theme/images/produit-enduit-brillant.svg') }}" class="ui image" />
{% elseif variant.coatingType == 'coating_inner' %}
<img src="{{ asset('webapic-theme/images/produit-enduit-interieur.svg') }}" class="ui image" />
{% elseif variant.coatingType == 'fabric_heat_sealed' %}
<img src="{{ asset('webapic-theme/images/produit-enduit-thermocolle.svg') }}" class="ui image" />
{% endif %}
</div>
{% endif %} #}
{% for image in variant.imagesByType('image_product_main')|merge(variant.imagesByType('image_product_secondary')) %}
{% set path = image.path is not null ? image.path|imagine_filter('app_product_big_main_picture') : asset('assets/shop/img/200x200.png') %}
{% set original_path = image.path is not null ? image.path|imagine_filter('app_product_big_main_picture') : asset('assets/shop/img/200x200.png') %}
<a href="{{ original_path }}" class="ui fluid image image{{ loop.index }} variantimageright{{ variant.imagesByType('image_product_main')|merge(variant.imagesByType('image_product_secondary'))|length }}" data-lightbox="sylius-product-image" data-idvariant="{{ variant.id }}">
<img class="lazyload" data-src="{{ path }}" alt="{{ variant.name }}" />
</a>
{% endfor %}
</div>
{% endif %}
</div>
{# Fin - Images du produits #}
</div>
<div class="product-ctn-right">
<div class="product-ctn-right-sticky">
{# Titre + Ajout à la liste d'envies #}
<div class="titre">
<h1 id="sylius-product-name" itemprop="name" class="ui monster" {{ sylius_test_html_attribute('product-name', variant.name) }}>
{{ variant.name|title }}
</h1>
{% include 'partials/block-add-to-wishlist.html.twig' with {'product': variant} %}
</div>
{# Avis #}
<div class="ui text menu avis">
{# Pour les tissus, on affiche les avis de la déclinaison #}
{% if variant.code|slice(0, 5) == constant('App\\Doctrine\\ORM\\ProductVariantRepository::PREFIX_CODE_DIVALTO_FABRIC') %}
<div class="NETREVIEWS_PRODUCT_STARS" data-product-id="{{ variant.id }}"></div>
{% else %}
<div class="NETREVIEWS_PRODUCT_STARS" data-product-id="{{ variant.product.id }}"></div>
{% endif %}
</div>
{# Prix #}
{% if variant.product.conditioning not in ['card_kdo_per_euros_each_10_euros'] %}
<div class="prices-ctn">
{% set hasDiscount = variant|sylius_has_discount({'channel': sylius.channel}) %}
{% set price = money.calculatePrice(variant) %}
{% set originalPrice = money.calculateOriginalPrice(variant) %}
<div id="product-price" {% if price != originalPrice %}class="promo-product-price"{% endif %} {{ sylius_test_html_attribute('product-price', money.calculatePrice(variant)) }}>
{% spaceless %}
{{ money.calculatePrice(variant) }}
{% if variant.product.conditioning == 'per_meter_each_0_5_meter' %}
/m
{% endif %}
{% endspaceless %}
{% if variant.badge is defined and variant.badge is not empty and variant.badge == "low_price" and variant.product.conditioning != 'per_meter_each_0_5_meter' %}
{% set pricebarre = money.convertAndFormat(variant|sylius_calculate_original_price({'channel': sylius.channel}) * 2) %}
<span class="original-price">{{ pricebarre }}</span>
{% endif %}
</div>
{% if price != originalPrice %}
<div class="original" {{ sylius_test_html_attribute('product-original-price') }}>
<del>{{ originalPrice }}</del>
</div>
{% set marks = variant|sylius_calculate_price({'channel': sylius.channel})|trim %}
{% set total = variant|sylius_calculate_original_price({'channel': sylius.channel})|trim %}
{% set promo = 100 - ((marks * 100) / total) %}
<div class="promo">
- {{ promo|round(0) }}.00 %
</div>
{% endif %}
{% if variant.pricePerTwo > 0 %}
<div class="codepromo">
{{ money.convertAndFormat(variant.pricePerTwo) }}
<br />
{{ 'app.front.produit.lesdeux'|trans }}
</div>
{% endif %}
</div>
{% endif %}
{# Liste des déclinaisons disponible #}
<div class="listingfixe">
<div class="listingfixe-ctn">
<div class="listingfixe-ctn-products">
<div class="listingfixe-products">
{% for rowVariant in allVariants %}
{% if rowVariant.hasImages and rowVariant.canAddItem() %}
{% if rowVariant.imagesByType('image_product_main') is not empty %}
{% set source_path = rowVariant.imagesByType('image_product_main').first.path %}
{% set original_path = source_path|imagine_filter('sylius_shop_product_original') %}
{% set path = source_path|imagine_filter(filter|default('app_product_small_thumbnail_listing')) %}
{% elseif rowVariant.images.first %}
{% set source_path = rowVariant.images.first.path %}
{% set original_path = source_path|imagine_filter('sylius_shop_product_original') %}
{% set path = source_path|imagine_filter(filter|default('app_product_small_thumbnail_listing')) %}
{% else %}
{% set original_path = asset('webapic-theme/images/icon-gmap.png') %}
{% set path = original_path %}
{% endif %}
<div class="listingfixe-product-ctn {% if rowVariant.id == variant.id %}current{% endif %}">
<a href="{{ path('app_product_variant_show', {'slug': rowVariant.slug, 'id': rowVariant.id}) }}">
<div class="img-ctn">
<div class="img-ctn-content">
<img src="{{ path }}" id="main-image" alt="{{ rowVariant.name }}" {{ sylius_test_html_attribute('main-image') }}/>
</div>
</div>
</a>
</div>
{% endif %}
{% endfor %}
</div>
</div>
</div>
</div>
{# Fin - Liste des déclinaisons disponible #}
{# Stock + En boutique #}
<div class="stock-ctn">
<div class="stock-ctn-left">
<img src="{{ asset('webapic-theme/images/icon-produit-stock.svg') }}" class="ui image"/>
<span>
{% if variant.canAddItem() %}
{{ 'app.front.produit.stock'|trans }}
{% else %}
{% if variant.getIsBlocked() %}
{{ 'app.front.produit.availablesoon'|trans }}
{% else %}
{{ 'app.front.produit.outstock'|trans }}
{% endif %}
{% endif %}
</span>
</div>
<div class="stock-ctn-right">
<img src="{{ asset('webapic-theme/images/icon-produit-boutique.svg') }}" class="ui image"/>
<a data-url="{{ path('app_product_shops', {'variantId': variant.id}) }}" href="#">
{% if app.user and app.user.customer and app.user.customer.favoriteShop %}
{% if userFavoriteShopStock == 1 %}
{{ 'app.front.produit.disponible'|trans }}
{% else %}
{{ 'app.front.produit.indisponible'|trans }}
{% endif %}
: {{ app.user.customer.favoriteShop.name }}
{% else %}
{{ 'app.front.produit.trouver'|trans }}
{% endif %}
</a>
</div>
</div>
{# Ajout au panier #}
{% if variant.canAddItem() %}
<div class="addtocart-ctn" id="sylius-product-selecting-variant" {{ sylius_test_html_attribute('product-selecting-variant') }}>
{% if variant.product.conditioning == 'per_meter_each_0_5_meter' %}
{% if meter != 0 %}
<div class="quantite-ctn">
<div class="quantite-select">
<select name="select_tissu" id="add-to-cart" data-idproduct="{{ variant.id }}">
{% for i in range(0.5, meter, 0.5) %}
<option value="{{ i }}"> {{ i }} m</option>
{% endfor %}
</select>
<span></span>
</div>
</div>
{% endif %}
{% elseif variant.product.conditioning == 'card_kdo_per_euros_each_10_euros' %}
<div class="quantite-ctn">
<div class="quantite-select">
<div class="kdo-select-label">{{ 'app.front.panier.votre_montant'|trans }} :</div>
<select name="select_tissu" id="add-to-cart" data-idproduct="{{ variant.id }}">
{% for i in range(10, 250, 10) %}
<option value="{{ i }}"> {{ i }} €</option>
{% endfor %}
</select>
<span></span>
</div>
<div class="kdo-product-form">
<input type="text" name="kdo_mail" placeholder="Email destinataire" id="kdo_mail">
<a href="#" class="kdo_infobulle">
<span class="kdo_infobulle_declencheur">i</span>
<span class="kdo_infobulle_txt">{{ 'app.front.produit.kdogardersecret'|trans }}</span>
</a>
<input type="text" name="kdo_lastname" placeholder="Nom" id="kdo_lastname">
<input type="text" name="kdo_firstname" placeholder="Prénom" id="kdo_firstname">
<textarea rows="4" name="kdo_message" placeholder="Votre message" id="kdo_message"></textarea>
</div>
</div>
{% else %}
<div class="quantite-ctn">
<div class="quantite-input">
<div>
<label for="add-to-cart" class="required"> {{ 'app.front.produit.quantity'|trans }}</label>
<input onkeyup="if(value>{{ variant.countItemStock() }}) value={{ variant.countItemStock() }};" max="{{ variant.countItemStock() }}" type="number" id="add-to-cart" name="sylius_add_to_cart[cartItem][quantity]" class="js-add-to-cart-qty" data-idproduct="{{ variant.id }}" required="required" min="1">
</div>
<div class="inc button">+</div>
<div class="dec button">-</div>
</div>
</div>
{% endif %}
{% if variant.product.conditioning != 'per_meter_each_0_5_meter' or meter != 0 %}
<div class="addtocart-action">
<button class="js-add-to-cart lien-saumon" data-url="{{ path('app_cart_add_to_cart_ajax') }}" data-target="#add-to-cart" data-tissu="{{ isTissu }}" data-iscartekdo="{{ isCarteKdo }}">
<img src="{{ asset('webapic-theme/images/icon-produit-panier.svg') }}" class="ui image" />
{{ 'app.front.panier.achete'|trans }}
</button>
</div>
{% endif %}
</div>
{% else %}
{# {{ 'app.front.produit.outstock'|trans }} #}
{% endif %}
{# Octobre Rose #}
{# {% if variant.optionValues | length > 0 and variant.optionValues[0].code == "PL.RO.FU" %}
<div class="octobre-rose-encart">
<a href="/collections/classique/plumetis-rose-fuchsia-1" target="_blank"><img src="{{ asset('webapic-theme/images/2024_oct-rose_ruban-fiche-MEA.svg') }}" class="ui image" /></a>
<p><strong>100 % des ventes reversées</strong> à l'association la <span>Ligue contre le cancer</span>. <a href="/collections/classique/plumetis-rose-fuchsia-1" target="_blank">Plus d'infos</a></p>
</div>
{% endif %} #}
<div class="ui hidden divider"></div>
{# Accessoires ou bien un bloc image "Sac&Zip" #}
{# {{ dump(variant) }} #}
{# {% if variant.product.imagesByType('image_product_mea_saczip')|length > 0 %} #}
{# {% if produitConfigurateur == 1 %}
<div>
<a href="{{ path('app_configurateur', {'baseVariantId': variant.id}) }}">
{% if app.request.locale|slice(0, 2) == 'en' %}
<img src="{{ asset('webapic-theme/images/bloc-bt-sac-and-zip_en.png') }}" class="ui image" />
{% else %}
<img src="{{ asset('webapic-theme/images/bloc-bt-sac-and-zip.png') }}" class="ui image" />
{% endif %}
</a>
</div>
{% elseif associationAccessoire is not empty and accessoires|length > 0 %} #}
{% if associationAccessoire is not empty and accessoires|length > 0 %}
<div class="accessoires">
<div class="accessoires-ctn">
<h2 class="titre"><strong>{{ 'app.front.produit.accessoire1'|trans }}</strong> {{ 'app.front.produit.accessoire2'|trans }} :</h2>
<div class="association-ctn" id="sylius-product-association-{{ associationAccessoire.type.code }}" {{ sylius_test_html_attribute('product-association', associationAccessoire.type.name) }}>
<div class="caroussel">
{% for product in accessoires %}
{% if product.hasImages and product.canAddItem() %}
<div class="association-ctn-product">
{% if product.imagesByType('image_product_main') is not empty %}
{% set source_path = product.imagesByType('image_product_main').first.path %}
{% set original_path = source_path|imagine_filter('sylius_shop_product_original') %}
{% set path = source_path|imagine_filter(filter|default('app_product_small_thumbnail_listing')) %}
{% elseif product.images.first %}
{% set source_path = product.images.first.path %}
{% set original_path = source_path|imagine_filter('sylius_shop_product_original') %}
{% set path = source_path|imagine_filter(filter|default('app_product_small_thumbnail_listing')) %}
{% else %}
{% set original_path = asset('assets/shop/img/400x300.png') %}
{% set path = original_path %}
{% endif %}
<a href="{{ path('app_product_variant_show', {'slug': product.slug, 'id': product.id}) }}" data-idaccessoire="{{ product.id }}" data-idvariant="{{ variant.id }}" data-url="{{ path('app_product_accessoires') }}">
<div class="hover">{{ 'app.front.produit.accessoire3'|trans }}</div>
<span class="already">
<svg width="100%" height="100%" viewBox="0 0 18 14" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M1.74023 6.99999L7.18468 12.4444L16.2587 1.55554" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
</svg>
</span>
<div class="img-content">
<img class="lazyload" src="{{ path }}" id="main-image" alt="{{ product.name }}" {{ sylius_test_html_attribute('main-image') }} />
{% if product.imagesByType('image_product_main') is not empty and product.imagesByType('image_product_hover') is not empty %}
{% set source_path = product.imagesByType('image_product_hover').first.path %}
{% set original_path = source_path|imagine_filter('sylius_shop_product_original') %}
{% set path = source_path|imagine_filter(filter|default('sylius_shop_product_large_thumbnail')) %}
<img class="hover lazyload" data-src="{{ path }}" id="main-image" alt="{{ product.name }}" {{ sylius_test_html_attribute('main-image') }} />
{% endif %}
</div>
<h3 class="title">{{ product.name }}</h3>
<div class="sylius-product-price price js-base-price-accessory" {{ sylius_test_html_attribute('product-price') }}>{{ money.calculatePrice(product) }}</div>
</a>
</div>
{% endif %}
{% endfor %}
</div>
</div>
</div>
</div>
{% endif %}
{# Onglets #}
<div class="tabs-ctn">
<div class="ui top attached large tabular tabs-top">
<a class="item details active" data-tab="details"><h2>{{ 'sylius.ui.details'|trans }}</h2></a>
{% if variant.product.attributes|length > 0 or variant.attributes|length > 0 %}
<a class="item carac" data-tab="attributes" {{ sylius_test_html_attribute('tab', 'attributes') }}><h2>{{ 'sylius.ui.attributes'|trans }}</h2></a>
{% endif %}
{% if variant.advantages is not empty or variant.product.advantages is not empty %}
<a class="item avantages" data-tab="avantages"><h2>{{ 'app.front.produit.avantages'|trans }}</h2></a>
{% endif %}
{% if variant.maintenance is not empty or variant.product.maintenance is not empty %}
<a class="item entretien" data-tab="entretien"><h2>{{ 'app.front.produit.entretien'|trans }}</h2></a>
{% endif %}
</div>
<div class="tabs-content">
<div class="ui bottom attached tab segment details active" data-tab="details" itemprop="description">
{% if variant.description is not empty %}
{{ variant.description|raw }}
{% elseif variant.product.description is not empty %}
{{ variant.product.description|raw }}
{% else %}
{{ 'sylius.ui.no_description'|trans }}.
{% endif %}
</div>
{% if variant.product.attributes|length > 0 or variant.attributes|length > 0 %}
<div class="ui bottom attached tab segment" data-tab="attributes">
<table id="sylius-product-attributes" class="ui definition table" {{ sylius_test_html_attribute('product-attributes') }}>
<tbody>
{% for attribute in variant.getAttributesByLocale(app.request.locale, app.request.defaultLocale, sylius_base_locale)|sort_by('attribute.position') %}
<tr>
<td class="sylius-product-attribute-name" {{ sylius_test_html_attribute('product-attribute-name', attribute.name) }}>
{{ attribute.name }}
</td>
<td class="sylius-product-attribute-value" {{ sylius_test_html_attribute('product-attribute-value', attribute.name) }}>
{% include [
'@SyliusShop/Product/Show/Types/'~attribute.attribute.type~'.html.twig',
'@SyliusAttribute/Types/'~attribute.attribute.type~'.html.twig',
'@SyliusShop/Product/Show/Types/default.html.twig'
] with {
'attribute': attribute,
'locale': app.request.locale,
'fallbackLocale': app.request.defaultLocale
} %}
</td>
</tr>
{% endfor %}
{% for attribute in variant.product.getAttributesByLocale(app.request.locale, app.request.defaultLocale, sylius_base_locale)|sort_by('attribute.position') %}
<tr>
<td class="sylius-product-attribute-name" {{ sylius_test_html_attribute('product-attribute-name', attribute.name) }}>
{{ attribute.name }}
</td>
<td class="sylius-product-attribute-value" {{ sylius_test_html_attribute('product-attribute-value', attribute.name) }}>
{% include [
'@SyliusShop/Product/Show/Types/'~attribute.attribute.type~'.html.twig',
'@SyliusAttribute/Types/'~attribute.attribute.type~'.html.twig',
'@SyliusShop/Product/Show/Types/default.html.twig'
] with {
'attribute': attribute,
'locale': app.request.locale,
'fallbackLocale': app.request.defaultLocale
} %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% endif %}
{% if variant.advantages is not empty or variant.product.advantages is not empty %}
<div class="ui bottom attached tab segment avantages" data-tab="avantages">
{% if variant.advantages is not empty %}
{{ variant.advantages|raw }}
{% elseif variant.product.advantages is not empty %}
{{ variant.product.advantages|raw }}
{% endif %}
</div>
{% endif %}
{% if variant.maintenance is not empty or variant.product.maintenance is not empty %}
<div class="ui bottom attached tab segment entretien" data-tab="entretien">
{% if variant.maintenance is not empty %}
{{ variant.maintenance|raw }}
{% elseif variant.product.maintenance is not empty %}
{{ variant.product.maintenance|raw }}
{% endif %}
</div>
{% endif %}
</div>
</div>
{# Bandeau #}
{% include 'partials/block-bandeau.html.twig' %}
</div>
</div>
</div>
<div class="product-full">
{# "J'ajoute ma petite touche" #}
{% if associationPetiteTouche is not empty and productsPetiteTouche|length > 0 %}
<div class="petitetouche">
<div class="petitetouche-left">
<div class="portrait">
<h2 class="portrait-top">
{{ 'app.front.produit.petitetouche1'|trans }}
<span>{{ 'app.front.produit.petitetouche2'|trans }}</span>
</h2>
<div class="portrait-bottom">
{% if variant.product.imagesByType('image_product_smalladd_person')|length > 0 %}
<img class="lazyload" data-src="{{ variant.product.imagesByType('image_product_smalladd_person').first.path|imagine_filter('sylius_shop_product_original') }}" id="main-image" alt="{{ variant.product.name }}" />
{% else %}
<img data-src="{{ asset('webapic-theme/images/petitetouche-portrait.jpg') }}" class="ui image lazyload" />
{% endif %}
<div>
{% if variant.product.smallAddText is not empty %}
{{ variant.product.smallAddText|raw }}
{% else %}
<strong>Marie</strong> <span>de la boutique de Guérande</span> vous conseille
{% endif %}
</div>
</div>
</div>
<div class="gif">
{% if variant.product.imagesByType('image_product_smalladd_gif')|length > 0 %}
<img class="hover lazyload" data-src="{{ asset('media/image/' ~ variant.product.imagesByType('image_product_smalladd_gif').first.path) }}" id="main-image" alt="{{ variant.name }}" />
{% else %}
<img data-src="{{ asset('webapic-theme/images/petitetouche-default.gif') }}" class="ui image lazyload" />
{% endif %}
</div>
</div>
<div class="petitetouche-right">
<div class="association-ctn" id="sylius-product-association-{{ associationPetiteTouche.type.code }}" {{ sylius_test_html_attribute('product-association', associationPetiteTouche.type.name) }}>
{% for product in productsPetiteTouche %}
{% include 'products/petite_touche_product.html.twig' with {'product': product} only %}
{% endfor %}
</div>
</div>
</div>
{% endif %}
{# Fin "J'ajoute ma petite touche" #}
{# "Ca match !" #}
{# On affiche que s'il y a des collections qui matchent et que si la collection du produit possède une page collection #}
{% if matchingColors|length > 0 and siteCollection is not empty and siteCollection.imagesByType('image_product_background_ca_match')|length > 0 %}
<div class="match" style="background-image: url('{{ siteCollection is not empty and siteCollection.imagesByType('image_product_background_ca_match')|length > 0 ? siteCollection.imagesByType('image_product_background_ca_match').first.path|imagine_filter('app_product_match_bg') : asset('webapic-theme/images/placeholder-ca-match.jpg') }}')">
<div class="match-ctn">
<h2 class="title">{{ 'app.front.block.match.titre1'|trans }} <strong>{{ 'app.front.block.match.titre2'|trans }} !</strong></h2>
<div class="match-left">
<div class="match-left-content">
{% for matchingColor in matchingColorsWithPage|slice(0, 3) %}
<a href="{{ path('app_collection_show', {'slugCategory': matchingColor.category, 'slug': matchingColor.slug}) }}" class="lien-bleu">
Collection {{ matchingColor.title }}
</a>
{% endfor %}
</div>
</div>
<div class="match-right">
<div class="association-ctn listing1" id="sylius-product-association-ca_match">
{% for variant in matchingProducts %}
{% if variant.hasImages and variant.canAddItem() %}
{% include 'products/matching_products.html.twig' with {'product': variant} only %}
{% endif %}
{% endfor %}
</div>
</div>
</div>
</div>
{% endif %}
{# Fin "Ca match !" #}
{# "Les points forts" #}
{% if variant.product.strongPoints|length > 0 %}
<div class="taxons-pointsforts">
<h2 class="title">Les points forts{# de notre {{ variant.name|lower }}#}</h2>
<div class="taxons-pointsforts-ctn">
{% for value in variant.product.strongPoints %}
<div class="taxons-pointsforts-content">
{% if value.youtube_link is not empty %}
<iframe class="youtube-embed" type="text/html" width="100%" height="320" src="{{ value.youtube_link|replace({'watch?v=':'embed/', 'youtu.be/': 'youtube.com/embed/'}) }}" frameborder="0">
</iframe>
{% elseif value.image_path is not empty %}
<img class="ui image lazyload"data-src="{{ asset('product-strong-points/' ~ value.image_path) }}" />
{% endif %}
</div>
{% endfor %}
</div>
</div>
{% endif %}
{# Fin "Les points forts" #}
{# "Faites (vous) plaisir !" #}
<div class="collection">
<div class="collection-ctn">
<h2>
{{ 'app.front.produit.collection1'|trans }}<br/>
<span>{{ 'app.front.produit.collection2'|trans }} <span>{{ 'app.front.produit.collection3'|trans }}</span> !</span>
</h2>
<div class="collection-left">
<div class="listing1">
{% for variant in complementaryProductsSameColor %}
{% include 'products/single_product_in_circle.html.twig' with {'product': variant} only %}
{% endfor %}
</div>
{% if siteCollection is not empty %}
<a href="{{ path('app_collection_show', {'slugCategory': siteCollection.slugLocale, 'slug': siteCollection.slug}) }}" class="link-collection">
{{ 'app.front.produit.voircollection'|trans }}
</a>
{% endif %}
</div>
{% if complementaryFabric is not empty and complementaryFabric.id != variant.id %}
<div class="collection-right">
<img class="top ui image" src="{{ asset('webapic-theme/images/collection-fleche.png') }}" />
<div id="circle">
<img class="ui image" src="{{ asset('webapic-theme/images/txt-tournant-tissu.svg') }}" />
</div>
{% if complementaryFabric.imagesByType('image_product_hover') is not empty %}
{% set source_path = complementaryFabric.imagesByType('image_product_hover').first.path %}
{% set original_path = source_path|imagine_filter('sylius_shop_product_original') %}
{% set path = source_path|imagine_filter(filter|default('sylius_shop_product_large_thumbnail')) %}
{% elseif complementaryFabric.images.first %}
{% set source_path = complementaryFabric.images.first.path %}
{% set original_path = source_path|imagine_filter('sylius_shop_product_original') %}
{% set path = source_path|imagine_filter(filter|default('sylius_shop_product_large_thumbnail')) %}
{% else %}
{% set original_path = asset('assets/shop/img/400x300.png') %}
{% set path = original_path %}
{% endif %}
<div class="collection-right-product-ctn">
<a href="{{ path('app_product_variant_show', {'slug': complementaryFabric.slug, 'id': complementaryFabric.id}) }}">
<div class="img-ctn">
<div class=" img-ctn-content">
<img src="{{ path }}" id="main-image" alt="{{ complementaryFabric.name }}" {{ sylius_test_html_attribute('main-image') }} />
</div>
</div>
{% set price = money.calculatePrice(complementaryFabric) %}
{% set originalPrice = money.calculateOriginalPrice(complementaryFabric) %}
<div class="sylius-product-price price" {{ sylius_test_html_attribute('product-price') }}>
<span>{{ 'app.front.global.apartir'|trans }} </span>
{{ price }}/m
</div>
</a>
</div>
</div>
{% endif %}
</div>
</div>
{# Fin de "Faites (vous) plaisir !" #}
{# Article du guide #}
{% if variant.product.article is not empty %}
{% include 'partials/block-article-guide.html.twig' with {'article': variant.product.article} only %}
{% endif %}
{# Fin de "Article du guide" #}
{# AVIS/FAQ #}
<div class="avisfaq">
<div class="avis">
{# Pour les tissus, on affiche les avis de la déclinaison #}
{% if variant.code|slice(0, 5) == constant('App\\Doctrine\\ORM\\ProductVariantRepository::PREFIX_CODE_DIVALTO_FABRIC') %}
<div class="NETREVIEWS_PRODUCT_REVIEWS" data-product-id="{{ variant.product.id }}"></div>
{% else %}
<div class="NETREVIEWS_PRODUCT_REVIEWS" data-product-id="{{ variant.product.id }}"></div>
{% endif %}
{# <div class="NETREVIEWS_PRODUCT_STARS" data-product-id="{{ variant.product.id }}"></div> #}
</div>
<div class="faq">
<div class="faq-ctn">
<h2 class="top">
<strong>{{ 'app.front.produit.question1'|trans }}</strong>
{{ 'app.front.produit.question2'|trans }}
</h2>
<ul>
{% for siteFaqProduct in siteFaqProducts %}
<li>
<details>
<summary>{{ siteFaqProduct.question }}</summary>
<div>{{ siteFaqProduct.answer|raw }}</div>
</details>
</li>
{% endfor %}
</ul>
<div class="bottom">
<button class="question">{{ 'app.front.produit.question3'|trans }}</button>
</div>
<div class="faq-user">
{% if is_granted('ROLE_USER') %}
<form method="POST" action="{{ path('app_product_send_question') }}">
<label for="question">Ma question</label>
<textarea id="question" name="question" rows="5" cols="33"></textarea>
<input type="hidden" name="variantId" value="{{ variant.id }}" />
<div>
<button type="submit">{{ 'app.front.global.valider'|trans }}</button>
</div>
</form>
{% else %}
<p>{{ 'app.front.produit.question4'|trans }}</p>
<a href="{{ path('sylius_shop_login') }}" class="">
{{ 'app.front.produit.login'|trans }}
</a>
{% endif %}
</div>
</div>
</div>
</div>
{# Fin FAQ Produit #}
</div>
{# Instagram #}
{% include 'partials/block-instagram.html.twig' %}
</div>
{% if variant.product.conditioning not in ['card_kdo_per_euros_each_10_euros'] %}
{# <script type="application/ld+json">
{
"@context": "https://schema.org/",
"@type": "Product",
"name": "{{ variant.name|title }}",
{% if variant.images|length > 0 %}
"image": "{{ variant.imagesByType('image_product_main').first().path|imagine_filter('sylius_shop_product_original') }}",
{% endif %}
{% if variant.description is not empty %}
"description": "{{ variant.description|raw }}",
{% elseif variant.product.description is not empty %}
"description": "{{ variant.product.description|raw }}",
{% else %}
"description": "{{ 'sylius.ui.no_description'|trans }}",
{% endif %}
"brand": {
"@type": "Brand",
"name": "PPMC"
},
"offers": {
"@type": "Offer",
"url": "https://www.papapiqueetmamancoud.fr{{ path('app_product_variant_show', {'slug': variant.product.slug, 'id': variant.id}) }}",
"priceCurrency": "EUR",
"price": "{{ price|replace({'€': ''}) }}",
"availability": "https://schema.org/InStock"
},
}
</script>
#}
{% set price = money.calculatePrice(variant) %}
<script type="application/ld+json">
{
"@context": "http://schema.org/",
"@type": "Product",
"name": "{{ variant.name }}",
{% if variant.images|length > 0 %}
"image": "{{ variant.imagesByType('image_product_main').first().path|imagine_filter('sylius_shop_product_original') }}",
{% endif %}
{% if variant.description is not empty %}
"description": "{{ variant.description|raw }}",
{% elseif variant.product.description is not empty %}
"description": "{{ variant.product.description|raw }}",
{% else %}
"description": "{{ 'sylius.ui.no_description'|trans }}",
{% endif %}
"brand": {
"@type": "Brand",
"name": "PPMC"
},
{% if variant.canAddItem() %}
"offers": {
"@type": "Offer",
"url": "https://www.papapiqueetmamancoud.fr{{ path('app_product_variant_show', {'slug': variant.product.slug, 'id': variant.id}) }}",
"priceCurrency": "EUR",
"price": "{{ price|replace({'€': '',',': '.'}) }}",
"availability": "https://schema.org/InStock"
}
{% else %}
"offers": {
"@type": "Offer",
"url": "https://www.papapiqueetmamancoud.fr{{ path('app_product_variant_show', {'slug': variant.product.slug, 'id': variant.id}) }}",
"priceCurrency": "EUR",
"price": "{{ price|replace({'€': '',',': '.'}) }}",
"availability": "https://schema.org/OutOfStock"
}
{% endif %}
}
</script>
<script type="text/javascript">
$(document).ready(function() {
dataLayer.push({ ecommerce: null }); // Clear the previous ecommerce object.
dataLayer.push({
event: "view_item",
ecommerce: {
currency: "EUR",
value: {{ price|replace({'€': '',',': '.'}) }},
items: [
{
item_id: {{ variant.id }},
item_name: "{{ variant.name }}",
index: 0,
item_brand: "PPMC",
price: {{ price|replace({'€': '',',': '.'}) }},
quantity: {{ variant.countItemStock() }}
}
]
}
});
});
</script>
{% endif %}
{% endblock %}