// Fixing bug in the cartrule
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@12271 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
@@ -422,14 +422,15 @@ class CartRuleCore extends ObjectModel
|
|||||||
$reductionValue += $context->cart->getTotalShippingCost(null, $useTax = true, $context->country);
|
$reductionValue += $context->cart->getTotalShippingCost(null, $useTax = true, $context->country);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
foreach ((int)Db::getInstance()->executeS('
|
$data = Db::getInstance()->executeS('
|
||||||
SELECT crc.id_cart_rule, crc.id_carrier
|
SELECT crc.id_cart_rule, crc.id_carrier
|
||||||
FROM '._DB_PREFIX_.'cart_rule_carrier crc
|
FROM '._DB_PREFIX_.'cart_rule_carrier crc
|
||||||
WHERE crc.id_cart_rule = '.(int)$this->id.'
|
WHERE crc.id_cart_rule = '.(int)$this->id.'
|
||||||
AND crc.id_carrier = '.(int)$context->cart->id_carrier)
|
AND crc.id_carrier = '.(int)$context->cart->id_carrier);
|
||||||
as $cart_rule
|
|
||||||
)
|
if ($data)
|
||||||
$reductionValue += $context->cart->getCarrierCost($cart_rule['id_carrier'], $useTax, $context->country);
|
foreach ($data as $cart_rule)
|
||||||
|
$reductionValue += $context->cart->getCarrierCost((int)$cart_rule['id_carrier'], $useTax, $context->country);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user