// CaregoryController : FixBug : Product list must be assigned to the template AFTER being calculated

This commit is contained in:
mDeflotte
2011-09-30 07:22:42 +00:00
parent 5724d334a0
commit 4c96d930cd
+4 -3
View File
@@ -88,6 +88,10 @@ class CategoryControllerCore extends FrontController
else if (isset($this->context->customer->id_guest)) else if (isset($this->context->customer->id_guest))
$this->context->smarty->assign('compareProducts', CompareProduct::getGuestCompareProducts($this->context->customer->id_guest)); $this->context->smarty->assign('compareProducts', CompareProduct::getGuestCompareProducts($this->context->customer->id_guest));
$this->assignScenes();
if ($this->category->id != 1)
$this->assignProductList();
$this->productSort(); $this->productSort();
$this->context->smarty->assign(array( $this->context->smarty->assign(array(
'category' => $this->category, 'category' => $this->category,
@@ -106,9 +110,6 @@ class CategoryControllerCore extends FrontController
'suppliers' => Supplier::getSuppliers() 'suppliers' => Supplier::getSuppliers()
)); ));
$this->assignScenes();
if ($this->category->id != 1)
$this->assignProductList();
$this->setTemplate(_PS_THEME_DIR_.'category.tpl'); $this->setTemplate(_PS_THEME_DIR_.'category.tpl');
} }