{assign var=bestSellers value=true}

<!-- MODULE Block best sellers -->
{capture name=id}
	id="best-sellers_block"
{/capture}

{capture name=class}
	block products_block
{/capture}

{capture name=title}
	{l s='Top sellers' mod='blockbestsellers'}
{/capture}

{capture name=content}
	{if $best_sellers|@@count > 0}
		{if	file_exists("$tpl_dir./modules/slider.tpl")}
			{include file="$tpl_dir./modules/slider.tpl" id="bestsellers_slider" products=$best_sellers link=$link hasMediumImage=true}
		{/if}
		<p class="clearfix" style="padding: 5px;"><a style="float:right;" href="{$link->getPageLink('best-sales')}" title="{l s='All best sellers' mod='blockbestsellers'}" class="button_large">{l s='All best sellers' mod='blockbestsellers'}</a></p>
	{else}
		<p>{l s='No best sellers at this time' mod='blockbestsellers'}</p>
	{/if}
{/capture}

{if isset($blockId)}
	{include file='../block.tpl' id=$smarty.capture.id class=$smarty.capture.class title=$smarty.capture.title content=$smarty.capture.content blockId=$blockId}
{/if}