// fix bug on Cart rule update in validateOrder

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@11326 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
aFolletete
2011-12-17 17:13:48 +00:00
parent 073e0fbbc4
commit d446d77261
2 changed files with 19 additions and 2 deletions
+7 -2
View File
@@ -324,9 +324,14 @@ abstract class PaymentModuleCore extends Module
}
$order->addCartRule($cartRule->id, $cartRule->name, $value);
if ($id_order_state != Configuration::get('PS_OS_ERROR') AND $id_order_state != Configuration::get('PS_OS_CANCELED'))
$cartRule->quantity = $cartRule->quantity - 1;
$cartRule->update();
{
// Create a new instance of Cart Rule without id_lang, in order to update it quantity
$cart_rule_to_update = new CartRule($cartRule->id);
$cart_rule_to_update->quantity = $cart_rule_to_update->quantity - 1;
$cart_rule_to_update->update();
}
$cartRulesList .= '
<tr style="background-color:#EBECEE;">