privilegedemarque/themes/site/manufacturer.tpl
Christophe Latour 378aefae75 #10887
Affilnet tagging
2016-09-30 10:48:15 +02:00

308 lines
14 KiB
Smarty
Executable File
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{*
* 2007-2014 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2014 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*}
{include file="./affilnet.tpl" event="PageView" page_type="manufacturer" page_category="manufacturer"}
{capture name=path}{l s='Addresses'}{/capture}
{capture name=path}<a href="{$link->getPageLink('manufacturer', true)|escape:'html':'UTF-8'}" title="{l s='Marques privilège'}" rel="nofollow">{l s='Marques privilège'}</a><span class="navigation-pipe">{$navigationPipe}</span><span class="navigation_page">{$manufacturer->name}</span>{/capture}
{include file="$tpl_dir./errors.tpl"}
{if !isset($errors) OR !sizeof($errors)}
<div class="row">
<!-- <div class="snotmobile col-xs-12 top-social">
<div class="clearfix">
<div class="socialdiv twt">
<a href="https://twitter.com/share" class="twitter-share-button" data-via="Pdemarque" data-lang="fr" data-count="none">Tweeter</a>
{literal}
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
{/literal}
</div>
<div class="socialdiv pint">
<a href="//fr.pinterest.com/pin/create/button/" data-pin-do="buttonBookmark" ><img src="//assets.pinterest.com/images/pidgets/pinit_fg_en_rect_gray_20.png" /></a>
Please call pinit.js only once per page
<script type="text/javascript" async src="//assets.pinterest.com/js/pinit.js"></script>
</div>
<div class="socialdiv faceb">
<div class="fb-like" data-href="{$link->getmanufacturerLink($manufacturer->id, $manufacturer->link_rewrite)|escape:'html':'UTF-8'}" data-layout="button_count" data-action="like" data-show-faces="false" data-share="false"></div>
</div>
</div>
</div> -->
<div class="col-xs-12 top-manufacturer">
<div class="top-contaienr-manufacturer clearfix">
<div class="col-xs-12 col-sm-6 description-manufacturer">
<img src="{$img_manu_dir}{$manufacturer->id}.jpg" alt="" />
<h2>{$manufacturer->subtitle}<br/>
<span class="shape-red-long"></span>
</h2>
{$manufacturer->short_description}
<span id="name_manu" style="display : none">{$manufacturer->name}</span>
</div>
<div class=" snotmobile col-xs-12 col-sm-6 img-right-manufacturer">
{$manufacturer->description}
</div>
</div>
</div>
<div class="col-xs-12 col-sm-9 left-manufacturer">
{if $manufacturer->video}
<div class="block-manufacturer manufacturer-video">
<h3 id="video" class="page-manufacturer-heading">
{l s='Vidéo'}
<span class="imgtab"></span><br/>
<span class="shape-red-long"></span>
</h3>
<div class="rte">
{$manufacturer->video}
</div>
</div>
{/if}
{if $manufacturer->desc_marque_priv}
<div class="block-manufacturer manufacturer-desc_marque_priv">
<h3 id="desc_marque_priv" class="page-manufacturer-heading">
{l s='Une marque privilège'}
<span class="imgtab"></span><br/>
<span class="shape-red-long"></span>
</h3>
<div class="rte">
{$manufacturer->desc_marque_priv}
</div>
</div>
{/if}
{if $manufacturer->desc_savoir}
<div class="block-manufacturer manufacturer-desc_savoir">
<h3 id="desc_savoir" class="page-manufacturer-heading">
{l s='Savoir faire & qualité'}
<span class="imgtab"></span><br/>
<span class="shape-red-long"></span>
</h3>
<div class="rte">
{$manufacturer->desc_savoir}
</div>
<script src="//code.jquery.com/ui/1.11.1/jquery-ui.js"></script>
{literal}
<script>
var html1 = "<span>{/literal}{l s='En savoir +'}{literal}</span>"
var html2 = "<span>{/literal}{l s='Replier'}{literal}</span>"
$(document).ready(function(){
$(".manufacturer-desc_savoir ul li").click(function(){
if($(this).hasClass("open")){
$( this ).switchClass( "open", "", 500, "easeOutQuint" );
$(this).find("h3 span").remove();
$(this).find("h3").append(html1);
}else{
$( this ).switchClass( "", "open", 500, "easeOutQuint" );
$(this).find("h3 span").remove();
$(this).find("h3").append(html2);
}
});
$(".manufacturer-desc_savoir ul li:first-child").addClass("open");
$(".manufacturer-desc_savoir ul h3").append(html1);
$(".manufacturer-desc_savoir ul li.open h3 span").remove();
$(".manufacturer-desc_savoir ul li.open h3").append(html2);
});
</script>
{/literal}
</div>
{/if}
{if $manufacturer->desc_priv_prod}
<div class="block-manufacturer manufacturer-desc_priv_prod">
<h3 id="desc_priv_prod" class="page-manufacturer-heading">
{l s='Privilège produit'}
<span class="imgtab"></span><br/>
<span class="shape-red-long"></span>
</h3>
<div class="rte">
{$manufacturer->desc_priv_prod}
</div>
{literal}
<script>
var html1 = "<span>{/literal}{l s='En savoir +'}{literal}</span>"
var html2 = "<span>{/literal}{l s='Replier'}{literal}</span>"
$(document).ready(function(){
$(".manufacturer-desc_priv_prod ul li").click(function(){
if($(this).hasClass("open")){
$( this ).switchClass( "open", "", 500, "easeOutQuint" );
$(this).find("h3 span").remove();
$(this).find("h3").append(html1);
}else{
$( this ).switchClass( "", "open", 500, "easeOutQuint" );
$(this).find("h3 span").remove();
$(this).find("h3").append(html2);
}
});
$(".manufacturer-desc_priv_prod ul li:first-child").addClass("open");
$(".manufacturer-desc_priv_prod ul h3").append(html1);
$(".manufacturer-desc_priv_prod ul li.open h3 span").remove();
$(".manufacturer-desc_priv_prod ul li.open h3").append(html2);
});
</script>
{/literal}
</div>
{/if}
{if $products}
<div class="product-manufacturer snotmobile">
<h3 id="product"><span>{l s='les ventes récentes de la marque jusquà -70%'}</span></h3>
{include file="./product-list.tpl" products=$products}
</div>
{/if}
</div>
<div class="col-xs-12 col-sm-3 right-manufacturer snotmobile">
<div class="block_category_manufacturer">
<div class="title-right-manufacturer"><span>{$manufacturer->name}</span></div>
<ul>
{if $manufacturer->video}
<li>
<a href="#video">
{l s='Vidéo'}
<span class="diamond_border"></span>
</a>
</li>
{/if}
{if $manufacturer->desc_marque_priv}
<li>
<a href="#desc_marque_priv">
{l s='Une marque privilège'}
<span class="diamond_border"></span>
</a>
</li>
{/if}
{if $manufacturer->desc_savoir}
<li>
<a href="#desc_savoir">
{l s='Savoir faire & qualité'}
<span class="diamond_border"></span>
</a>
</li>
{/if}
{if $manufacturer->desc_priv_prod}
<li>
<a href="#desc_priv_prod">
{l s='Privilège produit'}
<span class="diamond_border"></span>
</a>
</li>
{/if}
{if $products}
<li>
<a href="#product">
{l s='Ses ventes récentes'}
</a>
</li>
{/if}
</ul>
{if !$logged}
<div class="signin">
<p>
{l s='Inscrivez-vous et découvrez les prochaines ventes de cette marque'}
</p>
<div class="shape_white"></div>
<a class="button-grey button-white" href="{$link->getPageLink('authentication', true)|escape:'html':'UTF-8'}">
<span>{l s='Inscription au site'} </span>
</a>
</div>
{/if}
</div>
</div>
</div>
{literal}
<script type="text/javascript">
/**
* @Override
*/
var scrolling = $(".right-manufacturer .block_category_manufacturer");
var pos = scrolling.position();
var size = scrolling.height();
var right_size = 0;
var offset_top = 700;
var cur_scroll = 0;
var max_size = $('.left-manufacturer').height();
var offset = 0;
$(window).scroll(function(event) {
offset = parseFloat(scrolling.css("marginTop").replace("px", ""));
cur_scroll = $(window).scrollTop();
if(cur_scroll >= ( pos.top + offset_top) ) {
max_size = $('.left-manufacturer').height();
if ( max_size < size+offset ){
scrolling.stop().animate({
"marginTop": Math.max(max_size - size, 0)+"px"
}, 400);
return;
}
mt = Math.min(cur_scroll - pos.top - offset_top, max_size - size - right_size);
scrolling.stop().animate({
"marginTop": mt + "px"
}, 400);
} else {
if(offset > 0) {
scrolling.stop().animate({
"marginTop": "0"
}, 400);
}
}
if(offset < 0) {
scrolling.stop().animate({
"marginTop": "0"
}, 400);
}
});
$('.block_category_manufacturer a[href^="#"]').click(function(){
var id = $(this).attr("href");
var offset = $(id).offset().top
$('html, body').animate({scrollTop: offset}, 'slow');
return false;
});
$(document).ready(function(){
$('.linkshowmore').click(function(){
var parent = $(this).parent().parent();
parent.find('div.mini_texte').hide();
parent.find('div.grd_texte').show();
$(this).hide();
});
$(".extraTabContent ul li").hover(function() {
var id = $(this).attr('class');
if(id){
$(".extraTabContent img").parent().hide();
$('#'+id).show();
}
});
$(".extraTabContent img").parent().hide();
$('.extraTabContent tr:first-child td:first-child').show();
$('.extraTabContent .first').show();
});
</script>
{/literal}
{/if}