// Context part 27

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7812 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
tDidierjean
2011-07-29 14:29:57 +00:00
parent 35748d1b8f
commit 5d090a25b3
66 changed files with 532 additions and 813 deletions
@@ -99,7 +99,6 @@ class BlockBestSellers extends Module
if (Configuration::get('PS_CATALOG_MODE'))
return ;
$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'))
@@ -113,7 +112,7 @@ class BlockBestSellers extends Module
$best_sellers[] = $bestseller;
}
$context->smarty->assign(array(
$this->context->smarty->assign(array(
'best_sellers' => $best_sellers,
'mediumSize' => Image::getSize('medium'),
));
@@ -129,8 +128,7 @@ class BlockBestSellers extends Module
{
if (Configuration::get('PS_CATALOG_MODE'))
return ;
$context = Context::getContext();
$context->controller->addCSS(($this->_path).'blockbestsellers.css', 'all');
$this->context->controller->addCSS(($this->_path).'blockbestsellers.css', 'all');
}
public function hookHome($params)
@@ -138,7 +136,6 @@ class BlockBestSellers extends Module
if (Configuration::get('PS_CATALOG_MODE'))
return ;
global $smarty;
$currency = new Currency((int)($params['cookie']->id_currency));
$bestsellers = ProductSale::getBestSalesLight((int)($params['cookie']->id_lang), 0, 4);
if (!$bestsellers AND !Configuration::get('PS_BLOCK_BESTSELLERS_DISPLAY'))
@@ -152,7 +149,7 @@ class BlockBestSellers extends Module
$best_sellers[] = $bestseller;
}
$smarty->assign(array(
$this->context->smarty->assign(array(
'best_sellers' => $best_sellers,
'homeSize' => Image::getSize('home')));
return $this->display(__FILE__, 'blockbestsellers-home.tpl');