// Merge -> revision 8363

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8365 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
rMalie
2011-09-06 12:38:55 +00:00
parent 76f895c4d5
commit 39f2f53db2
25 changed files with 11187 additions and 2208 deletions
+8 -1
View File
@@ -250,6 +250,8 @@ class CartCore extends ObjectModel
/**
* Return cart discounts
*
* @param bool true will return discounts with basic informations
* @param bool true will erase the cache
* @result array Discounts
*/
public function getDiscounts($lite = false, $refresh = false)
@@ -260,10 +262,15 @@ class CartCore extends ObjectModel
if (!$this->id)
return array();
if (!$lite AND !$refresh AND isset(self::$_discounts[$this->id]))
if (!$refresh)
{
if (!$lite AND isset(self::$_discounts[$this->id]))
return self::$_discounts[$this->id];
if ($lite AND isset(self::$_discountsLite[$this->id]))
return self::$_discountsLite[$this->id];
}
$result = Db::getInstance()->ExecuteS('
SELECT d.*, `id_cart`