55 lines
2.1 KiB
Smarty
55 lines
2.1 KiB
Smarty
<div id="best-sellers_block_home" class="block products_block">
|
|
<h3>{l s='Meilleures ventes' mod='blockbestsellers'}</h3>
|
|
{if $best_sellers|@count > 0}
|
|
<div class="slider_sales">
|
|
<ul class="slides">
|
|
{foreach from=$best_sellers item=product name=myLoop}
|
|
<li>
|
|
<div class="img_sellers">
|
|
<a href="{$product.link}" title="{$product.name|escape:'htmlall':'UTF-8'}"><img src="{$link->getImageLink($product.link_rewrite, $product.id_image, 'medium')}" alt="{$product.legend|escape:'htmlall':'UTF-8'}" /></a>
|
|
</div>
|
|
<div class="info_sellers">
|
|
<a href="{$product.link}" title="{$product.name|escape:'htmlall':'UTF-8'}" class="product_link_sellers">{$product.name|strip_tags|truncate:26}</a>
|
|
<span class="reduction">
|
|
<span class="price">{$product.price}</span>
|
|
|
|
<p class="price_info">
|
|
<span class="old_price">{convertPrice price=$product.price_without_reduction}</span>
|
|
|
|
|
|
{if $product.specific_prices.reduction_type =='percentage'}
|
|
{assign var="reduc_value" value=$product.specific_prices.reduction * 100}
|
|
<span>(-{$reduc_value|intval}%)</span>
|
|
{elseif $product.specific_prices.reduction_type == 'amount'}
|
|
<span>(-{$product.specific_prices.reduction|number_format:2:",":"."}€)</span>
|
|
{/if}
|
|
</p>
|
|
|
|
</span>
|
|
<div class="link">
|
|
<a href="{$product.link}" title="{$product.name}">{l s='Voir le produit' mod='blockbestsellers'}</a>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
{/foreach}
|
|
</ul>
|
|
</div>
|
|
{else}
|
|
<p>{l s='No best sellers at this time' mod='blockbestsellers'}</p>
|
|
{/if}
|
|
</div>
|
|
|
|
<link rel="stylesheet" href="/modules/blockbestsellers/assets/css/flexslider.css">
|
|
<script type="text/javascript" src="/modules/blockbestsellers/assets/js/jquery.flexslider.js"></script>
|
|
|
|
<script>
|
|
{literal}
|
|
$( document ).ready(function() {
|
|
$('.slider_sales').flexslider({
|
|
animation: "slide",
|
|
directionNav: false,
|
|
useCSS : false,
|
|
});
|
|
});
|
|
{/literal}
|
|
</script> |