// Merge -> revision 8800

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8808 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
rMalie
2011-09-27 14:30:06 +00:00
parent 05fde82c53
commit 1b6d0d1be3
110 changed files with 1240 additions and 1066 deletions
+3
View File
@@ -178,6 +178,9 @@ class AuthControllerCore extends FrontController
$this->context->cart->secure_key = $customer->secure_key;
$this->context->cart->id_address_delivery = Address::getFirstCustomerAddressId((int)($customer->id));
$this->context->cart->id_address_invoice = Address::getFirstCustomerAddressId((int)($customer->id));
// If a logged guest logs in as a customer, the cart secure key was already set and needs to be updated
$this->context->cart->secure_key = $customer->secure_key;
$this->context->cart->update();
Module::hookExec('createAccount', array(
'_POST' => $_POST,
+5 -5
View File
@@ -156,15 +156,15 @@ class CategoryControllerCore extends FrontController
{
$hookExecuted = false;
Module::hookExec('productListAssign', array('nbProducts' => &$this->nbProducts, 'catProducts' => &$this->cat_products, 'hookExecuted' => &$hookExecuted));
if (!$hookExecuted)
if (!$hookExecuted) // The hook was not executed, standard working
{
self::$smarty->assign('categoryNameComplement', '');
$this->context->smarty->assign('categoryNameComplement', '');
$this->nbProducts = $this->category->getProducts(NULL, NULL, NULL, $this->orderBy, $this->orderWay, true);
$this->pagination((int)$this->nbProducts);
$this->pagination((int)$this->nbProducts); // Pagination must be call after "getProducts"
$this->cat_products = $this->category->getProducts($this->context->language->id, (int)$this->p, (int)$this->n, $this->orderBy, $this->orderWay);
}
else
$this->pagination((int)$this->nbProducts);
else // Hook executed, use the override
$this->pagination((int)$this->nbProducts); // Pagination must be call after "getProducts"
self::$smarty->assign('nb_products', (int)$this->nbProducts);
}
}