// More BO product page cleanup

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@14436 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
tDidierjean
2012-04-03 16:54:00 +00:00
parent 69cc3a8563
commit 8b46657cae
9 changed files with 137 additions and 105 deletions
+17
View File
@@ -4907,4 +4907,21 @@ class ProductCore extends ObjectModel
return $this->deleteAttributeCombination($id_lang);
}
/**
* Get the product type (simple, virtual, pack)
* @since in 1.5.0
*
* @return int
*/
public function getType()
{
if (!$this->id)
return Product::PTYPE_SIMPLE;
if (Pack::isPack($this->id))
return Product::PTYPE_PACK;
if ($this->is_virtual)
return Product::PTYPE_VIRTUAL;
return Product::PTYPE_SIMPLE;
}
}