[-] FO : fixed infinite loop in free shipping cart rule #PSTEST-1138

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@14561 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
dMetzger
2012-04-10 16:57:50 +00:00
parent 13f16490a7
commit 46ed8664a4
2 changed files with 39 additions and 26 deletions
+1 -2
View File
@@ -682,7 +682,7 @@ class CartRuleCore extends ObjectModel
if ($this->free_shipping && ($filter == CartRule::FILTER_ACTION_ALL || $filter == CartRule::FILTER_ACTION_SHIPPING))
{
if (!$this->carrier_restriction)
$reduction_value += $context->cart->getTotalShippingCost(null, $useTax = true, $context->country);
$reduction_value += $context->cart->getTotalShippingCost(null, $useTax, $context->country);
else
{
$data = Db::getInstance()->executeS('
@@ -699,7 +699,6 @@ class CartRuleCore extends ObjectModel
if ($filter == CartRule::FILTER_ACTION_ALL || $filter == CartRule::FILTER_ACTION_REDUCTION)
{
// Discount (%) on the whole order
if ($this->reduction_percent && $this->reduction_product == 0)
$reduction_value += $context->cart->getOrderTotal($useTax, Cart::ONLY_PRODUCTS) * $this->reduction_percent / 100;