[-] CORE : Could not add several cart rules
This commit is contained in:
1 parent
9f12ff15be
commit
01be908e51
1 file changed
+2
-1
+2
-1
@@ -762,10 +762,11 @@ class CartCore extends ObjectModel
|
|||||||
{
|
{
|
||||||
// You can't add a cart rule that does not exist
|
// You can't add a cart rule that does not exist
|
||||||
$cartRule = new CartRule($id_cart_rule, Context::getContext()->language->id);
|
$cartRule = new CartRule($id_cart_rule, Context::getContext()->language->id);
|
||||||
|
|
||||||
if (!Validate::isLoadedObject($cartRule))
|
if (!Validate::isLoadedObject($cartRule))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (Db::getInstance()->getValue('SELECT id_cart_rule FROM '._DB_PREFIX_.'cart_cart_rule WHERE id_cart = '.(int)$this->id))
|
if (Db::getInstance()->getValue('SELECT id_cart_rule FROM '._DB_PREFIX_.'cart_cart_rule WHERE id_cart_rule = '.(int)$id_cart_rule.' AND id_cart = '.(int)$this->id))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// Add the cart rule to the cart
|
// Add the cart rule to the cart
|
||||||
|
|||||||
Reference in new issue
Block a user