// Context in modules + Shop::sql* methods

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7648 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
rMalie
2011-07-19 09:23:10 +00:00
parent 2c493137c3
commit 8a0a62ae03
25 changed files with 127 additions and 263 deletions
+4 -6
View File
@@ -85,11 +85,10 @@ class BlockSpecials extends Module
{
if (Configuration::get('PS_CATALOG_MODE'))
return ;
$context = Context::getContext();
if (!$special = Product::getRandomSpecial((int)($params['cookie']->id_lang), false, false, $this->shopID) AND !Configuration::get('PS_BLOCK_SPECIALS_DISPLAY'))
if (!$special = Product::getRandomSpecial((int)($params['cookie']->id_lang), false, false, $this->context->shop->getID()) AND !Configuration::get('PS_BLOCK_SPECIALS_DISPLAY'))
return;
$context->controller->smarty->assign(array(
$this->context->controller->smarty->assign(array(
'special' => $special,
'priceWithoutReduction_tax_excl' => Tools::ps_round($special['price_without_reduction'], 2),
'mediumSize' => Image::getSize('medium')
@@ -107,8 +106,7 @@ class BlockSpecials extends Module
{
if (Configuration::get('PS_CATALOG_MODE'))
return ;
$context = Context::getContext();
$context->controller->addCSS(($this->_path).'blockspecials.css', 'all');
$this->context->controller->addCSS(($this->_path).'blockspecials.css', 'all');
}
}