// Fix #PSCFV-4441
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@17587 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
@@ -461,6 +461,11 @@ class ProductCore extends ObjectModel
|
||||
{
|
||||
if (!parent::add($autodate, $null_values))
|
||||
return false;
|
||||
|
||||
if ($this->getType() == Product::PTYPE_VIRTUAL)
|
||||
StockAvailable::setProductOutOfStock((int)$this->id, 1);
|
||||
else
|
||||
StockAvailable::setProductOutOfStock((int)$this->id, 2);
|
||||
|
||||
Hook::exec('actionProductSave', array('id_product' => $this->id));
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user