15 lines
1003 B
Smarty
Executable File
15 lines
1003 B
Smarty
Executable File
{if $sale}
|
|
<div id="sale_end">
|
|
{l s='This sale ends in' mod='privatesales_countdown'} <span id="countdown"></span>
|
|
</div>
|
|
<script type="text/javascript" src="{$base_dir_ssl}modules/privatesales_countdown/js/jquery.countdown.min.js"></script>
|
|
<script type="text/javascript" src="{$base_dir_ssl}modules/privatesales_countdown/js/jquery.countdown-{$lang_iso}.js"></script>
|
|
<script type="text/javascript">{literal}
|
|
var endstring = "{/literal}{$sale->date_end}{literal}";
|
|
var enddate = endstring.split(' ')[0].split('-');
|
|
var endtime = endstring.split(' ')[1].split(':');
|
|
var endofsale = new Date(enddate[0], enddate[1]-1, enddate[2], endtime[0], endtime[1], endtime[2]);
|
|
$('#countdown').countdown({serverSync:function(){var d = new Date({/literal}{$smarty.now|date_format:'%Y, '}{$smarty.now|date_format:'%-m'} - 1{$smarty.now|date_format:', %-d, %-H, %-M, %-S'}{literal}); return d;}, until: endofsale, layout: '{/literal}{$countdown_format|html_entity_decode}{literal}'});
|
|
{/literal}</script>
|
|
{/if}
|