{% do pimcore_head_script().appendFile('https://cdnjs.cloudflare.com/ajax/libs/vue/2.5.21/vue.min.js') %}
{% do pimcore_head_script().appendFile('https://cdn.jsdelivr.net/npm/vue-carousel-3d@0.2.0/dist/vue-carousel-3d.min.js') %}
{% if editmode %}
<div class="uk-container apk-container-1400">
<div uk-alert>
<h1 class="uk-h1">APK product detail</h1>
</div>
<ul uk-tab>
<li><a href="#">Configurations</a></li>
<li class="uk-active"><a href="#">Content Edit</a></li>
</ul>
<ul class="uk-switcher uk-margin">
<li class="apk-size-20 uk-grid-small" uk-grid>
{# Colonne 1 #}
<div class="uk-width-1-2@m" uk-margin>
<div>Type de heading pour le titre ?</div>
{{ pimcore_select("content-heading", {
"store" : [
['span', 'span'],
['h1', 'Heading 1'],
['h2', 'Heading 2'],
['h3', 'Heading 3'],
['h4', 'Heading 4'],
['h5', 'Heading 5'],
['h6', 'Heading 6']
],
"defaultValue" : "h2"
}) }}
<div><strong>Style</strong> du heading pour le titre ?</div>
{{ pimcore_select("content-heading-style", {
"store" : [
['h1', 'Heading 1'],
['h2', 'Heading 2'],
['h3', 'Heading 3'],
['h4', 'Heading 4'],
['h5', 'Heading 5'],
['h6', 'Heading 6']
],
"defaultValue" : "h2"
}) }}
</div>
{# Colonne 2 #}
<div class="uk-width-1-2@m" uk-margin>
<div>Espacement en haut du block</div>
{{ pimcore_select("margin-top", {
"store" : [
['', 'Aucun'],
['uk-margin-small-top', 'Petit'],
['uk-margin-medium-top', 'Moyen'],
['uk-margin-large-top', 'Grand'],
['uk-margin-xlarge-top', 'Très grand'],
],
"defaultValue" : ""
}) }}
<div>Espacement en bas du block</div>
{{ pimcore_select("margin-bottom", {
"store" : [
['', 'Aucun'],
['uk-margin-small-top', 'Petit'],
['uk-margin-medium-top', 'Moyen'],
['uk-margin-large-top', 'Grand'],
['uk-margin-xlarge-top', 'Très grand'],
],
"defaultValue" : ""
}) }}
<div>Afficher un scroll ?</div>
{{ pimcore_select("scroll", {
"store" : [
['', 'Aucun'],
['apk-scroll', 'SCROLL'],
['apk-top', 'TOP']
],
"defaultValue" : "apk-scroll"
}) }}
</div>
</li>
<li class="uk-active">
<div class="uk-margin-large-bottom">
<div class="uk-child-width-1-2@m" uk-grid>
<div>
<div class="uk-margin"><strong>Titre à gauche</strong></div>
<h2 class="uk-h2">
{{ pimcore_textarea("content-title",{
"nl2br" : true
}) }}
</h2>
<div class="uk-margin"><strong>Objet produit</strong></div>
{{ pimcore_relation("myRelation") }}
<div class="uk-alert-danger" uk-alert>
<div class="uk-margin"><strong>Autres produits correspondants</strong></div>
{% for row in pimcore_block('otherProcuts').iterator %}
{{ pimcore_relation("myOtherRelation") }}
<div class="uk-margin"><strong>Condition de prise (ex : 1/J)</strong></div>
{{ pimcore_textarea('product-image-prise-other') }}
<div class="uk-margin"><strong>Type (ex: comprimés / gélules)</strong></div>
{{ pimcore_input('product-type-other') }}
<div class="uk-margin"><strong>Lien vers la notice</strong></div>
{{ pimcore_link("content-btn-product-other", {
"class" : "uk-button"
}) }}
{% endfor %}
</div>
<div class="uk-margin"><strong>Condition de prise (ex : 1/J)</strong></div>
{{ pimcore_textarea('product-image-prise') }}
<div class="uk-margin"><strong>Type (ex: comprimés / gélules)</strong></div>
{{ pimcore_input('product-type') }}
<div class="uk-margin"><strong>Lien vers la notice</strong></div>
{{ pimcore_link("content-btn", {
"class" : "uk-button"
}) }}
<hr>
<dt>Google Analytics Event: Action</dt>
<dd>{{ pimcore_input("content-btn-secondary-ga-1-1") }}</dd>
<hr>
<dt>Google Analytics Event: Category</dt>
<dd>{{ pimcore_input("content-btn-secondary-ga-1-2") }}</dd>
<hr>
<dt>Google Analytics Event: Label</dt>
<dd>{{ pimcore_input("content-btn-secondary-ga-1-3") }}</dd>
</div>
<div>
<div class="uk-margin"><strong>Titre à droite</strong></div>
<h2 class="uk-h2">
{{ pimcore_textarea("content-right-title",{
"nl2br" : true
}) }}
</h2>
<div class="uk-margin"><strong>Sous-titre à droite</strong></div>
<h2 class="uk-h2">
{{ pimcore_textarea("content-right-title-lower",{
"nl2br" : true
}) }}
</h2>
<div class="uk-margin"><strong>Contenu descriptif</strong></div>
{{ pimcore_wysiwyg('product-content') }}
<div class="uk-margin"><strong>images est descriptions</strong></div>
{% for row in pimcore_block('productDescriptionImages').iterator %}
<div uk-alert>
<div class="uk-margin"><strong>Image</strong></div>
{{ pimcore_image('product-description-image') }}
<div class="uk-margin"><strong>Description de l'image</strong></div>
{{ pimcore_textarea('product-description-text', {'nl2br' : true}) }}
</div>
{% endfor %}
<div class="uk-margin"><strong>Annotations</strong></div>
{{ pimcore_wysiwyg('product-annotaiton') }}
</div>
</div>
</div>
</li>
</ul>
</div>
{% endif %}
{% if not editmode %}
<!-- This is the modal -->
<div id="modal-pharmacies" uk-modal>
<div class="uk-modal-dialog uk-modal-body uk-text-center uk-position-relative">
<h2>{{"Où acheter ?"|trans}}</h2>
<div uk-grid>
<div class="uk-width-2-5">
<div class="apk-container-image apk-image-pharmacie">
</div>
<div>
<h3>{{"En pharmacie :"|trans}}</h2>
<p>
{{"Vous préférez vous rendre chez votre pharmacien afin de bénéficier de ses conseils avisés ?"|trans}}
</br>
{{"Trouvez votre pharmacie la plus proche sur"|trans}}
</p>
</div>
{% if document.property('pharmacieLogo') %}
<div class="apk-container-image-phramacie">
<a href="{{ 'pharmacie-be-lien'|trans }}" target="_blank">
<img src="{{ document.property('pharmacieLogo').thumbnail('') }}" alt="{{ "Pharmacie"|trans }}">
</a>
</div>
{% endif %}
</div>
<div class="uk-width-auto apk-width-auto">
<div class="apk-border-vertical">
</div>
</div>
<div class="uk-width-2-5">
<div class="apk-container-image apk-margin-container-image apk-image-en-ligne">
</div>
<div>
<h3>{{"En ligne :"|trans}}</h2>
<p>
{{"Vous voulez être livré directement chez vous via des platformes e-shop ouvertes 24h/24"|trans}}
</br>
{{"Magnecaps est également disponible en ligne !"|trans}}
</p>
</div>
<div class="apk-container-phramacies">
<div class="uk-child-width-1-2 uk-child-width-1-3@s" uk-grid>
{% set i = 0 %}
{% if not pimcore_relation("myRelation").isEmpty %}
{% if pimcore_relation("myRelation").element.className == 'Produits' %}
{% for lienPharmacie in pimcore_relation("myRelation").element.lienPharmacies %}
<div apk-type="{{i}}">
<a href="{{ lienPharmacie.lien }}" target="_blank">
{{ lienPharmacie.image.thumbnail('').html()|raw }}
</a>
</div>
{% endfor %}
{% endif %}
{% endif %}
{% for row in pimcore_block('otherProcuts').iterator %}
{% set i = i + 1 %}
{% if not pimcore_relation("myOtherRelation").isEmpty %}
{% if pimcore_relation("myOtherRelation").element.className == 'Produits' %}
{% for lienPharmacie in pimcore_relation("myOtherRelation").element.lienPharmacies %}
<div apk-type="{{i}}" style="display:none">
<a href="{{ lienPharmacie.lien }}" target="_blank">
{{ lienPharmacie.image.thumbnail('').html()|raw }}
</a>
</div>
{% endfor %}
{% endif %}
{% endif %}
{% endfor %}
</div>
</div>
</div>
</div>
</div>
</div>
<div class="apk-areabrick-container {{ pimcore_select("margin-top") }} {{ pimcore_select("margin-bottom") }}">
<div class="apk-container-custom">
<div class="uk-child-width-1-2@m uk-grid-collapse" uk-grid uk-height-match="target: [apk-height-match]">
<div class="apk-container-custom-left uk-flex uk-flex-middle">
<div class="uk-width-1-1" apk-height-match>
<div class="uk-container apk-container-700">
{% if not pimcore_textarea("content-title").isEmpty %}
{% if pimcore_select("content-heading").data == "span" %}
<span class="uk-{{ pimcore_select("content-heading-style").getData() }}">
{{ pimcore_textarea("content-title", {
"nl2br" : true})|raw }}
</span>
{% else %}
{% set content_heading = pimcore_select("content-heading").getData() %}
<{{ content_heading }} class="uk-{{ pimcore_select("content-heading-style").getData() }}">
{{ pimcore_textarea("content-title", {
"nl2br" : true})|raw }}
</{{ content_heading }}>
{% endif %}
{% endif %}
</div>
{% if not pimcore_block('otherProcuts').getCount > 0 %}
<div class="uk-container apk-container-700">
<div class="apk-media">
<div class="apk-media-container">
{% if not pimcore_relation("myRelation").isEmpty %}
{% if pimcore_relation("myRelation").element.className == 'Produits' %}
{{ pimcore_relation("myRelation").element.image.thumbnail('big-product-thumb').html()|raw }}
{% endif %}
{% endif %}
<span class="apk-gomette uk-flex uk-flex-middle uk-flex-center uk-text-center">
<span>{{ pimcore_textarea('product-image-prise', {'nl2br' : true, 'htmlspecialchars' : false}) }}</span>
</span>
</div>
</div>
</div>
{% else %}
<!-- Carousel -->
<div id="product-carousel">
{% set i = 0 %}
<carousel-3d :border="0" :startIndex="0" :controls-visible="true" :controls-prev-html="'❬ '"
:controls-next-html="'❭'" :height="400" :space="300" :perspective="0"
:controls-width="30" :controls-height="60" :clickable="true"
@before-slide-change="onBeforeSlideChange">
<slide :index="{{i}}" apk-index="{{i}}">
<div apk-height-carousel>
<div class="apk-media">
<div class="apk-media-container uk-text-center">
<div>
{% if not pimcore_relation("myRelation").isEmpty %}
{% if pimcore_relation("myRelation").element.className == 'Produits' %}
{{ pimcore_relation("myRelation").element.image.thumbnail('big-product-thumb').html()|raw }}
{% endif %}
{% endif %}
<span class="apk-gomette uk-flex uk-flex-middle uk-flex-center uk-text-center">
<span>{{ pimcore_textarea('product-image-prise', {'nl2br' : true, 'htmlspecialchars' : false}) }}</span>
</span>
</div>
</div>
</div>
</div>
</slide>
{% for row in pimcore_block('otherProcuts').iterator %}
{% set i = i + 1 %}
<slide :index="{{i}}">
<div apk-height-carousel>
<div class="apk-media">
<div class="apk-media-container uk-text-center">
<div>
{% if not pimcore_relation("myOtherRelation").isEmpty %}
{% if pimcore_relation("myOtherRelation").element.className == 'Produits' %}
{{ pimcore_relation("myOtherRelation").element.image.thumbnail('big-product-thumb').html()|raw }}
{% endif %}
{% endif %}
<span class="apk-gomette uk-flex uk-flex-middle uk-flex-center uk-text-center">
<span>{{ pimcore_textarea('product-image-prise-other', {'nl2br' : true, 'htmlspecialchars' : false}) }}</span>
</span>
</div>
</div>
</div>
</div>
</slide>
{% endfor %}
</carousel-3d>
</div>
{% endif %}
<div class="uk-container apk-container-900">
<div class="apk-type {{ pimcore_block('otherProcuts').getCount > 0 ? 'apk-type-multiple' : '' }}">
<div>
{% set i = 0 %}
<div apk-type="{{i}}">
<span>{{ pimcore_input('product-type') }}</span>
<div class="uk-child-width-auto uk-grid-small" uk-grid>
<div>
{% if not pimcore_link("content-btn").isEmpty() %}
<div class="apk-action">
{% if
not pimcore_input("content-btn-secondary-ga-1-1").isEmpty
and not pimcore_input("content-btn-secondary-ga-1-2").isEmpty
and not pimcore_input("content-btn-secondary-ga-1-3").isEmpty
%}
{{ pimcore_link("content-btn", {
"class" : "uk-button uk-button-large",
"onclick" : "javascript:sendGtagEvent('" ~ add_slashes(pimcore_input("content-btn-secondary-ga-1-1")) ~ "',
'" ~ add_slashes(pimcore_input("content-btn-secondary-ga-1-2")) ~ "',
'" ~ add_slashes(pimcore_input("content-btn-secondary-ga-1-3")) ~ "');"
}) }}
{% else %}
{{ pimcore_link("content-btn", {
"class" : "uk-button"
}) }}
{% endif %}
</div>
{% endif %}
</div>
<div>
<button class="uk-button apk-btn-univers" type="button" uk-toggle="target: #modal-pharmacies">{{"Acheter"|trans}}</button>
</div>
</div>
</div>
{% for row in pimcore_block('otherProcuts').iterator %}
{% set i = i + 1 %}
<div apk-type="{{i}}" style="display:none">
<span>{{ pimcore_input('product-type-other') }}</span>
<div class="uk-child-width-auto uk-grid-small" uk-grid>
<div class="apk-action">
{{ pimcore_link("content-btn-product-other", {"class" : "uk-button"}) }}
</div>
<div>
<button class="uk-button apk-btn-univers" type="button" uk-toggle="target: #modal-pharmacies">{{"Acheter"|trans}}</button>
</div>
</div>
</div>
{% endfor %}
</div>
</div>
{#{% if not pimcore_link("content-btn").isEmpty() %}
<div class="apk-action">
{% if
not pimcore_input("content-btn-secondary-ga-1-1").isEmpty
and not pimcore_input("content-btn-secondary-ga-1-2").isEmpty
and not pimcore_input("content-btn-secondary-ga-1-3").isEmpty
%}
{{ pimcore_link("content-btn", {
"class" : "uk-button uk-button-large",
"onclick" : "javascript:sendGtagEvent('" ~ add_slashes(pimcore_input("content-btn-secondary-ga-1-1")) ~ "',
'" ~ add_slashes(pimcore_input("content-btn-secondary-ga-1-2")) ~ "',
'" ~ add_slashes(pimcore_input("content-btn-secondary-ga-1-3")) ~ "');"
}) }}
{% else %}
{{ pimcore_link("content-btn", {
"class" : "uk-button"
}) }}
{% endif %}
</div>
{% endif %}#}
</div>
</div>
</div>
<div class="apk-container-custom-right uk-flex uk-flex-middle">
<div class="uk-container apk-container-700 uk-height-1-1 uk-flex uk-flex-column" apk-height-match>
<div>
<div class="apk-right-title">
<span class="uk-h1">
{{ pimcore_textarea("content-right-title") }}
<span>{{ pimcore_textarea("content-right-title-lower") }}</span>
</span>
</div>
<div class="apk-content">
{{ pimcore_wysiwyg('product-content') }}
</div>
<div class="apk-product-medias">
<div class="uk-grid-medium uk-child-width-expand@s" uk-grid uk-height-match="target: apk-product-medias-box">
{% for row in pimcore_block('productDescriptionImages').iterator %}
<div class="uk-text-center">
<div class="apk-product-medias-box">
{% if pimcore_image('product-description-image').src %}
<img height="150" src="{{ pimcore_image('product-description-image').src }}" alt="pimcore_image('product-description-image').alt">
{% endif %}
<div class="apk-product-medias-description">
{{ pimcore_textarea('product-description-text', {'nl2br' : true}) }}
</div>
</div>
</div>
{% endfor %}
</div>
</div>
</div>
<div class="apk-product-annotation uk-flex uk-flex-bottom">
<div class="uk-grid-medium" uk-grid>
<div class="uk-width-expand@m">
{{ pimcore_wysiwyg('product-annotaiton') }}
</div>
<div class="uk-width-auto@m uk-flex uk-flex-right uk-flex-middle">
<div>
{# Scroll géré dans le main.js #}
{% if pimcore_select("scroll").data == "apk-scroll" or pimcore_select("scroll").data == "apk-top" %}
{% if pimcore_select("scroll").data == "apk-scroll" %}
<div class="apk-scroll">
{{ "SCROLL"|trans }}
</div>
{% elseif pimcore_select("scroll").data == "apk-top" %}
<div class="apk-scroll apk-top">
{{ "TOP"|trans }}
</div>
{% endif %}
{% endif %}
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
{% endif %}