themes/webapicTheme/templates/site_page_cms_show.html.twig line 1

Open in your IDE?
  1. {% extends '@SyliusShop/layout.html.twig' %}
  2. {# {% block title %}
  3.     {{ sitePageCms.title }}
  4.     |
  5.     {{ parent() }}
  6. {% endblock %} #}
  7. {% block title %}{{ sitePageCms.metaTitle }} - {{ parent() }}{% endblock %}
  8. {% block metatags %}
  9.     {{ parent() }}
  10.     <meta name="description" content="{{ sitePageCms.metaDescription|raw }}" />
  11. {% endblock %}
  12. {% block container_css_classes %}
  13.     {% apply spaceless %}
  14.     bitbag_sylius_cms_plugin_shop_page_show
  15.     {% endapply %}
  16. {% endblock %}
  17. {% block content %}
  18.     {% set page = sitePageCms %}
  19.     {% if page.typecms == 8 or page.typecms is null  or page.typecms == '' %}
  20.         {% if sitePageCms.imagesByType('image_page_cms_header')|length > 0 %}
  21.             <div class="page-content simple-page-cms-header" style="background-image: url({{ sitePageCms.imagesByType('image_page_cms_header').first.path|imagine_filter('sylius_shop_product_original') }})">
  22.         {% else %}
  23.             <div class="page-content simple-page-cms-header" style="background-image: url('/webapic-theme/images/asupprimer/page-bg-content-full.png')">
  24.         {% endif %}
  25.             {# Fil d'ariane #}
  26.             {# {{ wo_render_breadcrumbs() }} #}
  27.             <h1>{{ sitePageCms.title }}</h1>
  28.         </div>
  29.         <div class="simple-page-cms-content">
  30.             {{ sitePageCms.content|raw }}
  31.         </div>
  32.         {% if sitePageCms.id == 25 %}
  33.             <div id="skpLS_list"></div>
  34.             <script>
  35.                 (function () {
  36.                 var spck = {
  37.                     storeId: "8404091", 
  38.                     customColor: '#000000', 
  39.                     containerId: 'skpLS_list', 
  40.                     displayType: 'all', 
  41.                     staging: true,  // false in production environment | true in staging environment
  42.                     keywords: [],
  43.                     refreshOnClose: true,
  44.                     transactionType: 'addToCart',
  45.                     closeIframeOnCloseSP: false,
  46.                 };
  47.                 console.log(document);
  48.                 var el = document.createElement('script');
  49.                 el.setAttribute('src', 'https://party.spockee.io/builder/' + spck.storeId);
  50.                 el.setAttribute('data-spck', JSON.stringify(spck));
  51.                 document.body.appendChild(el);
  52.                 // Documentation :
  53.                 // English : http://wiki.spockee.com/en/Shopping-Party/Integrate-player
  54.                 })();
  55.                 window.addEventListener('skp:addToCart', (event) => {
  56.                     const { origin, product } = event.detail
  57.                      //console.log('origin', origin);
  58.                      //console.log('product', product);
  59.                     data = {};
  60.                     data[product.id] = 1;
  61.                     console.log(data);
  62.                     $.post('/cart/ajax/add-to-cart', data, function (res) {
  63.                         // console.log(res);
  64.                         $('.pagepanier .produits-ctn').html(res.produits);
  65.                         $('.pagepanier-totals .total-ctn').html(res.total);
  66.                         $('.pagepanier-livraison').html(res.livraison);
  67.                         if(res.widgettop){
  68.                             $('.sylius-cart-button-ctn').html(res.widgettop);
  69.                         }
  70.                     
  71.     
  72.                         // // Laisse la popup ouverte
  73.                         // $('.panier').addClass('active');
  74.                         // $('.panier').show(0);
  75.                         // location.reload(); 
  76.                     });
  77.                      // addProductToCustomerCart(product);  // Trigger your add to cart functionality with your own implementation
  78.                      //sendTrackingToYourPlatform(origin, product);  // Send tracking informations to your platform
  79.                 })
  80.             </script>
  81.         {% endif %}
  82.      {% else %}
  83.         {% if page.typecms == 4 %}
  84.             {% set typecms = 1 %}
  85.         {% else %}
  86.             {% set typecms = page.typecms %}
  87.         {% endif %}
  88.            <div class="page-content typecms{{ typecms }}" {% if typecms != 3 %}style="background-image: url('{{ asset('webapic-theme/images/asupprimer/page-bg-content-full.png') }}')"  {% endif %}>
  89.                        
  90.             {# <div class="ui breadcrumb">
  91.                 {% if is_mobile() %}   
  92.                     <a class="section" href="{{ path('sylius_shop_homepage') }}">
  93.                         <img src="{{ asset('webapic-theme/images/mobile-breacrumb-arrowleft.png') }}" class="ui image" />
  94.                         Accueil
  95.                     </a>
  96.                 
  97.                 {% else %}
  98.                     
  99.                         <a href="{{ path('sylius_shop_homepage') }}" class="section">{{ 'sylius.ui.home'|trans }}</a>
  100.                         <div class="divider"> /</div>
  101.                         <div class="active section">{{ page.title }}</div>
  102.                     
  103.                 {% endif %}
  104.             </div> #}
  105.             
  106.     
  107.             <div class="page-content-ctn">
  108.                 {% if typecms == 2  %}
  109.                     <div class="page-content-left">
  110.                         <img src="{{ asset('webapic-theme/images/asupprimer/page-bg-content-left2.svg') }}" class="ui image" />
  111.                     </div>
  112.                 {% endif %}
  113.                 <div class="page-content-middle">
  114.                     <h1 class="bitbag-page-name">{{ page.title }}</h1>   
  115.                     
  116.                     {# {% if page.typecms != 4 %} #}
  117.                     
  118.                         {# <h2>{{ page.title }}</h2>                         #}
  119.                         <div class="bitbag-page-content">
  120.                             {# {{ bitbag_cms_render_content(page) }} #}
  121.                             {{ sitePageCms.content|raw }}
  122.                         </div>
  123.                     {# {% endif %} #}
  124.                 </div>
  125.                 {% if page.typecms == 2 %}
  126.                     <div class="page-content-right">
  127.                         
  128.                             {% if page.id == 22 %}
  129.                             <div id="circle">
  130.                                                             {#
  131.                                 <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="300px" height="300px" viewBox="0 0 300 300" enable-background="new 0 0 300 300" xml:space="preserve">
  132.                                     <defs>
  133.                                         <path id="circlePath" d=" M 150, 150 m -60, 0 a 60,60 0 0,1 120,0 a 60,60 0 0,1 -120,0 "/>
  134.                                     </defs>
  135.                                     <circle cx="150" cy="100" r="75" fill="none"/>
  136.                                     <g>
  137.                                         <use xlink:href="#circlePath" fill="none"/>
  138.                                         <text fill="#fff">
  139.                                             <textPath xlink:href="#circlePath">
  140.                                                 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{ page.name }}
  141.                                             </textPath>
  142.                                         </text>
  143.                                     </g>
  144.                                 </svg>
  145.                                                                     #}
  146.                                 <img src="{{ asset('webapic-theme/images/txt-tournant-personnalite.svg') }}" class="ui image" /> 
  147.                             </div>  
  148.                         {% endif %}
  149.                     </div>
  150.                 {% endif %}
  151.                 
  152.                 {# <div class="ui grid center aligned">
  153.                     <div class="eight wide column">
  154.                         {% if page.image %}
  155.                             <img class="page-image ui fluid image" src="{{ page.image.path }}" alt="">
  156.                         {% endif %}
  157.                     </div>
  158.                 </div> #}
  159.             
  160.                 
  161.                 {# <div class="bitbag-page-sections">
  162.                     {% include '@BitBagSyliusCmsPlugin/Shop/Page/Show/_sections.html.twig' %}
  163.                 </div> #}
  164.             </div>
  165.             
  166.         </div>
  167.          {{ render(path('bitbag_sylius_cms_plugin_shop_block_index_by_section_code', {'sectionCode' : page.codesection, 'template' : '@BitBagSyliusCmsPlugin/Shop/Block/index.html.twig'})) }}
  168.     {% endif %}
  169. {% endblock %}