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

This commit is contained in:
mDeflotte
2012-01-05 16:15:46 +00:00
parent a1c93510e8
commit 92621a87c7
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');
}