// Context part 11

This commit is contained in:
tDidierjean
2011-07-18 15:50:58 +00:00
parent 4b7dee58b7
commit 6551a3ece7
60 changed files with 378 additions and 520 deletions
@@ -99,7 +99,7 @@ class BlockBestSellers extends Module
if (Configuration::get('PS_CATALOG_MODE'))
return ;
global $smarty;
$context = Context::getContext();
$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'))
@@ -110,7 +110,7 @@ class BlockBestSellers extends Module
$bestseller['price'] = Tools::displayPrice(Product::getPriceStatic((int)($bestseller['id_product'])), $currency);
$best_sellers[] = $bestseller;
}
$smarty->assign(array(
$context->controller->smarty->assign(array(
'best_sellers' => $best_sellers,
'mediumSize' => Image::getSize('medium')));
return $this->display(__FILE__, 'blockbestsellers.tpl');