// small bug fix on BO orders

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16842 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
dMetzger
2012-08-14 09:15:50 +00:00
parent 42ed7b598d
commit f455965bea
3 changed files with 10 additions and 10 deletions
+7 -7
View File
@@ -2991,14 +2991,14 @@ class CartCore extends ObjectModel
return $result;
}
public static function getCustomerCarts($id_customer)
public static function getCustomerCarts($id_customer, $with_order = true)
{
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('
SELECT *
FROM '._DB_PREFIX_.'cart c
WHERE c.`id_customer` = '.(int)$id_customer.'
ORDER BY c.`date_add` DESC');
return $result;
return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('
SELECT *
FROM '._DB_PREFIX_.'cart c
WHERE c.`id_customer` = '.(int)$id_customer.'
'.(!$with_order ? 'AND id_cart NOT IN (SELECT id_cart FROM '._DB_PREFIX_.'orders o WHERE o.`id_customer` = '.(int)$id_customer.')' : '').'
ORDER BY c.`date_add` DESC');
}
public static function replaceZeroByShopName($echo, $tr)