97 lines
4.4 KiB
Smarty
97 lines
4.4 KiB
Smarty
{capture name=path}
|
||
{if $sale}
|
||
<a href="{$link->getModuleLink('privatesales', 'home')|escape:'html':'UTF-8'}" rel="nofollow" title="{l s='Private sales' mod='privatesales'}">{l s='Private sales' mod='privatesales'}</a>
|
||
<span class="navigation-pipe">></span>
|
||
{l s='Teaser' mod='privatesales'} {$sale->title}
|
||
{/if}
|
||
{/capture}
|
||
<div class="salesTop">
|
||
{hook h="displaySalesTop"}
|
||
</div>
|
||
<h1 class="page-heading trailer-title">
|
||
<span>{l s='Future sales' mod='privatesales'}</span>
|
||
</h1>
|
||
<div id="trailer_sales">
|
||
{if $sale}
|
||
|
||
{capture name=img_sale}{$base_dir}{$link_img}{$sale->id}/trailer/{$sale->id}_{$cookie->id_lang}.jpg{/capture}
|
||
<div class="sale" id="sale_{$sale->id}" >
|
||
<div class="contain_sale" {if $sale->imagetrailer} style="background: url('{$smarty.capture.img_sale}') no-repeat left center"{/if}>
|
||
<div class="sale_header">
|
||
<div class="date-box col-xs-7">
|
||
{l s='Start' mod='privatesales'} {$sale->date_start|date_format:"%d/%m/%Y"}
|
||
</div>
|
||
<div class="percent-box col-xs-5">{l s='Up to' mod='privatesales'} -{$sale->percent}%
|
||
</div>
|
||
</div>
|
||
<div class="sale_bottom">
|
||
<div class="sale_desc">
|
||
<div class="sale-name">{$sale->title}</div>
|
||
</div>
|
||
</div>
|
||
<div class="clearfix"></div>
|
||
</div>
|
||
<div class="contain_sale_desc">
|
||
<h2>{l s='Sale' mod='privatesales'} {$sale->title}</h2>
|
||
<h3>{$sale->subtitle}</h3>
|
||
<p>{$sale->description}</p>
|
||
<p class="percent">{l s='Up to' mod='privatesales'} <span class="percent-label">-{$sale->percent}%</p>
|
||
{if $cookie->logged && !$alerted}
|
||
<button name="alertme" id="sale_{$sale->id}" class="link_sale button btn btn-default button-medium left">
|
||
<span>
|
||
{l s='Alert me!' mod='privatesales'}
|
||
<i class="icon-flag right"></i>
|
||
</span>
|
||
</button>
|
||
{/if}
|
||
<a class="btn btn-default button button-small right" href="{$base_dir}">{l s='Home' mod='privatesales'}</a>
|
||
<div class="sale-social">
|
||
<a target="_blank" class="sale_social fb" href="http://www.facebook.com/sharer.php?u={$sale->link}&t={$sale->title|rawurlencode}%20{l s='on' mod='privatesales'}%20{$shop_name|rawurlencode}" title="{l s='Share on Facebook' mod='privatesales'}">
|
||
<span class="facebook"></span>
|
||
</a>
|
||
<a target="_blank" class="sale_social twt" href="https://twitter.com/share?text={l s='Sale %s is open soon' sprintf=$sale->title mod='privatesales'}&url={$sale->link}" title="{l s='Share on Twitter' mod='privatesales'}">
|
||
<span class="twitter"></span>
|
||
</a>
|
||
{hook h='displaySaleLink' id_sale={$sale->id} type='trailer'}
|
||
</div>
|
||
</div>
|
||
<div class="clearfix"></div>
|
||
</div>
|
||
|
||
|
||
{if $cookie->logged}
|
||
{assign var=params value=['id_sale' => $sale->id]}
|
||
<script>
|
||
var url = "{$link->getModuleLink('privatesales', 'trailer', $params )}";
|
||
var id_privatesales = {$sale->id};
|
||
var message = "{l s='You request has been save' mod='privatesales' js=1}";
|
||
</script>
|
||
{literal}
|
||
<script>
|
||
|
||
$(document).ready(function(){
|
||
$("[name='alertme']").click(function(event){
|
||
|
||
$.ajax({
|
||
type: "POST",
|
||
url: url,
|
||
dataType: 'json',
|
||
data : {
|
||
action : "submitNewsletter",
|
||
ajax: 1,
|
||
id_privatesales: id_privatesales,
|
||
},
|
||
success: function(response){
|
||
if ( !response.hasError ){
|
||
$("[name='alertme']").hide();
|
||
$("#trailer_sales").prepend('<div class="alert alert-success"><button data-dismiss="alert" class="close" type="button"><3E></button>'+message+'</div>');
|
||
}
|
||
}
|
||
});
|
||
});
|
||
});
|
||
</script>
|
||
{/literal}
|
||
{/if}
|
||
{/if}
|
||
</div> |