36 lines
1.5 KiB
Smarty
36 lines
1.5 KiB
Smarty
<!-- MODULE Block best sellers -->
|
|
<div id="best-sellers_block_right" class="block products_block">
|
|
<div class="text_block2">
|
|
<h5>{l s='Top sellers' mod='blockbestsellers'}</h5>
|
|
<div class="block_content">
|
|
<p></p>
|
|
{if $best_sellers|@count > 0}
|
|
{foreach from=$best_sellers item=product name=myLoop}
|
|
<div class="{if $smarty.foreach.myLoop.first}first_item{elseif $smarty.foreach.myLoop.last}last_item{/if} item">
|
|
<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, 'small')}" 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:'UTF-8'|escape:'htmlall':'UTF-8'|truncate:28}</a>
|
|
<span class="reduction">
|
|
<span class="price">{$product.price}</span>
|
|
{assign var="reduc_value" value=$product.specific_prices.reduction * 100}
|
|
{if $product.specific_prices.reduction_type =='percentage'}
|
|
<span>(-{$reduc_value|intval}%)</span>
|
|
{elseif $product.specific_prices.reduction_type == 'amount'}
|
|
<span>(-{$product.specific_prices.reduction|number_format:2:",":"."}€)</span>
|
|
{/if}
|
|
</span>
|
|
</div>
|
|
</div>
|
|
{/foreach}
|
|
|
|
{else}
|
|
<p>{l s='No best sellers at this time' mod='blockbestsellers'}</p>
|
|
{/if}
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
<!-- /MODULE Block best sellers -->
|