// Module configuration is now displayed

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10289 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
rGaillard
2011-11-19 15:03:20 +00:00
parent a318ca610f
commit a25cc16f28
4 changed files with 14 additions and 12 deletions
@@ -101,16 +101,17 @@ class BlockBestSellers extends Module
$currency = new Currency((int)($params['cookie']->id_currency));
$bestsellers = ProductSale::getBestSalesLight((int)($params['cookie']->id_lang), 0, 5);
if (!$bestsellers AND !Configuration::get('PS_BLOCK_BESTSELLERS_DISPLAY'))
return;
$best_sellers = array();
if($bestsellers)
foreach ($bestsellers AS $bestseller)
{
$bestseller['price'] = Tools::displayPrice(Product::getPriceStatic((int)($bestseller['id_product'])), $currency);
$best_sellers[] = $bestseller;
}
foreach ($bestsellers AS $bestseller)
{
$bestseller['price'] = Tools::displayPrice(Product::getPriceStatic((int)($bestseller['id_product'])), $currency);
$best_sellers[] = $bestseller;
}
$this->context->smarty->assign(array(
'best_sellers' => $best_sellers,