{% extends '@SyliusShop/layout.html.twig' %}
{% block title %}{{ product.name }} | {{ parent() }}{% endblock %}
{% set productImages = (product.images | length) %}
{% block metatags %}
{% if product.metaDescription is not null %}
<meta name="description" content="{{ product.metaDescription }}">
{% endif %}
{% endblock %}
{% block stylesheets %}
{{ parent() }}
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/2.3.4/assets/owl.carousel.min.css">
{% endblock %}
{% block content %}
{% include '@SyliusShop/Product/Show/_breadcrumb.html.twig' %}
<div class="ui hidden divider"></div>
<div class="ui two column stackable grid custom-product-detail-page-trigger-class">
<div class="column">
{{ sylius_template_event('sylius.shop.product.show.left_sidebar', _context) }}
</div>
<div class="column">
{{ sylius_template_event('sylius.shop.product.show.right_sidebar', _context) }}
</div>
</div>
{% if product.mainTaxon is not null %}
{% set taxon = product.mainTaxon %}
{% if taxon.enabled %}
{% if taxon.slug == 'storyteller' %}
<div class="row step_guide mb-5 mt-5">
<div class="col-6 col-md-3 text-center">
{# <img src="{{ asset('assets/shop/img/step_1.png') }}" class="step_guide_image img-fluid" alt="{{'sylius.pages.content.childrenLitrature'|trans }}" /> #}
<picture>
<source srcset="{{ asset('assets/shop/img/step_1.webp') }}" type="image/webp">
<source srcset="{{ asset('assets/shop/img/step_1.png') }}" type="image/png">
<img width="200px" height="200px" style="width:100% !important; height: auto !important;" src="{{ asset('assets/shop/img/step_1.png') }}" class="mb-2 step_guide_image img-fluid" alt="{{'sylius.pages.content.childrenLitrature'|trans }}" />
</picture>
<div class="text-center mt-3 mb-3 font-weight-bold">{{'sylius.pages.content.childrenLitrature'|trans }}</div>
</div>
<div class="col-6 col-md-3 text-center mb-3">
<picture>
<source srcset="{{ asset('assets/shop/img/step_2.webp') }}" type="image/webp">
<source srcset="{{ asset('assets/shop/img/step_2.png') }}" type="image/png">
<img width="200px" height="200px" style="width:100% !important; height: auto !important;" src="{{ asset('assets/shop/img/step_2.png') }}" class="step_guide_image img-fluid" alt="{{'sylius.pages.content.quizToLearn'|trans }}" />
</picture>
<div class="text-center mt-3 mb-3 font-weight-bold">{{'sylius.pages.content.quizToLearn'|trans }}</div>
</div>
<div class="col-6 col-md-3 text-center mb-3">
<picture>
<source srcset="{{ asset('assets/shop/img/step_5.webp') }}" type="image/webp">
<source srcset="{{ asset('assets/shop/img/step_5.png') }}" type="image/png">
<img width="200px" height="200px" style="width:100% !important; height: auto !important;" src="{{ asset('assets/shop/img/step_5.png') }}" class="step_guide_image img-fluid" alt="{{'sylius.pages.content.atonomyOfTheChild'|trans }}" />
</picture>
<div class="text-center mt-3 mb-3 font-weight-bold">{{'sylius.pages.content.atonomyOfTheChild'|trans }}</div>
</div>
<div class="col-6 col-md-3 text-center mb-3">
<picture>
<source srcset="{{ asset('assets/shop/img/step_4.webp') }}" type="image/webp">
<source srcset="{{ asset('assets/shop/img/step_4.png') }}" type="image/png">
<img width="200px" height="200px" style="width:100% !important; height: auto !important;" src="{{ asset('assets/shop/img/step_4.png') }}" class="step_guide_image img-fluid" alt="{{'sylius.pages.content.herosWithYou'|trans }}"/>
</picture>
<div class="text-center mt-3 mb-3 font-weight-bold">{{'sylius.pages.content.herosWithYou'|trans }}</div>
</div>
</div>
<h4 class="ui horizontal section divider header">{{ 'sylius.pages.content.details'|trans }}</h4>
<div class="row product_details_guide mb-5 mt-5">
<div class="col-sm-6">
<ul>
<li>{{'sylius.pages.content.storyTeller.content.textOne'|trans }}</li>
<li>{{'sylius.pages.content.storyTeller.content.textTwo'|trans }}</li>
<li>{{'sylius.pages.content.storyTeller.content.textThree'|trans }}</li>
<li>{{'sylius.pages.content.storyTeller.content.textFour'|trans }}</li>
<li>{{'sylius.pages.content.storyTeller.content.textFive'|trans }}</li>
</ul>
</div>
<div class="col-sm-6">
<ul>
<li>{{'sylius.pages.content.storyTeller.content.textSix'|trans }}</li>
<li>{{'sylius.pages.content.storyTeller.content.textSeven'|trans }}</li>
<li>{{'sylius.pages.content.storyTeller.content.textEight'|trans }}</li>
<li>{{'sylius.pages.content.storyTeller.content.textNine'|trans }}</li>
<li>{{'sylius.pages.content.storyTeller.content.textTen'|trans }}</li>
</ul>
</div>
</div>
{% endif %}
{% if taxon.slug == 'catalogue/per-pack-type/story' %}
{% if product.getPackSamples|length > 0 %}
<h4 class="ui horizontal section divider header">{{'sylius.pages.content.packageContent'|trans }}</h4>
<div class="row mb-5 mt-5">
{% for sampleAttribute in product.getPackSamples %}
<div class="col-sm-6 p-2">
{# <picture>
{# <source srcset="{{ '/media/packSampleThumbnail/' ~ path | imagine_filter('my_packSampleThumbnail_webp') }}" type="image/webp"> }
<source srcset="{{ sampleAttribute.image | imagine_filter('my_pack_sample_thumbnail_webp') }}" type="image/webp">
<source srcset="{{ asset('/media/packSampleThumbnail/' ~ sampleAttribute.image) }}" type="image/jpeg">
<img src="{{ asset('/media/packSampleThumbnail/' ~ sampleAttribute.image) }}" alt="{{ product.name }}" class="step_guide_image_two img-fluid">
</picture> #}
{# <img width="200px" height="200px" style="width:100% !important; height: auto !important;" src="/media/packSampleThumbnail/{{sampleAttribute.image}}" class="step_guide_image_two img-fluid" alt="{{sampleAttribute.title}}" /> #}
<img src="/media/packSampleThumbnail/{{sampleAttribute.image}}" class="step_guide_image_two img-fluid" alt="{{sampleAttribute.title}}" />
<div class="sidebar_text">
<div class="title">{{sampleAttribute.title}}</div>
<div class="description">{{sampleAttribute.description}}
<div class="audio_player"><audio controls><source src=" {{sampleAttribute.awsLink}}"/></audio></div>
</div>
</div>
</div>
{% endfor %}
</div>
{% endif %}
{% endif %}
{% endif %}
{% endif %}
{{ sylius_template_event('sylius.shop.product.show.content', _context) }}
{% endblock %}
{% block javascripts %}
{{ parent() }}
<script src="https://cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/2.3.4/owl.carousel.min.js"></script>
<script type="text/javascript">
lightbox.option({
'albumLabel': '{{ 'sylius.lightbox.image_album_label'|trans|escape('js') }}'
});
{# {% if app.environment == "prod" %} #}
{% if app.environment == "prod" %}
var productId = {{product.id}};
{# let price = document.getElementById('product-price').innerHTML; #}
{% set productMainTaxon = product.mainTaxon %}
var productMainTaxonId = {{ productMainTaxon.id }};
var productMainTaxonName = '{{ productMainTaxon.name }}';
{% set pVariant = product|sylius_resolve_variant %}
let newPrice = price.replace(/ /g,'');
newPrice = newPrice.replaceAll(' ','');
newPrice = newPrice.replace(/(\r\n|\n|\r)/gm, "");
let finalGTMData = {"customPageIdentifier": "productDetailPage", "productIdp":productId, "mainTaxonId":productMainTaxonId, "mainTaxonName":productMainTaxonName, "productPrice":newPrice};
{# dataLayer.push(); #}
{# dataLayer.push(finalGTMData); #}
{# {% if app.environment == "prod" %} #}
window.dataLayer = window.dataLayer || [];
dataLayer.push(finalGTMData);
{% endif %}
$(document).ready(function(){
{% if productImages > 1 %}
$(".owl-carousel.images").owlCarousel({
items: {{ productImages > 3 ? 3 : (productImages == 3 ? 2 : productImages) }},
loop: true,
margin: 10,
nav: 3,
dots: false,
});
{% endif %}
var reviewOwl = $(".owl-carousel.reviews");
reviewOwl.on('initialized.owl.carousel', function(event) {
updateReviews();
})
reviewOwl.owlCarousel({
items: 2,
loop: true,
nav: true,
dots: true,
center: true,
responsive:{
900:{
items:3
}
}
});
$(window).on('resize', function() {
updateReviews();
});
});
function changeSize(el){
var resizeText;
resizeText = function() {
return (parseInt($(el).css('font-size').slice(0, -2)) - 1) + 'px';
};
$(el).css('font-size', resizeText());
if (checkOverflow(el)) {
changeSize(el);
}
}
function checkOverflow(el)
{
var curOverflow = el.style.overflow;
if ( !curOverflow || curOverflow === "visible" )
el.style.overflow = "hidden";
var isOverflowing = el.clientWidth < el.scrollWidth
|| el.clientHeight < el.scrollHeight;
el.style.overflow = curOverflow;
return isOverflowing;
}
function updateReviews() {
$('p.comment').each(function() {
$(this).css('font-size', '30px');
changeSize($(this).get(0));
})
}
</script>
{#
<script src="https://partner.histoiresmax.com/ct/pt660025712.js?page=product&consent_ads={{1_OR_0
}}&idcat={{CATEGORY_ID}}&wordingcat={{CATEGORY_LABEL}}&idp={{PRODUCT_ID}}&prix={{PRODUCT_
PRICE}}&newcustomer={{1_OR_0}}" async="async" ></script> #}
{% endblock %}