templates/areas/apk-product-detail/view.html.twig line 1

Open in your IDE?
  1. {% do pimcore_head_script().appendFile('https://cdnjs.cloudflare.com/ajax/libs/vue/2.5.21/vue.min.js') %}
  2. {% do pimcore_head_script().appendFile('https://cdn.jsdelivr.net/npm/vue-carousel-3d@0.2.0/dist/vue-carousel-3d.min.js') %}
  3. {% if editmode %}
  4. <div class="uk-container apk-container-1400">
  5.     <div uk-alert>
  6.         <h1 class="uk-h1">APK product detail</h1>
  7.     </div>
  8.     <ul uk-tab>
  9.         <li><a href="#">Configurations</a></li>
  10.         <li class="uk-active"><a href="#">Content Edit</a></li>
  11.     </ul>
  12.     <ul class="uk-switcher uk-margin">
  13.         <li class="apk-size-20 uk-grid-small" uk-grid>
  14.             {# Colonne 1 #}
  15.             <div class="uk-width-1-2@m" uk-margin>
  16.                 <div>Type de heading pour le titre ?</div>
  17.                 {{ pimcore_select("content-heading", {
  18.                     "store" : [
  19.                         ['span', 'span'],
  20.                         ['h1', 'Heading 1'],
  21.                         ['h2', 'Heading 2'],
  22.                         ['h3', 'Heading 3'],
  23.                         ['h4', 'Heading 4'],
  24.                         ['h5', 'Heading 5'],
  25.                         ['h6', 'Heading 6']
  26.                     ],
  27.                     "defaultValue" : "h2"
  28.                 }) }}
  29.                 <div><strong>Style</strong> du heading pour le titre ?</div>
  30.                 {{ pimcore_select("content-heading-style", {
  31.                     "store" : [
  32.                         ['h1', 'Heading 1'],
  33.                         ['h2', 'Heading 2'],
  34.                         ['h3', 'Heading 3'],
  35.                         ['h4', 'Heading 4'],
  36.                         ['h5', 'Heading 5'],
  37.                         ['h6', 'Heading 6']
  38.                     ],
  39.                     "defaultValue" : "h2"
  40.                 }) }}
  41.             </div>
  42.             {# Colonne 2 #}
  43.             <div class="uk-width-1-2@m" uk-margin>
  44.                 <div>Espacement en haut du block</div>
  45.                 {{ pimcore_select("margin-top", {
  46.                     "store" : [
  47.                         ['', 'Aucun'],
  48.                         ['uk-margin-small-top', 'Petit'],
  49.                         ['uk-margin-medium-top', 'Moyen'],
  50.                         ['uk-margin-large-top', 'Grand'],
  51.                         ['uk-margin-xlarge-top', 'Très grand'],
  52.                     ],
  53.                     "defaultValue" : ""
  54.                 }) }}
  55.     
  56.                 <div>Espacement en bas du block</div>
  57.                 {{ pimcore_select("margin-bottom", {
  58.                     "store" : [
  59.                         ['', 'Aucun'],
  60.                         ['uk-margin-small-top', 'Petit'],
  61.                         ['uk-margin-medium-top', 'Moyen'],
  62.                         ['uk-margin-large-top', 'Grand'],
  63.                         ['uk-margin-xlarge-top', 'Très grand'],
  64.                     ],
  65.                     "defaultValue" : ""
  66.                 }) }}
  67.                 <div>Afficher un scroll ?</div>
  68.                 {{ pimcore_select("scroll", {
  69.                     "store" : [
  70.                         ['', 'Aucun'],
  71.                         ['apk-scroll', 'SCROLL'],
  72.                         ['apk-top', 'TOP']
  73.                     ],
  74.                     "defaultValue" : "apk-scroll"
  75.                 }) }}
  76.                 
  77.             </div>
  78.         </li>
  79.     
  80.         <li class="uk-active">
  81.             <div class="uk-margin-large-bottom">
  82.                 <div class="uk-child-width-1-2@m" uk-grid>
  83.                     <div>
  84.                         <div class="uk-margin"><strong>Titre à gauche</strong></div>
  85.                         <h2 class="uk-h2">
  86.                             {{ pimcore_textarea("content-title",{
  87.                                 "nl2br" : true
  88.                             }) }}
  89.                         </h2>
  90.                         <div class="uk-margin"><strong>Objet produit</strong></div>
  91.                         {{ pimcore_relation("myRelation") }}
  92.                         
  93.                         <div class="uk-alert-danger" uk-alert>
  94.                             <div class="uk-margin"><strong>Autres produits correspondants</strong></div>
  95.                             {% for row in pimcore_block('otherProcuts').iterator %}
  96.                                 {{ pimcore_relation("myOtherRelation") }}
  97.                                     <div class="uk-margin"><strong>Condition de prise (ex : 1/J)</strong></div>
  98.                                     {{ pimcore_textarea('product-image-prise-other') }}
  99.                                     <div class="uk-margin"><strong>Type (ex: comprimés / gélules)</strong></div>
  100.                                     {{ pimcore_input('product-type-other') }}
  101.                                     <div class="uk-margin"><strong>Lien vers la notice</strong></div>
  102.                                     {{ pimcore_link("content-btn-product-other", {
  103.                                         "class" : "uk-button"
  104.                                     }) }}
  105.                             {% endfor %}
  106.                         </div>
  107.                         <div class="uk-margin"><strong>Condition de prise (ex : 1/J)</strong></div>
  108.                         {{ pimcore_textarea('product-image-prise') }}
  109.                         <div class="uk-margin"><strong>Type (ex: comprimés / gélules)</strong></div>
  110.                         {{ pimcore_input('product-type') }}
  111.                         <div class="uk-margin"><strong>Lien vers la notice</strong></div>
  112.                         {{ pimcore_link("content-btn", {
  113.                             "class" : "uk-button"
  114.                         }) }}
  115.                         <hr>
  116.                         <dt>Google Analytics Event: Action</dt>
  117.                         <dd>{{ pimcore_input("content-btn-secondary-ga-1-1") }}</dd>
  118.                         <hr>
  119.                         <dt>Google Analytics Event: Category</dt>
  120.                         <dd>{{ pimcore_input("content-btn-secondary-ga-1-2") }}</dd>
  121.                         <hr>
  122.                         <dt>Google Analytics Event: Label</dt>
  123.                         <dd>{{ pimcore_input("content-btn-secondary-ga-1-3") }}</dd>
  124.                     
  125.                     </div>
  126.                     <div>
  127.                         <div class="uk-margin"><strong>Titre à droite</strong></div>
  128.                         <h2 class="uk-h2">
  129.                             {{ pimcore_textarea("content-right-title",{
  130.                                 "nl2br" : true
  131.                             }) }}
  132.                         </h2>
  133.                         <div class="uk-margin"><strong>Sous-titre à droite</strong></div>
  134.                         <h2 class="uk-h2">
  135.                             {{ pimcore_textarea("content-right-title-lower",{
  136.                                 "nl2br" : true
  137.                             }) }}
  138.                         </h2>
  139.                         <div class="uk-margin"><strong>Contenu descriptif</strong></div>
  140.                         {{ pimcore_wysiwyg('product-content') }}
  141.                         <div class="uk-margin"><strong>images est descriptions</strong></div>
  142.                         {% for row in pimcore_block('productDescriptionImages').iterator %}
  143.                         <div uk-alert>
  144.                             <div class="uk-margin"><strong>Image</strong></div>
  145.                             {{ pimcore_image('product-description-image') }}    
  146.                             <div class="uk-margin"><strong>Description de l'image</strong></div>
  147.                             {{ pimcore_textarea('product-description-text', {'nl2br' : true}) }}    
  148.                         </div>
  149.                         {% endfor %}
  150.                         <div class="uk-margin"><strong>Annotations</strong></div>
  151.                         {{ pimcore_wysiwyg('product-annotaiton') }}
  152.                     </div>
  153.                 </div>
  154.                 
  155.             </div>
  156.         </li>
  157.     </ul>
  158. </div>
  159. {% endif %}
  160. {% if not editmode %}
  161. <!-- This is the modal -->
  162. <div id="modal-pharmacies" uk-modal>
  163.     <div class="uk-modal-dialog uk-modal-body uk-text-center uk-position-relative">
  164.         <h2>{{"Où acheter ?"|trans}}</h2>
  165.         <div uk-grid>
  166.             <div class="uk-width-2-5">
  167.                 <div class="apk-container-image apk-image-pharmacie">
  168.                 </div>
  169.                 <div>
  170.                     <h3>{{"En pharmacie :"|trans}}</h2>
  171.                     <p>
  172.                         {{"Vous préférez vous rendre chez votre pharmacien afin de bénéficier de ses conseils avisés ?"|trans}}
  173.                         </br>
  174.                         {{"Trouvez votre pharmacie la plus proche sur"|trans}}
  175.                     </p>
  176.                 </div>
  177.                 {% if document.property('pharmacieLogo') %}
  178.                 <div class="apk-container-image-phramacie">
  179.                     <a href="{{ 'pharmacie-be-lien'|trans }}" target="_blank">
  180.                         <img src="{{ document.property('pharmacieLogo').thumbnail('') }}" alt="{{ "Pharmacie"|trans }}">   
  181.                     </a>
  182.                 </div>
  183.                 {% endif %}
  184.             </div>
  185.             <div class="uk-width-auto apk-width-auto">
  186.                 <div class="apk-border-vertical">
  187.             
  188.                 </div>
  189.             </div>
  190.             <div class="uk-width-2-5">
  191.                 <div class="apk-container-image apk-margin-container-image apk-image-en-ligne">
  192.                 </div>
  193.                 <div>
  194.                     <h3>{{"En ligne :"|trans}}</h2>
  195.                     <p>
  196.                         {{"Vous voulez être livré directement chez vous via des platformes e-shop ouvertes 24h/24"|trans}}
  197.                         </br>
  198.                         {{"Magnecaps est également disponible en ligne !"|trans}}
  199.                     </p>
  200.                 </div>
  201.                 <div class="apk-container-phramacies">
  202.                     <div class="uk-child-width-1-2 uk-child-width-1-3@s" uk-grid>
  203.                         {% set i = 0 %}
  204.                         {% if not pimcore_relation("myRelation").isEmpty  %}
  205.                             {% if pimcore_relation("myRelation").element.className == 'Produits' %}
  206.                                 {% for lienPharmacie in pimcore_relation("myRelation").element.lienPharmacies %}
  207.                                     <div apk-type="{{i}}">
  208.                                         <a href="{{ lienPharmacie.lien }}" target="_blank">
  209.                                             {{ lienPharmacie.image.thumbnail('').html()|raw }}
  210.                                         </a>
  211.                                     </div>
  212.                                 {% endfor %}
  213.                             {% endif %}
  214.                         {% endif %}
  215.                         {% for row in pimcore_block('otherProcuts').iterator %}
  216.                             {% set i = i + 1 %}
  217.                             {% if not pimcore_relation("myOtherRelation").isEmpty  %}
  218.                                 {% if pimcore_relation("myOtherRelation").element.className == 'Produits' %}
  219.                                     {% for lienPharmacie in pimcore_relation("myOtherRelation").element.lienPharmacies %}
  220.                                         <div apk-type="{{i}}" style="display:none">
  221.                                             <a href="{{ lienPharmacie.lien }}" target="_blank">
  222.                                                 {{ lienPharmacie.image.thumbnail('').html()|raw }}
  223.                                             </a>
  224.                                         </div>
  225.                                     {% endfor %}
  226.                                 {% endif %}
  227.                             {% endif %}
  228.                         {% endfor %}
  229.                     </div>
  230.                 </div>
  231.             </div>
  232.         </div>
  233.     </div>
  234. </div>
  235. <div class="apk-areabrick-container {{ pimcore_select("margin-top") }} {{ pimcore_select("margin-bottom") }}">
  236.     <div class="apk-container-custom">
  237.         <div class="uk-child-width-1-2@m uk-grid-collapse" uk-grid uk-height-match="target: [apk-height-match]">
  238.             <div class="apk-container-custom-left uk-flex uk-flex-middle">
  239.                 <div class="uk-width-1-1" apk-height-match>
  240.                         
  241.                     <div class="uk-container apk-container-700">
  242.                         {% if not pimcore_textarea("content-title").isEmpty %}
  243.                             {% if pimcore_select("content-heading").data == "span" %}
  244.                                 <span class="uk-{{ pimcore_select("content-heading-style").getData() }}">
  245.                                     {{ pimcore_textarea("content-title", {
  246.                                     "nl2br" : true})|raw }}
  247.                                 </span>
  248.                             {% else %}
  249.                                 {% set content_heading = pimcore_select("content-heading").getData() %}
  250.                                 <{{ content_heading }} class="uk-{{ pimcore_select("content-heading-style").getData() }}">
  251.                                     {{ pimcore_textarea("content-title", {
  252.                                     "nl2br" : true})|raw }}
  253.                                 </{{ content_heading }}>
  254.                             {% endif %}
  255.                         {% endif %}
  256.                     </div>
  257.                     {% if not pimcore_block('otherProcuts').getCount > 0 %}
  258.                         
  259.                     <div class="uk-container apk-container-700">
  260.                         <div class="apk-media">
  261.                             <div class="apk-media-container">
  262.                                 {% if not pimcore_relation("myRelation").isEmpty  %}
  263.                                 {% if pimcore_relation("myRelation").element.className == 'Produits' %}
  264.                                     {{ pimcore_relation("myRelation").element.image.thumbnail('big-product-thumb').html()|raw }} 
  265.                                 {% endif %}
  266.                                 {% endif %}
  267.                                 <span class="apk-gomette uk-flex uk-flex-middle uk-flex-center uk-text-center">
  268.                                     <span>{{ pimcore_textarea('product-image-prise', {'nl2br' : true, 'htmlspecialchars' : false}) }}</span>
  269.                                 </span>
  270.                                 
  271.                             </div>
  272.                         </div>
  273.                     </div>
  274.                     {% else %}
  275.                     <!-- Carousel -->
  276.                     <div id="product-carousel">
  277.                         {% set i = 0 %}
  278.                         <carousel-3d :border="0" :startIndex="0" :controls-visible="true" :controls-prev-html="'&#10092; '"
  279.                             :controls-next-html="'&#10093;'" :height="400" :space="300" :perspective="0"
  280.                             :controls-width="30" :controls-height="60" :clickable="true"
  281.                             @before-slide-change="onBeforeSlideChange">
  282.                             <slide :index="{{i}}" apk-index="{{i}}">
  283.                                 <div apk-height-carousel>
  284.                                     <div class="apk-media">
  285.                                         <div class="apk-media-container uk-text-center">
  286.                                             <div>
  287.                                                 {% if not pimcore_relation("myRelation").isEmpty  %}
  288.                                                 {% if pimcore_relation("myRelation").element.className == 'Produits' %}
  289.                                                     {{ pimcore_relation("myRelation").element.image.thumbnail('big-product-thumb').html()|raw }} 
  290.                                                 {% endif %}
  291.                                                 {% endif %}
  292.                                                 <span class="apk-gomette uk-flex uk-flex-middle uk-flex-center uk-text-center">
  293.                                                     <span>{{ pimcore_textarea('product-image-prise', {'nl2br' : true, 'htmlspecialchars' : false}) }}</span>
  294.                                                 </span>
  295.                                             </div>
  296.                                         </div>
  297.                                     </div>
  298.                                 </div>
  299.                             </slide>
  300.                             {% for row in pimcore_block('otherProcuts').iterator %}
  301.                             {% set i = i + 1 %}
  302.                             <slide :index="{{i}}">
  303.                                 <div apk-height-carousel>
  304.                                     <div class="apk-media">
  305.                                         <div class="apk-media-container uk-text-center">
  306.                                             <div>
  307.                                                 {% if not pimcore_relation("myOtherRelation").isEmpty  %}
  308.                                                 {% if pimcore_relation("myOtherRelation").element.className == 'Produits' %}
  309.                                                     {{ pimcore_relation("myOtherRelation").element.image.thumbnail('big-product-thumb').html()|raw }} 
  310.                                                 {% endif %}
  311.                                                 {% endif %}
  312.                                                 <span class="apk-gomette uk-flex uk-flex-middle uk-flex-center uk-text-center">
  313.                                                     <span>{{ pimcore_textarea('product-image-prise-other', {'nl2br' : true, 'htmlspecialchars' : false}) }}</span>
  314.                                                 </span>
  315.                                             </div>
  316.                                         </div>
  317.                                     </div>
  318.                                 </div>
  319.                             </slide>
  320.                             {% endfor %}
  321.                         </carousel-3d>
  322.                     </div>
  323.                     {% endif %}
  324.                     <div class="uk-container apk-container-900">
  325.                         <div class="apk-type {{ pimcore_block('otherProcuts').getCount > 0 ? 'apk-type-multiple' : '' }}">
  326.                             
  327.                             <div>
  328.                                 {% set i = 0 %}
  329.                                 <div apk-type="{{i}}">
  330.                                     <span>{{ pimcore_input('product-type') }}</span>
  331.                                     <div class="uk-child-width-auto uk-grid-small" uk-grid>
  332.                                         <div>
  333.                                         {% if not pimcore_link("content-btn").isEmpty() %}
  334.                                             <div class="apk-action">
  335.                                                 {% if
  336.                                                     not pimcore_input("content-btn-secondary-ga-1-1").isEmpty
  337.                                                     and not pimcore_input("content-btn-secondary-ga-1-2").isEmpty
  338.                                                     and not pimcore_input("content-btn-secondary-ga-1-3").isEmpty
  339.                                                 %}
  340.                                                     {{ pimcore_link("content-btn", {
  341.                                                         "class" : "uk-button uk-button-large",
  342.                                                         "onclick" : "javascript:sendGtagEvent('" ~ add_slashes(pimcore_input("content-btn-secondary-ga-1-1")) ~ "',
  343.                                                 '" ~ add_slashes(pimcore_input("content-btn-secondary-ga-1-2")) ~ "',
  344.                                                 '" ~ add_slashes(pimcore_input("content-btn-secondary-ga-1-3")) ~ "');"
  345.                                                     }) }}
  346.                                                 {% else %}
  347.                                                     {{ pimcore_link("content-btn", {
  348.                                                         "class" : "uk-button"
  349.                                                     }) }}
  350.                                                 {% endif %}
  351.                                             </div>
  352.                                         {% endif %}
  353.                                         </div>
  354.                                         <div>
  355.                                             <button class="uk-button apk-btn-univers" type="button" uk-toggle="target: #modal-pharmacies">{{"Acheter"|trans}}</button>
  356.                                         </div>
  357.                                     </div>
  358.                                 </div>
  359.                                 {% for row in pimcore_block('otherProcuts').iterator %}
  360.                                     {% set i = i + 1 %}
  361.                                     <div apk-type="{{i}}" style="display:none">
  362.                                         <span>{{ pimcore_input('product-type-other') }}</span>
  363.                                         <div class="uk-child-width-auto uk-grid-small" uk-grid>
  364.                                             <div class="apk-action">
  365.                                                 {{ pimcore_link("content-btn-product-other", {"class" : "uk-button"}) }}
  366.                                             </div>
  367.                                             <div>
  368.                                                 <button class="uk-button apk-btn-univers" type="button" uk-toggle="target: #modal-pharmacies">{{"Acheter"|trans}}</button>
  369.                                             </div>
  370.                                         </div>
  371.                                     </div>
  372.                                 {% endfor %}
  373.                             </div>
  374.                         </div>
  375.                         {#{% if not pimcore_link("content-btn").isEmpty() %}
  376.                             <div class="apk-action">
  377.                                 {% if
  378.                                     not pimcore_input("content-btn-secondary-ga-1-1").isEmpty
  379.                                     and not pimcore_input("content-btn-secondary-ga-1-2").isEmpty
  380.                                     and not pimcore_input("content-btn-secondary-ga-1-3").isEmpty
  381.                                 %}
  382.                                     {{ pimcore_link("content-btn", {
  383.                                         "class" : "uk-button uk-button-large",
  384.                                         "onclick" : "javascript:sendGtagEvent('" ~ add_slashes(pimcore_input("content-btn-secondary-ga-1-1")) ~ "',
  385.                                         '" ~ add_slashes(pimcore_input("content-btn-secondary-ga-1-2")) ~ "',
  386.                                         '" ~ add_slashes(pimcore_input("content-btn-secondary-ga-1-3")) ~ "');"
  387.                                     }) }}
  388.                                 {% else %}
  389.                                     {{ pimcore_link("content-btn", {
  390.                                         "class" : "uk-button"
  391.                                     }) }}
  392.                                 {% endif %}
  393.                             </div>
  394.                         {% endif %}#}
  395.                     </div>
  396.                 </div>
  397.             </div>
  398.             <div class="apk-container-custom-right uk-flex uk-flex-middle">
  399.                 <div class="uk-container apk-container-700 uk-height-1-1 uk-flex uk-flex-column" apk-height-match>
  400.                     <div>
  401.                         <div class="apk-right-title">
  402.                             <span class="uk-h1">
  403.                                 {{ pimcore_textarea("content-right-title") }}
  404.                                 <span>{{ pimcore_textarea("content-right-title-lower") }}</span>
  405.                             </span>
  406.                         </div>
  407.                         
  408.                         <div class="apk-content">
  409.                             {{ pimcore_wysiwyg('product-content') }}
  410.                         </div>
  411.                         
  412.                         <div class="apk-product-medias">
  413.                             <div class="uk-grid-medium uk-child-width-expand@s" uk-grid uk-height-match="target: apk-product-medias-box">
  414.                                 {% for row in pimcore_block('productDescriptionImages').iterator %}
  415.                                 <div class="uk-text-center">
  416.                                     <div class="apk-product-medias-box">
  417.                                         {% if pimcore_image('product-description-image').src %}
  418.                                             <img height="150" src="{{ pimcore_image('product-description-image').src }}" alt="pimcore_image('product-description-image').alt">    
  419.                                         {% endif %}
  420.                                         <div class="apk-product-medias-description">
  421.                                             {{ pimcore_textarea('product-description-text', {'nl2br' : true}) }}    
  422.                                         </div>
  423.                                     </div>
  424.                                 </div>
  425.                             {% endfor %}    
  426.                             </div>
  427.                         </div>
  428.                     </div>
  429.         
  430.                     <div class="apk-product-annotation uk-flex uk-flex-bottom">
  431.                         <div class="uk-grid-medium" uk-grid>
  432.                             <div class="uk-width-expand@m">
  433.                                 {{ pimcore_wysiwyg('product-annotaiton') }}
  434.                             </div>
  435.                             <div class="uk-width-auto@m uk-flex uk-flex-right uk-flex-middle">
  436.                                 <div>
  437.                                     {# Scroll géré dans le main.js #}
  438.                                     {% if pimcore_select("scroll").data == "apk-scroll" or pimcore_select("scroll").data == "apk-top" %}
  439.                                         {% if pimcore_select("scroll").data == "apk-scroll" %}
  440.                                             <div class="apk-scroll">
  441.                                                 {{ "SCROLL"|trans }}
  442.                                             </div>
  443.                                         {% elseif pimcore_select("scroll").data == "apk-top" %}
  444.                                             <div class="apk-scroll apk-top">
  445.                                                 {{ "TOP"|trans }}
  446.                                             </div>
  447.                                         {% endif %}
  448.                                     {% endif %}
  449.                                 </div>
  450.                             </div>
  451.                         </div>
  452.                     </div>
  453.                     
  454.     
  455.                 </div>
  456.                 
  457.             </div>
  458.         </div>
  459.     </div>
  460. </div>
  461. {% endif %}