// Merge -> revision 9061

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9069 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
rMalie
2011-10-05 15:21:55 +00:00
parent 51de6be6cc
commit b4d436ca21
53 changed files with 795 additions and 456 deletions
+5 -2
View File
@@ -537,6 +537,8 @@ class OrderCore extends ObjectModel
/**
* Check if order contains (only) virtual products
*
* @param boolean $strict If false return true if there are at least one product virtual
* @return boolean true if is a virtual order or false
*
*/
@@ -545,7 +547,7 @@ class OrderCore extends ObjectModel
$products = $this->getProducts();
if (count($products) < 1)
return false;
$virtual = false;
$virtual = true;
foreach ($products AS $product)
{
$pd = ProductDownload::getIdFromIdProduct((int)($product['product_id']));
@@ -553,8 +555,9 @@ class OrderCore extends ObjectModel
{
if ($strict === false)
return true;
$virtual &= true;
}
else
$virtual &= false;
}
return $virtual;
}