182 lines
6.5 KiB
Smarty
Executable File
182 lines
6.5 KiB
Smarty
Executable File
{*if $cookie->isLogged() OR $showtoguests*}
|
|
<!-- Add fancybox -->
|
|
<script src="{$base_dir}js/jquery/jquery.fancybox-1.3.4.js" type="text/javascript"></script>
|
|
<script type="text/javascript">
|
|
{if !$cookie->isLogged() AND !$showtoguests}
|
|
{literal}
|
|
$('document').ready(function(){
|
|
$('#block_sales_home a.img_link, a.enter').unbind('click').removeAttr('href').click(function(){
|
|
$('.modalbox_shadow').fadeIn(100);
|
|
$('.modalbox_login').fadeIn(250);
|
|
});
|
|
|
|
$('.modalbox_shadow').click(function(){
|
|
$(this).fadeOut(100);
|
|
$('.modalbox_login').fadeOut(100);
|
|
});
|
|
$('.modalbox_login .close_button').click(function(){
|
|
$('.modalbox_shadow').fadeOut(100);
|
|
$('.modalbox_login').fadeOut(100);
|
|
});
|
|
$('.slider_sales .link a').unbind('click').removeAttr('href').click(function(){
|
|
$('.modalbox_shadow').fadeIn(100);
|
|
$('.modalbox_login').fadeIn(250);
|
|
});
|
|
$('.slider_sales .info_sellers a.product_link_sellers').unbind('click').removeAttr('href').click(function(){
|
|
$('.modalbox_shadow').fadeIn(100);
|
|
$('.modalbox_login').fadeIn(250);
|
|
});
|
|
|
|
});
|
|
{/literal}
|
|
{/if}
|
|
</script>
|
|
|
|
<div id="privatesales_block">
|
|
{* Log in pop up *}
|
|
{if !$cookie->isLogged() AND !$showtoguests}
|
|
<div class="modalbox_shadow" style="display: none;"></div>
|
|
<div class="modalbox_login" style="display: none;">
|
|
<a class="close_button" title="{l s='fermer' mod='privatesales'}"></a>
|
|
<p>{l s='You need to login' mod='privatesales'}</p>
|
|
|
|
{*
|
|
<form action="{$link->getPageLink('authentication.php', true)}" method="post" id="login_form" class="std">
|
|
<fieldset>
|
|
<p class="text">
|
|
<label for="email">{l s='E-mail address' mod='privatesales'}</label>
|
|
<span><input type="email" id="email" name="email" value="{if isset($smarty.post.email)}{$smarty.post.email|escape:'htmlall':'UTF-8'|stripslashes}{/if}" class="account_input" /></span>
|
|
</p>
|
|
<p class="text">
|
|
<label for="passwd">{l s='Password' mod='privatesales'}</label>
|
|
<span><input type="password" id="passwd" name="passwd" value="{if isset($smarty.post.passwd)}{$smarty.post.passwd|escape:'htmlall':'UTF-8'|stripslashes}{/if}" class="account_input" /></span>
|
|
</p>
|
|
<p class="submit">
|
|
{if isset($back)}<input type="hidden" class="hidden" name="back" value="{$back|escape:'htmlall':'UTF-8'}" />
|
|
{else}<input type="hidden" class="hidden" name="back" value="{$smarty.const.__PS_BASE_URI__}validation.php" />{/if}
|
|
<span class="gradient">
|
|
<input type="submit" id="SubmitLogin" name="SubmitLogin" class="button" value="{l s='Log in' mod='privatesales'}" />
|
|
</span>
|
|
<a class="lost-password" href="{$link->getPageLink('password.php')}">{l s='Forgot your password ?' mod='privatesales'}</a>
|
|
</p>
|
|
</fieldset>
|
|
</form>
|
|
*}
|
|
<a href="{$link->getPagelink('authentification')}" class="btn_box login_box">{l s='Login' mod='privatesales'}</a>
|
|
<a href="/authentification?create_account=1" class="btn_box create_account_box">{l s='Create account' mod='privatesales'}</a>
|
|
</div>
|
|
{/if}
|
|
</div>
|
|
|
|
|
|
<div id="privatesales_block">
|
|
<div id="block_sales_home">
|
|
<div class="content clearfix">
|
|
{if $is_banner_enable}
|
|
<img class="ant_promo_banner_img" src="{$banner_url}img_bmobile_{$cookie->id_lang}.jpg"/>
|
|
{/if}
|
|
|
|
{if count($sales) > 0}
|
|
{assign var=extrafields value=$HOOK_PRIVATESALES_LISTING|unserialize}
|
|
<ul>
|
|
{foreach $sales as $sale name=sales}
|
|
{if count(array_intersect($customer_groups, $sale->groups))>0}
|
|
<li onclick="{if $cookie->isLogged() OR $showtoguests}window.location.href='{$link->getCategoryLink($sale->id_category, $sale->alias[$cookie->id_lang])|escape:'htmlall':'UTF-8'}';{/if}">
|
|
|
|
{include file="./themes/site_mobile/delay.tpl" delivery_delay=$sale->delivery_delay}
|
|
<a href="{$link->getCategoryLink($sale->id_category, $sale->alias[$cookie->id_lang])|escape:'htmlall':'UTF-8'}" class="img_link"><img class="background" alt="{$sale->title[$cookie->id_lang]}" src="{$path}img/{$sale->id}/liston_{$cookie->id_lang}.jpg" /></a>
|
|
<div class="links">
|
|
<div class="short_desc">
|
|
<span class="extra_info">
|
|
{if isset($extrafields[$sale->id])}
|
|
{$extrafields[$sale->id]}
|
|
{/if}
|
|
</span>
|
|
</div>
|
|
<div class="actions">
|
|
<a class="enter" href="{$link->getCategoryLink($sale->id_category, $sale->alias[$cookie->id_lang])|escape:'htmlall':'UTF-8'}"></a>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
{/if}
|
|
{/foreach}
|
|
</ul>
|
|
{else}
|
|
<div class="nosale">
|
|
{l s='No active sale at the moment' mod='privatesales'}
|
|
</div>
|
|
{/if}
|
|
</div>
|
|
</div>
|
|
<div id="block_sales_home_future">
|
|
<div class="content clearfix">
|
|
{if count($futuresales) > 0}
|
|
<a id="toggle_futuresales">{l s='Future sales' mod='privatesales'}</a>
|
|
<ul id="futuresales_list">
|
|
{foreach $futuresales as $sale name=futuresales}
|
|
{if count(array_intersect($customer_groups, $sale->groups))>0}
|
|
<li onclick="{if $cookie->isLogged() && in_array('2', $customer_groups)}window.location.href='{$link->getCategoryLink($sale->id_category, $sale->alias[$cookie->id_lang])|escape:'htmlall':'UTF-8'}';{/if}">
|
|
<img class="background" alt="{$sale->title[$cookie->id_lang]}" src="{$path}img/{$sale->id}/listoff_{$cookie->id_lang}.jpg" />
|
|
<div class="links">
|
|
<div class="short_desc">
|
|
<span class="extra_info">
|
|
<div class="date">
|
|
{l s='From ' mod='privatesales'} {$sale->date_start|date_format:'%e/%m'}
|
|
</div>
|
|
{if isset($extrafields[$sale->id])}
|
|
{$extrafields[$sale->id]}
|
|
{/if}
|
|
</span>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
{/if}
|
|
{/foreach}
|
|
</ul>
|
|
{else}
|
|
<div class="nosale">
|
|
{l s='No future sale at the moment' mod='privatesales'}
|
|
</div>
|
|
{/if}
|
|
</div>
|
|
</div>
|
|
|
|
{*
|
|
{$HOOK_PRIVATESALES_LISTING}
|
|
*}
|
|
|
|
<script type="text/javascript">{literal}
|
|
<!--
|
|
$(document).ready(function() {
|
|
$("#privatesales_block .actions a.pop").click(function(e) {
|
|
e.stopPropagation();
|
|
window.open(e.target.href);
|
|
return false;
|
|
});
|
|
|
|
$("#block_sales_home_future .actions a.button_small").hover(
|
|
function() {
|
|
$(this).parent().children(".date").css("background", "#ffffff");
|
|
},
|
|
function() {
|
|
$(this).parent().children(".date").css("background", "transparent");
|
|
}
|
|
);
|
|
|
|
$('#futuresales_list').hide();
|
|
$('a#toggle_futuresales').click(function(){
|
|
$('#futuresales_list').slideToggle(800, function(){
|
|
$('#futuresales_list').children('li').each(function(){
|
|
$(this).children('img.background').css('width','100%');
|
|
});
|
|
});
|
|
});
|
|
});
|
|
-->
|
|
{/literal}</script>
|
|
|
|
</div>
|
|
|
|
|
|
{*/if*}
|