// Autoassignation of the cart rule when log out

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@15610 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
dMetzger
2012-05-22 10:20:36 +00:00
parent f2b5b0cd63
commit 859f360783
2 changed files with 5 additions and 5 deletions
+4 -4
View File
@@ -177,10 +177,6 @@ class FrontControllerCore extends Controller
{
$this->context->customer->logout();
// Login information have changed, so we check if the cart rules still apply
CartRule::autoRemoveFromCart($this->context);
CartRule::autoAddToCart($this->context);
Tools::redirect(isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : null);
}
elseif (isset($_GET['mylogout']))
@@ -249,6 +245,10 @@ class FrontControllerCore extends Controller
$cart->id_address_delivery = 0;
$cart->id_address_invoice = 0;
}
// Needed if the merchant want to give a free product to every visitors
$this->context->cart = $cart;
CartRule::autoAddToCart($this->context);
}
$locale = strtolower(Configuration::get('PS_LOCALE_LANGUAGE')).'_'.strtoupper(Configuration::get('PS_LOCALE_COUNTRY').'.UTF-8');