Skip to content

Commit

Permalink
[-] FO : Exception in Cart.php
Browse files Browse the repository at this point in the history
// norms
  • Loading branch information
gRoussac committed Apr 2, 2015
1 parent d6cc6f2 commit 76f1dd5
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions classes/Cart.php
Expand Up @@ -2171,10 +2171,14 @@ public function getDeliveryOptionList(Country $default_country = null, $flush =
}

$cart_rules = CartRule::getCustomerCartRules(Context::getContext()->cookie->id_lang, Context::getContext()->cookie->id_customer, true, true, false, $this, true);
$result = Db::getInstance()->executeS('SELECT * FROM '._DB_PREFIX_.'cart_cart_rule WHERE id_cart='.$this->id);

$result = false;
if ($this->id)
$result = Db::getInstance()->executeS('SELECT * FROM '._DB_PREFIX_.'cart_cart_rule WHERE id_cart = '.(int)$this->id);

$cart_rules_in_cart = array();

if (is_array($result) && count($result))
if (is_array($result))
foreach ($result as $row)
$cart_rules_in_cart[] = $row['id_cart_rule'];

Expand Down

0 comments on commit 76f1dd5

Please sign in to comment.