Srv Bebeboutik bcdb91f1e3 prepare ssl
2016-03-31 12:06:08 +02:00

114 lines
5.5 KiB
Smarty
Executable File

{if $cookie->isLogged() OR $showtoguests}
<div id="privatesales_block">
<div id="block_sales_home">
<h2>{l s='Current sales' mod='privatesales'}</h2>
<div class="content">
{if count($sales) > 0}
<ul>
{foreach $sales as $sale name=sales}
{if count(array_intersect($customer_groups, $sale->groups))>0}
<li onclick="window.location.href='{$link->getCategoryLink($sale->id_category, $sale->alias[$cookie->id_lang])|escape:'htmlall':'UTF-8'}';">
<a href="{$link->getCategoryLink($sale->id_category, $sale->alias[$cookie->id_lang])|escape:'htmlall':'UTF-8'}"><img class="background" alt="{$sale->title[$cookie->id_lang]}" src="{$path}img/{$sale->id}/liston_{$cookie->id_lang}.jpg" /></a>
<div class="short_desc">
<h3>{$sale->title[$cookie->id_lang]}</h3>
{$sale->description[$cookie->id_lang]}
</div>
<div class="date">
{l s='From' mod='privatesales'} {$sale->date_start|date_format:'%A %e %B %H:%M'} {l s='To' mod='privatesales'} {$sale->date_end|date_format:'%A %e %B %H:%M'}
</div>
<div class="actions">
{*<a class="button_small" href="{$base_dir_ssl}{if $rewriting}{$base_url}/{$sale->id}-{$sale->title[$lang]|str2url}{else}modules/privatesales/trailer.php?id_sale={$sale->id}{/if}">{l s='Trailer' mod='privatesales'}</a>*}
<a href="https://www.facebook.com/sharer.php?u={$base_dir_ssl}{if $rewriting}{$base_url}/{$sale->id}-{$sale->title[$cookie->id_lang]|str2url}{else}modules/privatesales/trailer.php%3Fid_sale={$sale->id}{/if}&t={$sale->title[$cookie->id_lang]|rawurlencode}%20{l s='on' mod='privatesales'}%20{$shop_name|rawurlencode}" class="pop fbshare">{l s='Share on Facebook' mod='privatesales'}</a>
<a href="https://twitter.com/share?url={$base_dir_ssl}{if $rewriting}{$base_url}/{$sale->id}-{$sale->title[$cookie->id_lang]|str2url}{else}modules/privatesales/trailer.php%3Fid_sale={$sale->id}{/if}" class="pop twshare">{l s='Tweet this page' mod='privatesales'}</a>
<a href="{$base_dir_ssl}modules/advsendtoafriend/sendtoafriend-form.php?id_sale={$sale->id}" class="mailshare">{l s='Send to a friend' mod='privatesales'}</a>
<a class="enter" href="{$link->getCategoryLink($sale->id_category, $sale->alias[$cookie->id_lang])|escape:'htmlall':'UTF-8'}">{l s='View the sale' mod='privatesales'}</a>
</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">
<h2>{l s='Future sales' mod='privatesales'}</h2>
<div class="content">
{if count($futuresales) > 0}
<ul>
{foreach $futuresales as $sale name=futuresales}
{if count(array_intersect($customer_groups, $sale->groups))>0}
<li>
<img class="background" alt="{$sale->title[$cookie->id_lang]}" src="{$path}img/{$sale->id}/listoff_{$cookie->id_lang}.jpg" />
<div class="short_desc">
<h3>{$sale->title[$cookie->id_lang]}</h3>
{$sale->description[$cookie->id_lang]}
</div>
<div class="date">
{l s='From' mod='privatesales'} {$sale->date_start|date_format:'%A %e %B %H:%M'} {l s='To' mod='privatesales'} {$sale->date_end|date_format:'%A %e %B %H:%M'}
</div>
<div class="actions">
<a href="https://www.facebook.com/sharer.php?u={$base_dir_ssl}{if $rewriting}{$base_url}/{$sale->id}-{$sale->title[$cookie->id_lang]|str2url}{else}modules/privatesales/trailer.php%3Fid_sale={$sale->id}{/if}&t={$sale->title[$cookie->id_lang]|rawurlencode}%20{l s='on' mod='privatesales'}%20{$shop_name|rawurlencode}" class="pop fbshare">{l s='Share on Facebook' mod='privatesales'}</a>
<a href="https://twitter.com/share?url={$base_dir_ssl}{if $rewriting}{$base_url}/{$sale->id}-{$sale->title[$cookie->id_lang]|str2url}{else}modules/privatesales/trailer.php%3Fid_sale={$sale->id}{/if}" class="pop twshare">{l s='Tweet this page' mod='privatesales'}</a>
<a href="{$base_dir_ssl}modules/advsendtoafriend/sendtoafriend-form.php?id_sale={$sale->id}" class="mailshare">{l s='Send to a friend' mod='privatesales'}</a>
<a class="button_small" href="{$base_dir_ssl}{if $rewriting}{$base_url}/{$sale->id}-{$sale->title[$cookie->id_lang]|str2url}{else}modules/privatesales/trailer.php?id_sale={$sale->id}{/if}">{l s='Trailer' mod='privatesales'}</a>
{*<a class="disabled">{l s='Available soon' mod='privatesales'}</a>*}
</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;
});
});
-->
{/literal}</script>
{if !$cookie->isLogged()}
<script type="text/javascript">{literal}
<!--
$("#privatesales_block li, #privatesales_block li a").click(function() {
var i18n = {
"fr": ["/authentification", "Fermer", "Créer un compte ou se connecter", "Vous devez vous connecter pour accéder aux ventes."]
};
var btns = new Object();
btns[i18n[isoLang][1]] = false;
btns[i18n[isoLang][2]] = true;
$.prompt(i18n[isoLang][3], {
top: "40%",
buttons: btns,
callback: function(v, m, f) {
if(v == true) {
document.location.href = baseDir + i18n[isoLang][0];
} else {
return v;
}
}
});
return false;
});
-->
{/literal}</script>
{/if}
</div>
{/if}