[-] MO : #PSTEST-280 - Removed old-way method (deprecated) + fixed problem with cartRules

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@12207 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
mDeflotte
2012-01-05 16:15:46 +00:00
parent 22d0737fd9
commit 0187d7b498
5 changed files with 205 additions and 9 deletions
+3 -1
View File
@@ -35,6 +35,8 @@ include_once(dirname(__FILE__).'/LoyaltyModule.php');
include_once(dirname(__FILE__).'/LoyaltyStateModule.php');
include_once(dirname(__FILE__).'/loyalty.php');
Tools::displayFileAsDeprecated();
$context = Context::getContext();
if (!$context->customer->isLogged())
Tools::redirect('index.php?controller=authentication&back=modules/loyalty/loyalty-program.php');
@@ -98,7 +100,7 @@ if (Tools::getValue('transform-points') == 'true' AND $customerPoints > 0)
$cartRule->add();
/* Register order(s) which contributed to create this voucher */
LoyaltyModule::registerDiscount($voucher);
LoyaltyModule::registerDiscount($cartRule);
Tools::redirect('modules/loyalty/loyalty-program.php');
}