Compare commits
1 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
b3181c39cb |
@ -58,6 +58,22 @@ class FrontController extends FrontControllerCore
|
||||
'display_footer' => $this->display_footer,
|
||||
));
|
||||
|
||||
if(Tools::getValue('amp')) {
|
||||
$this->smartyOutputContent(_PS_THEME_DIR_.'amp/header.tpl');
|
||||
|
||||
$temp = array_filter(explode('/', $this->template));
|
||||
$nb_segment = count($temp);
|
||||
$amp_tpl = '/';
|
||||
foreach ($temp as $key => $segment) {
|
||||
$amp_tpl .= ($key == $nb_segment) ? 'amp/' . $segment : $segment . '/';
|
||||
}
|
||||
|
||||
$this->smartyOutputContent($amp_tpl);
|
||||
$this->smartyOutputContent(_PS_THEME_DIR_.'amp/footer.tpl');
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
$layout = $this->getLayout();
|
||||
if ($layout)
|
||||
{
|
||||
|
175
themes/toutpratique/amp/footer.tpl
Normal file
175
themes/toutpratique/amp/footer.tpl
Normal file
@ -0,0 +1,175 @@
|
||||
<div class="container">
|
||||
<div >
|
||||
{hook h="displayReassurance"}
|
||||
</div>
|
||||
</div>
|
||||
{if !isset($content_only) || !$content_only}
|
||||
{if $page_name != 'order'}
|
||||
{if $page_name == 'homestore'}
|
||||
<div class="container">
|
||||
|
||||
<div class="inner_partenaire row">
|
||||
<span class="h4">{l s='Tous les produits de nos marques partenaires'}</span>
|
||||
{hook h='displayManufacturers'}
|
||||
</div>
|
||||
{*{if $page_name != 'password'}
|
||||
<div class="inner_partenaire row">
|
||||
<span class="h4">{l s='Nos partenaires'}</span>
|
||||
<div class="col-md-4">
|
||||
<div class="pub">
|
||||
{hook h='displayBoxPartenaire1'}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="pub">
|
||||
{hook h='displayBoxPartenaire2'}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="pub">
|
||||
{hook h='displayBoxPartenaire3'}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/if}*}
|
||||
</div>
|
||||
{/if}
|
||||
<div class="container">
|
||||
{hook h='displayNewsletterFooter'}
|
||||
</div>
|
||||
|
||||
{if $page_name != 'homestore'}
|
||||
<div class="container">
|
||||
|
||||
<div class="inner_partenaire row">
|
||||
<span class="h4">{l s='Tous les produits de nos marques partenaires'}</span>
|
||||
{hook h='displayManufacturers'}
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
{/if}
|
||||
|
||||
<div class="bg-grey">
|
||||
<div class="container">
|
||||
|
||||
<div class="col-lg-offset-3 col-lg-6 col-md-offset-2 col-md-8 col-sm-offset-1 col-sm-10 col-xs-offset-1 col-xs-10 footer_social">
|
||||
{if ($page_name == 'authentication' && $back != 'my-account') || $page_name == 'order'}
|
||||
<span class="title-social">{l s='Une question? Contactez-nous au'}</span>
|
||||
<span class="title-social unbreakable">{l s='0 800 500 270'}</span>
|
||||
|
||||
{else}
|
||||
<span class="title-social">{l s='Retrouvez-nous'}</span>
|
||||
<span class="social">
|
||||
<a href="https://www.facebook.com/ToutPratique-182589007555/" target="_blank"><i class="icon icon-facebook"></i></a>
|
||||
</span>
|
||||
<span class="social">
|
||||
<a href="https://twitter.com/Toutpratique" target="_blank"><i class="icon icon-twitter"></i></a>
|
||||
</span>
|
||||
<span class="social">
|
||||
<a href="https://www.youtube.com/user/toutpratique" target="_blank"><i class="icon icon-youtube"></i></a>
|
||||
</span>
|
||||
<span class="title-social">{l s='Contactez-nous'}</span>
|
||||
<span class="social">
|
||||
<a href="{$link->getPageLink('contact')}"><i class="icon icon-email"></i></a>
|
||||
</span>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<footer id="footer" class="bg-pink">
|
||||
<div class="container">
|
||||
<div class="logo_footer text-center">
|
||||
<img src="{$img_dir}logo.jpg" class="img-responsive" alt="{l s='Tout pratique logo'}">
|
||||
</div>
|
||||
{hook h='displayFooter'}
|
||||
|
||||
{hook h='displayFooterLink'}
|
||||
</div>
|
||||
</footer>
|
||||
{hook h='endBody'}
|
||||
|
||||
|
||||
<script type='text/javascript'>
|
||||
var toky_container=document.createElement('div');
|
||||
toky_container.id='toky';
|
||||
(document.getElementsByTagName('body')[0]).appendChild(toky_container);
|
||||
var toky_id = 231;
|
||||
(function () {
|
||||
var toky = document.createElement('script');
|
||||
toky.type = 'text/javascript';
|
||||
toky.async = true;
|
||||
toky.src = '//az601263.vo.msecnd.net/webview/'+toky_id+'/embed.js';
|
||||
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(toky);
|
||||
})();
|
||||
</script>
|
||||
|
||||
{if $page_name == 'order-confirmation'}
|
||||
<!-- Tag Google -->
|
||||
{assign var='totalTaxes' value=($orderInfo->total_paid_tax_incl - $orderInfo->total_paid_tax_excl)}
|
||||
|
||||
{literal}
|
||||
<script>
|
||||
ga('require', 'ecommerce', 'ecommerce.js');
|
||||
ga("ecommerce:addTransaction", {"id": "{/literal}{$orderInfo->reference}{literal}","affiliation": "", "revenue": "{/literal}{$orderInfo->total_products_wt}{literal}", "shipping": "{/literal}{$orderInfo->total_shipping_tax_excl}{literal}", "tax": "{/literal}{$totalTaxes}{literal}", "currency": "{/literal}{$currency->iso_code}{literal}" });
|
||||
{/literal}
|
||||
{foreach $orderProducts as $orderProduct}
|
||||
{literal}
|
||||
ga("ecommerce:addItem", {"id": "{/literal}{$orderInfo->reference}{literal}","name": "{/literal}{$orderProduct.product_name}{literal}","sku": "{/literal}{$orderProduct.id_product}{literal}","category": "{/literal}{$orderProduct.cat_name}{if $cartCreateOnCMSPage} - CMS{/if}{literal}","price": "{/literal}{$orderProduct.unit_price_tax_incl}{literal}","quantity": "{/literal}{$orderProduct.product_quantity}{literal}"});
|
||||
{/literal}
|
||||
{/foreach}
|
||||
{literal}
|
||||
ga('ecommerce:send');
|
||||
|
||||
deleteCookie('fromCMS');
|
||||
</script>
|
||||
{/literal}
|
||||
|
||||
{if isset($orderInfo)}
|
||||
<!-- Google Code for Boutique Toutpratique Conversion Page -->
|
||||
<script type="text/javascript">
|
||||
/* <![CDATA[ */
|
||||
var google_conversion_id = 969426203;
|
||||
var google_conversion_language = "en";
|
||||
var google_conversion_format = "3";
|
||||
var google_conversion_color = "ffffff";
|
||||
var google_conversion_label = "hWtBCPaH3mQQm4qhzgM";
|
||||
var google_conversion_value = {$orderInfo->total_paid};
|
||||
var google_conversion_currency = "EUR";
|
||||
var google_remarketing_only = false;
|
||||
/* ]]> */
|
||||
</script>
|
||||
<script type="text/javascript" src="//www.googleadservices.com/pagead/conversion.js">
|
||||
</script>
|
||||
<noscript>
|
||||
<div style="display:inline;">
|
||||
<img height="1" width="1" style="border-style:none;" alt="" src="//www.googleadservices.com/pagead/conversion/969426203/?value={$orderInfo->total_paid}&currency_code=EUR&label=hWtBCPaH3mQQm4qhzgM&guid=ON&script=0"/>
|
||||
</div>
|
||||
</noscript>
|
||||
|
||||
{/if}
|
||||
|
||||
|
||||
{/if}
|
||||
|
||||
{/if}
|
||||
|
||||
{include file="$tpl_dir./global.tpl"}
|
||||
|
||||
<script type="text/javascript" src="//tracker.twenga.fr/st/tracker_05f1ff2618c98e3f58f3e7241bdcf73d.js"></script>
|
||||
<script type="text/javascript">
|
||||
var gr_goal_params = {
|
||||
param_0 : '',
|
||||
param_1 : '',
|
||||
param_2 : '',
|
||||
param_3 : '',
|
||||
param_4 : '',
|
||||
param_5 : ''
|
||||
};
|
||||
</script>
|
||||
<script type="text/javascript" src="https://app.getresponse.com/goals_log.js?p=711604&u=BWu1Z" async></script>
|
||||
<div id="gototop">
|
||||
<img src="{$img_dir}bt-haut.png" title="{l s='Go to top'}" />
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
52
themes/toutpratique/amp/header.tpl
Normal file
52
themes/toutpratique/amp/header.tpl
Normal file
@ -0,0 +1,52 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html amp lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Hello, AMPs</title>
|
||||
<link rel="canonical" href="http://example.ampproject.org/article-metadata.html" />
|
||||
<meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1">
|
||||
{literal}
|
||||
<style amp-boilerplate>body{-webkit-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-moz-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-ms-animation:-amp-start 8s steps(1,end) 0s 1 normal both;animation:-amp-start 8s steps(1,end) 0s 1 normal both}@-webkit-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-moz-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-ms-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-o-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}</style><noscript><style amp-boilerplate>body{-webkit-animation:none;-moz-animation:none;-ms-animation:none;animation:none}</style></noscript>
|
||||
{/literal}
|
||||
<script async src="https://cdn.ampproject.org/v0.js"></script>
|
||||
<script async custom-element="amp-sidebar" src="https://cdn.ampproject.org/v0/amp-sidebar-0.1.js"></script>
|
||||
|
||||
<link href="https://fonts.googleapis.com/css?family=PT+Sans|Vidaloka" rel="stylesheet">
|
||||
<style amp-custom>
|
||||
body { font-family: 'PT Sans'; font-size: 14px; }
|
||||
main { padding: 15px; }
|
||||
h1 { font-family: 'Vidaloka', serif; font-size: 30px; line-height: 30px; margin-top: 0; }
|
||||
h2, .title { font-weight: bold; font-size: 20px; }
|
||||
h2 { margin: 40px 0 15px 0; }
|
||||
button { background: none; border: none; color: #fff; padding: 0; }
|
||||
.header { background: #e44e58; padding: 10px 15px; }
|
||||
.menu-btn { float: right }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<header class="header">
|
||||
<amp-img src="{$img_dir}logo.png" alt="ToutPratique" height="41" width="80"></amp-img>
|
||||
<button class="menu-btn" on="tap:sidebar.toggle">
|
||||
<svg x="0px" y="0px" viewBox="0 0 300 300" width="26" height="26" fill="#fff">
|
||||
<g><path d="M300,51.6v33.7H0V51.6H300z M0,135.2h300v33H0V135.2z M0,218.1h300v33.7H0V218.1z"></path></g>
|
||||
</svg>
|
||||
</button>
|
||||
|
||||
<amp-sidebar id='sidebar' layout="nodisplay" side="right">
|
||||
<section id="pane-menu" class="pane pb6">
|
||||
|
||||
<button class="amp-sidebar-close" on="tap:sidebar.close" tabindex="0">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 240 240" width="16" height="16"><polygon points="100,0 140,0 140,100 240,100 240,140 140,140 140,240 100,240 100,140 0 140 0,100 100,100 100,0"></polygon></svg>
|
||||
<span>Fermer</span>
|
||||
</button>
|
||||
|
||||
<ul class="menu">
|
||||
<li><a href="#">Test</a></li>
|
||||
<li><a href="#">Test</a></li>
|
||||
<li><a href="#">Test</a></li>
|
||||
</ul>
|
||||
</section>
|
||||
</amp-sidebar>
|
||||
<!-- {hook h='displayMenu' amp=1} -->
|
||||
|
||||
</header>
|
25
themes/toutpratique/amp/postcms.tpl
Normal file
25
themes/toutpratique/amp/postcms.tpl
Normal file
@ -0,0 +1,25 @@
|
||||
<main>
|
||||
<section>
|
||||
<h1>{$post->title}</h1>
|
||||
|
||||
<div class="intro">
|
||||
<span class="title">{l s='Introduction'}</span>
|
||||
<div class="content">{$post->intro|escape:'UTF-8'|stripslashes}</div>
|
||||
</div>
|
||||
|
||||
{$post->content|escape:'UTF-8'|stripslashes}
|
||||
</section>
|
||||
|
||||
<aside class="share">
|
||||
<p class="title">{l s='Partager cette astuce'}</p>
|
||||
<a href="https://www.facebook.com/sharer/sharer.php?u={$link->getPostCmsLink($post->id)|escape:'html':'UTF-8'}" target="_blank">
|
||||
<i class="awesome"></i> {l s='Facebook'}
|
||||
</a>
|
||||
<a href="http://twitter.com/intent/tweet/?hashtags=toutpratique&url={$link->getPostCmsLink($post->id)|escape:'html':'UTF-8'}&text={$post->title}" target="_blank">
|
||||
<i class="awesome"></i> {l s='Twitter'}
|
||||
</a>
|
||||
<a href="mailto:?subject=Tout Pratique | {$post->title}&body={$link->getPostCmsLink($post->id)|escape:'html':'UTF-8'}">
|
||||
<i class="awesome"></i> {l s='Par email'}
|
||||
</a>
|
||||
</aside>
|
||||
</main>
|
Loading…
Reference in New Issue
Block a user