[-] FO : #PSCFV-2147 - Fix bug with date of delivery

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@15067 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
mDeflotte
2012-05-04 09:12:02 +00:00
parent 8fcbb6d4fb
commit f25d090958
5 changed files with 153 additions and 69 deletions
+17 -1
View File
@@ -1473,7 +1473,23 @@ class CartCore extends ObjectModel
return Tools::ps_round((float)$order_total, 2);
}
/**
* Get the number of packages
*
* @return int number of packages
*/
public function getNbOfPackages()
{
static $nb_packages = 0;
if (!$nb_packages)
foreach ($this->getPackageList() as $by_address)
$nb_packages += count($by_address);
return $nb_packages;
}
/**
* Get products grouped by package and by addresses to be sent individualy (one package = one shipping cost).
*