// Oups
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@15619 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
1 parent
6c0e7186fb
commit
3af54b348e
1 file changed
+2
-2
@@ -969,12 +969,12 @@ class CartRuleCore extends ObjectModel
|
|||||||
|
|
||||||
public static function autoRemoveFromCart($context = null)
|
public static function autoRemoveFromCart($context = null)
|
||||||
{
|
{
|
||||||
|
if (!$context)
|
||||||
|
$context = Context::getContext();
|
||||||
if (!CartRule::isFeatureActive() || !Validate::isLoadedObject($context->cart))
|
if (!CartRule::isFeatureActive() || !Validate::isLoadedObject($context->cart))
|
||||||
return array();
|
return array();
|
||||||
|
|
||||||
$errors = array();
|
$errors = array();
|
||||||
if (!$context)
|
|
||||||
$context = Context::getContext();
|
|
||||||
foreach ($context->cart->getCartRules() as $cart_rule)
|
foreach ($context->cart->getCartRules() as $cart_rule)
|
||||||
{
|
{
|
||||||
if ($error = $cart_rule['obj']->checkValidity($context, true))
|
if ($error = $cart_rule['obj']->checkValidity($context, true))
|
||||||
|
|||||||
Reference in new issue
Block a user