{% extends '@SyliusShop/layout.html.twig' %}
{# {% block title %}
{{ sitePageCms.title }}
|
{{ parent() }}
{% endblock %} #}
{% block title %}{{ sitePageCms.metaTitle }} - {{ parent() }}{% endblock %}
{% block metatags %}
{{ parent() }}
<meta name="description" content="{{ sitePageCms.metaDescription|raw }}" />
{% endblock %}
{% block container_css_classes %}
{% apply spaceless %}
bitbag_sylius_cms_plugin_shop_page_show
{% endapply %}
{% endblock %}
{% block content %}
{% set page = sitePageCms %}
{% if page.typecms == 8 or page.typecms is null or page.typecms == '' %}
{% if sitePageCms.imagesByType('image_page_cms_header')|length > 0 %}
<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') }})">
{% else %}
<div class="page-content simple-page-cms-header" style="background-image: url('/webapic-theme/images/asupprimer/page-bg-content-full.png')">
{% endif %}
{# Fil d'ariane #}
{# {{ wo_render_breadcrumbs() }} #}
<h1>{{ sitePageCms.title }}</h1>
</div>
<div class="simple-page-cms-content">
{{ sitePageCms.content|raw }}
</div>
{% if sitePageCms.id == 25 %}
<div id="skpLS_list"></div>
<script>
(function () {
var spck = {
storeId: "8404091",
customColor: '#000000',
containerId: 'skpLS_list',
displayType: 'all',
staging: true, // false in production environment | true in staging environment
keywords: [],
refreshOnClose: true,
transactionType: 'addToCart',
closeIframeOnCloseSP: false,
};
console.log(document);
var el = document.createElement('script');
el.setAttribute('src', 'https://party.spockee.io/builder/' + spck.storeId);
el.setAttribute('data-spck', JSON.stringify(spck));
document.body.appendChild(el);
// Documentation :
// English : http://wiki.spockee.com/en/Shopping-Party/Integrate-player
})();
window.addEventListener('skp:addToCart', (event) => {
const { origin, product } = event.detail
//console.log('origin', origin);
//console.log('product', product);
data = {};
data[product.id] = 1;
console.log(data);
$.post('/cart/ajax/add-to-cart', data, function (res) {
// console.log(res);
$('.pagepanier .produits-ctn').html(res.produits);
$('.pagepanier-totals .total-ctn').html(res.total);
$('.pagepanier-livraison').html(res.livraison);
if(res.widgettop){
$('.sylius-cart-button-ctn').html(res.widgettop);
}
// // Laisse la popup ouverte
// $('.panier').addClass('active');
// $('.panier').show(0);
// location.reload();
});
// addProductToCustomerCart(product); // Trigger your add to cart functionality with your own implementation
//sendTrackingToYourPlatform(origin, product); // Send tracking informations to your platform
})
</script>
{% endif %}
{% else %}
{% if page.typecms == 4 %}
{% set typecms = 1 %}
{% else %}
{% set typecms = page.typecms %}
{% endif %}
<div class="page-content typecms{{ typecms }}" {% if typecms != 3 %}style="background-image: url('{{ asset('webapic-theme/images/asupprimer/page-bg-content-full.png') }}')" {% endif %}>
{# <div class="ui breadcrumb">
{% if is_mobile() %}
<a class="section" href="{{ path('sylius_shop_homepage') }}">
<img src="{{ asset('webapic-theme/images/mobile-breacrumb-arrowleft.png') }}" class="ui image" />
Accueil
</a>
{% else %}
<a href="{{ path('sylius_shop_homepage') }}" class="section">{{ 'sylius.ui.home'|trans }}</a>
<div class="divider"> /</div>
<div class="active section">{{ page.title }}</div>
{% endif %}
</div> #}
<div class="page-content-ctn">
{% if typecms == 2 %}
<div class="page-content-left">
<img src="{{ asset('webapic-theme/images/asupprimer/page-bg-content-left2.svg') }}" class="ui image" />
</div>
{% endif %}
<div class="page-content-middle">
<h1 class="bitbag-page-name">{{ page.title }}</h1>
{# {% if page.typecms != 4 %} #}
{# <h2>{{ page.title }}</h2> #}
<div class="bitbag-page-content">
{# {{ bitbag_cms_render_content(page) }} #}
{{ sitePageCms.content|raw }}
</div>
{# {% endif %} #}
</div>
{% if page.typecms == 2 %}
<div class="page-content-right">
{% if page.id == 22 %}
<div id="circle">
{#
<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">
<defs>
<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 "/>
</defs>
<circle cx="150" cy="100" r="75" fill="none"/>
<g>
<use xlink:href="#circlePath" fill="none"/>
<text fill="#fff">
<textPath xlink:href="#circlePath">
{{ page.name }}
</textPath>
</text>
</g>
</svg>
#}
<img src="{{ asset('webapic-theme/images/txt-tournant-personnalite.svg') }}" class="ui image" />
</div>
{% endif %}
</div>
{% endif %}
{# <div class="ui grid center aligned">
<div class="eight wide column">
{% if page.image %}
<img class="page-image ui fluid image" src="{{ page.image.path }}" alt="">
{% endif %}
</div>
</div> #}
{# <div class="bitbag-page-sections">
{% include '@BitBagSyliusCmsPlugin/Shop/Page/Show/_sections.html.twig' %}
</div> #}
</div>
</div>
{{ render(path('bitbag_sylius_cms_plugin_shop_block_index_by_section_code', {'sectionCode' : page.codesection, 'template' : '@BitBagSyliusCmsPlugin/Shop/Block/index.html.twig'})) }}
{% endif %}
{% endblock %}