// Context part 18
This commit is contained in:
@@ -46,11 +46,11 @@ class NewProductsControllerCore extends FrontController
|
||||
|
||||
$this->productSort();
|
||||
|
||||
$nbProducts = (int)Product::getNewProducts((int)self::$cookie->id_lang, (isset($this->p) ? (int)($this->p) - 1 : NULL), (isset($this->n) ? (int)($this->n) : NULL), true);
|
||||
$nbProducts = (int)Product::getNewProducts($this->context->language->id, (isset($this->p) ? (int)($this->p) - 1 : NULL), (isset($this->n) ? (int)($this->n) : NULL), true);
|
||||
$this->pagination($nbProducts);
|
||||
|
||||
self::$smarty->assign(array(
|
||||
'products' => Product::getNewProducts((int)(self::$cookie->id_lang), (int)($this->p) - 1, (int)($this->n), false, $this->orderBy, $this->orderWay),
|
||||
$this->context->smarty->assign(array(
|
||||
'products' => Product::getNewProducts($this->context->language->id, (int)($this->p) - 1, (int)($this->n), false, $this->orderBy, $this->orderWay),
|
||||
'add_prod_display' => Configuration::get('PS_ATTRIBUTE_CATEGORY_DISPLAY'),
|
||||
'nbProducts' => (int)($nbProducts),
|
||||
'homeSize' => Image::getSize('home')
|
||||
@@ -60,7 +60,7 @@ class NewProductsControllerCore extends FrontController
|
||||
public function displayContent()
|
||||
{
|
||||
parent::displayContent();
|
||||
self::$smarty->display(_PS_THEME_DIR_.'new-products.tpl');
|
||||
$this->context->smarty->display(_PS_THEME_DIR_.'new-products.tpl');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user