356 lines
19 KiB
Smarty
356 lines
19 KiB
Smarty
<div class="salesTop">
|
|
{hook h="displaySalesTop"}
|
|
</div>
|
|
{capture name=path}
|
|
<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>
|
|
{/capture}
|
|
{if $categories|count > 0}
|
|
<ul class="nav nav-tabs clearfix" id="home-page-tabs">
|
|
<li {if !$id_category}class="active"{/if} >
|
|
<a href="{$link_allsale}" >{l s='See all sales' mod='privatesales'}</a>
|
|
</li>
|
|
{foreach $categories as $category}
|
|
<li {if $id_category == $category->id}class="active"{/if}>
|
|
<a href="{$category->link_rewrite}">{$category->title}</a>
|
|
</li>
|
|
{/foreach}
|
|
</ul>
|
|
{/if}
|
|
<div id="privatesales_home">
|
|
{if $cookie->logged && !$alertedcat && $id_category}
|
|
<button name="alertme" id="salecategory_{$id_category}" class="link_category button btn btn-default button-medium">
|
|
<span>
|
|
{l s='I want to be alerted!' mod='privatesales'}
|
|
<i class="icon-flag right"></i>
|
|
</span>
|
|
</button>
|
|
<div class="clearfix"></div>
|
|
{/if}
|
|
|
|
{if $flashsales|count > 0}
|
|
<div class="flash_sales">
|
|
<h3 class="sale-title-type"><span>{l s='Flash sales' mod='privatesales'}</span></h3>
|
|
{foreach $flashsales as $sale}
|
|
{capture name=img_sale}
|
|
{$link_img}{$sale['sale']->id}/flashsale/{$sale['sale']->id}_{$cookie->id_lang}.jpg
|
|
{/capture}
|
|
<div class="sale content_scene_cat" id="sale_{$sale['sale']->id}" onclick="window.location.href='{$sale['sale']->link}';">
|
|
<div class="content_scene_cat_bg" style="{if $sale['sale']->imageflashsale}background:url({$smarty.capture.img_sale}) 0 top no-repeat; background-size:contain;{/if}min-height:217px;">
|
|
<div class="cat_desc">
|
|
<span class="category-name">{$sale['product']->name}</span>
|
|
<div class="rte">
|
|
{$sale['product']->description_short}
|
|
<div class="content_price">
|
|
{assign var='productPrice' value=$sale['product']->getPrice(true, $smarty.const.NULL, $priceDisplayPrecision)}
|
|
{assign var='productPriceWithoutReduction' value=$sale['product']->getPriceWithoutReduct(false, $smarty.const.NULL)}
|
|
<span class="price product-price" itemprop="price">
|
|
{convertPrice price=$productPrice}
|
|
</span>
|
|
<meta itemprop="priceCurrency" content="{$currency->iso_code}" />
|
|
<span class="old-price product-price {if (!$sale['product']->specificPrice || !$sale['product']->specificPrice.reduction) && $group_reduction == 1}hidden{/if}">
|
|
{if $productPriceWithoutReduction > $productPrice}{convertPrice price=$productPriceWithoutReduction}{/if}
|
|
</span>
|
|
</div>
|
|
</div>
|
|
<div class="submit2">
|
|
<a target="_blank" class="sale_social" href="#">
|
|
<i class="icon-google-plus"></i>
|
|
</a>
|
|
<a target="_blank" class="sale_social" href="http://www.facebook.com/sharer.php?u={$link->getProductLink($sale['product'])}&t={$sale['product']->name|rawurlencode}%20{l s='on' mod='privatesales'}%20{$shop_name|rawurlencode}" title="{l s='Share on Facebook' mod='privatesales'}">
|
|
<i class="icon-facebook"></i>
|
|
</a>
|
|
<a target="_blank" class="sale_social" href="https://twitter.com/share?text={l s='Sale %s is open' sprintf=$sale['product']->name mod='privatesales'}&url={$link->getProductLink($sale['product'])}" title="{l s='Share on Twitter' mod='privatesales'}">
|
|
<i class="icon-twitter"></i>
|
|
</a>
|
|
<a class="link_sale btn btn-default button button-medium" href="{$link->getProductLink($sale['product'])}">
|
|
<span class="btn-effect"></span>
|
|
<span class="btn-text">
|
|
{l s='See the product' mod='privatesales'}
|
|
<i class="icon-chevron-right right"></i>
|
|
</span>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
<span {if !$sale['product']->specificPrice || $sale['product']->specificPrice.reduction_type != 'percentage'} style="display:none;"{/if} class="percent-box">
|
|
<span class="percent-text"></span>
|
|
<span class="percent-label">{if $sale['product']->specificPrice && $sale['product']->specificPrice.reduction_type == 'percentage'}-{$sale['product']->specificPrice.reduction*100}%{/if}</span>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
{/foreach}
|
|
</div>
|
|
{/if}
|
|
<div id="current_sales">
|
|
<h3 class="sale-title-type"><span>{l s='Current sales' mod='privatesales'}</span></h3>
|
|
{if $hotspotsales|count > 0}
|
|
<div class="hotspot_sales row" >
|
|
{assign var=sale value=$hotspotsales[0] }
|
|
{capture name=img_sale}{$base_dir}{$link_img}{$sale->id}/hotspot/{$sale->id}_{$cookie->id_lang}.jpg{/capture}
|
|
<div class="sale col-xs-6" id="sale_{$sale->id}" onclick="window.location.href='{$sale->link}';" >
|
|
<div class="contain_sale" {if $sale->imagehotspot} style="background: url('{$smarty.capture.img_sale}') no-repeat left center"{/if}>
|
|
<div class="sale_header">
|
|
<div class="percent-box col-xs-9">
|
|
{l s='Up to' mod='privatesales'} <span class="percent-label">-{$sale->percent}%</span>
|
|
</div>
|
|
<div class="social col-xs-3">
|
|
<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' 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='current'}
|
|
</div>
|
|
</div>
|
|
<div class="sale_bottom" {if $cookie->logged}onclick="window.location.href='{$sale->link}';"{/if}>
|
|
<div class="sale_desc">
|
|
<div class="sale-name">{$sale->title}</div>
|
|
<div class="sale-subtitle">{$sale->subtitle}</div>
|
|
</div>
|
|
<a class="sale_submit" href="{$sale->link}">
|
|
</a>
|
|
</div>
|
|
<div class="clearfix"></div>
|
|
</div>
|
|
</div>
|
|
<div class="title-hotspot col-xs-1">
|
|
<span>{l s='Hotspot sales' mod='privatesales'}</span>
|
|
</div>
|
|
<div class="banner col-xs-5">
|
|
{hook h='displayTopBanner'}
|
|
</div>
|
|
</div>
|
|
{/if}
|
|
<div class="clearfix"></div>
|
|
<div class="current_sales row" >
|
|
{if $currentsales|count > 0}
|
|
{foreach $currentsales as $sale}
|
|
{capture name=img_sale}{$base_dir}{$link_img}{$sale->id}/current/{$sale->id}_{$cookie->id_lang}.jpg{/capture}
|
|
<div class="sale col-xs-6" id="sale_{$sale->id}" onclick="window.location.href='{$sale->link}';">
|
|
<div class="contain_sale" {if $sale->image} style="background: url('{$smarty.capture.img_sale}') no-repeat left center"{/if}>
|
|
<div class="sale_header">
|
|
<div class="percent-box col-xs-9">
|
|
{l s='Up to' mod='privatesales'} <span class="percent-label">-{$sale->percent}%</span>
|
|
</div>
|
|
<div class="social col-xs-3">
|
|
<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' 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='current'}
|
|
</div>
|
|
</div>
|
|
<div class="sale_bottom" {if $cookie->logged}onclick="window.location.href='{$sale->link}';"{/if}>
|
|
<div class="sale_desc">
|
|
<div class="sale-name">{$sale->title}</div>
|
|
<div class="sale-subtitle">{$sale->subtitle}</div>
|
|
</div>
|
|
<a class="sale_submit" href="{$sale->link}">
|
|
</a>
|
|
</div>
|
|
<div class="clearfix"></div>
|
|
</div>
|
|
</div>
|
|
{/foreach}
|
|
|
|
{else}
|
|
<div class="alert alert-warning ">
|
|
<p>{l s='There are no current sales' mod='privatesales'}</p>
|
|
</div>
|
|
{/if}
|
|
</div>
|
|
</div>
|
|
|
|
<div id="auctions">
|
|
<h3 class="auctions-title-type"><span>{l s='Current auctions' mod='privatesales'}</span></h3>
|
|
{hook h='displayAuctions'}
|
|
</div>
|
|
|
|
<div id="future_sales">
|
|
{if $futuresales|count > 0}
|
|
<h3 class="sale-title-type"><span>{l s='Future sales' mod='privatesales'}</span></h3>
|
|
|
|
<div class="future_sales row" >
|
|
{if $futuresales|count > 0}
|
|
{foreach $futuresales as $sale}
|
|
{capture name=img_sale}{$base_dir}{$link_img}{$sale->id}/future/{$sale->id}_{$cookie->id_lang}.jpg{/capture}
|
|
<div class="sale col-xs-4" id="sale_{$sale->id}" onclick="window.location.href='{$sale->link}';" >
|
|
<div class="contain_sale" {if $sale->imagefuture} style="background: url('{$smarty.capture.img_sale}') no-repeat left center"{/if}>
|
|
<div class="sale_header">
|
|
<div class="sale_desc col-xs-12">
|
|
<div class="sale-name">{$sale->title}</div>
|
|
</div>
|
|
</div>
|
|
<div class="sale_bottom col-xs-12">
|
|
<div class="percent-box ">
|
|
{l s='Up to' mod='privatesales'} <span class="percent-label">-{$sale->percent}%</span>
|
|
</div>
|
|
<a class="sale_submit" href="{$sale->link}">
|
|
{l s='Alert me!' mod='privatesales'}
|
|
</a>
|
|
</div>
|
|
<div class="clearfix"></div>
|
|
</div>
|
|
</div>
|
|
{/foreach}
|
|
</div>
|
|
{/if}
|
|
{/if}
|
|
<div class="salesBottomBanner row">
|
|
{hook h="displaySalesBottomBanner"}
|
|
</div>
|
|
<div class="clearfix"></div>
|
|
<div class="hideshadow"></div>
|
|
</div>
|
|
|
|
{if $pastsales|count > 0}
|
|
<div class="past_sales">
|
|
<h3 class="sale-title-type"><span>{l s='Past sales' mod='privatesales'}</span></h3>
|
|
{if $pastsales|count > 0}
|
|
{foreach $pastsales as $sale}
|
|
{capture name=img_sale}
|
|
{$link_img}{$sale->id}/past/{$sale->id}_{$cookie->id_lang}.jpg
|
|
{/capture}
|
|
<div class="sale" id="sale_{$sale->id}" onclick="window.location.href='{$sale->link}';">
|
|
<div class="sale_img col-xs-12 col-sm-6 col-md-6 col-lg-6 ">
|
|
{if $sale->imagepast}
|
|
<img src="{$smarty.capture.img_sale}" class="img-responsive" />
|
|
{/if}
|
|
</div>
|
|
<div class="sale_desc col-xs-12 col-sm-6 col-md-6 col-lg-6">
|
|
<span class="sale-name">{$sale->title}</span>
|
|
<div>
|
|
{if $sale->subtitle}
|
|
<p class="sale-subtitle">{$sale->subtitle}</p>
|
|
{/if}
|
|
<p>{$sale->description}</p>
|
|
</div>
|
|
</div>
|
|
<div class="clearfix"></div>
|
|
</div>
|
|
{/foreach}
|
|
|
|
{/if}
|
|
|
|
|
|
</div>
|
|
{/if}
|
|
</div>
|
|
|
|
{if $popup_connection && !$cookie->logged}
|
|
<div class="popup_connection" style="display: none;">
|
|
<span class="cross" title="Close window"></span>
|
|
<h1 class="page-heading popup-auth">
|
|
<span>
|
|
<img src="{$img_dir}logo-popup.png" />
|
|
</span>
|
|
</h1>
|
|
<div class="col-xs-12 rowpopup clearfix">
|
|
<div class="create_account col-xs-6">
|
|
<form action="{$link->getPageLink('authentication', true)|escape:'html':'UTF-8'}" method="post" id="create-account_form" class="box">
|
|
<h3>{l s='Create an account' mod='privatesales'}</h3>
|
|
<div class="form_content clearfix">
|
|
<p>{l s='Profitez des Ventes Privées et des Ventes aux Enchères bestmarques' mod='privatesales'}</p>
|
|
<p>{l s='Des réductions de -30% à -70%' mod='privatesales'}</p>
|
|
<p>{l s='Les plus grandes marques de luxe' mod='privatesales'}</p>
|
|
<p>{l s='Inscription gratuite !' mod='privatesales'}</p>
|
|
<div class="submit">
|
|
<input type="hidden" class="hidden" name="back" value="{$link->getModuleLink('privatesales', 'home')|escape:'html':'UTF-8'}" />
|
|
<a href="{$link->getPageLink('authentication', true, null, 'create_account=1')|escape:'html':'UTF-8'}"class="btn btn-default button button-medium " id="SubmitCreate" name="SubmitCreate">
|
|
<span>
|
|
{l s='Sign up' mod='privatesales'}
|
|
<i class="icon-user right"></i>
|
|
</span>
|
|
</a>
|
|
<input type="hidden" class="hidden" name="SubmitCreate" value="{l s='Create an account'}" />
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
<div class="log_account col-xs-6">
|
|
<form action="{$link->getPageLink('authentication', true)|escape:'html':'UTF-8'}" method="post" id="login_form" class="box">
|
|
<h3>{l s='Already registered?' mod='privatesales'}</h3>
|
|
<div class="form_content clearfix">
|
|
<div class="form-group">
|
|
<label for="email">{l s='Email address' mod='privatesales'}</label>
|
|
<input class="is_required validate account_input form-control" data-validate="isEmail" type="text" id="email" name="email" value="{if isset($smarty.post.email)}{$smarty.post.email|stripslashes}{/if}" />
|
|
</div>
|
|
<div class="form-group">
|
|
<label for="passwd">{l s='Password' mod='privatesales'}</label>
|
|
<span><input class="is_required validate account_input form-control" type="password" data-validate="isPasswd" id="passwd" name="passwd" value="{if isset($smarty.post.passwd)}{$smarty.post.passwd|stripslashes}{/if}" /></span>
|
|
</div>
|
|
|
|
<p class="submit ">
|
|
<input type="hidden" class="hidden" name="back" value="{$link->getModuleLink('privatesales', 'home')|escape:'html':'UTF-8'}" />
|
|
<button type="submit" id="SubmitLogin" name="SubmitLogin" class="button btn btn-default button-medium">
|
|
<span>
|
|
{l s='Sign in' mod='privatesales'}
|
|
<i class="icon-lock right"></i>
|
|
</span>
|
|
</button>
|
|
</p>
|
|
<p class="lost_password form-group "><a href="{$link->getPageLink('password')|escape:'html':'UTF-8'}" title="{l s='Recover your forgotten password' mod='privatesales'}" rel="nofollow">{l s='Forgot your password?' mod='privatesales'}</a></p>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{literal}
|
|
<script type="text/javascript">
|
|
<!--
|
|
$(document).ready(function() {
|
|
$(".sale , .contain_product").click(function(e) {
|
|
e.stopPropagation();
|
|
$('#layer_cart .layer_cart_product').html( $('.popup_connection').html());
|
|
$('.layer_cart_overlay').fadeIn(100);
|
|
$('#layer_cart').fadeIn(250);
|
|
});
|
|
$('li.modalbox').unbind('click').click(function(){
|
|
$('.layer_cart_overlay').fadeIn(100);
|
|
$('#layer_cart').fadeIn(250);
|
|
});
|
|
$('.layer_cart_overlay').click(function(){
|
|
$(this).fadeOut(100);
|
|
$('#layer_cart').fadeOut(100);
|
|
});
|
|
});
|
|
-->
|
|
</script>
|
|
{/literal}
|
|
|
|
{/if}
|
|
{if $cookie->logged && !$alertedcat && $id_category}
|
|
{assign var=params value=['id_sale_category' => $id_category, 'alias' => $alias]}
|
|
<script>
|
|
var url = "{$link->getModuleLink('privatesales', 'homecat', $params )}";
|
|
var id_category = {$id_category};
|
|
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 : "submitNewsletterCat",
|
|
ajax: 1,
|
|
id_category: id_category,
|
|
},
|
|
success: function(response){
|
|
if ( !response.hasError ){
|
|
$("[name='alertme']").hide();
|
|
$("#privatesales_home").prepend('<div class="alert alert-success"><button data-dismiss="alert" class="close" type="button"></button>'+message+'</div>');
|
|
}
|
|
}
|
|
});
|
|
});
|
|
});
|
|
</script>
|
|
{/literal}
|
|
{/if} |