// Disable content of stocks tab if advanced stock management is not activated

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16746 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
rGaillard
2012-08-07 13:08:37 +00:00
parent 14cdbef06e
commit 7247e325a4
6 changed files with 112 additions and 1 deletions
@@ -442,5 +442,25 @@ class AdminStockInstantStateControllerCore extends AdminController
}
}
}
public function initContent()
{
if (!Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT'))
{
$this->warnings[md5('PS_ADVANCED_STOCK_MANAGEMENT')] = $this->l('You need to activate advanced stock management prior to use this feature.');
return false;
}
parent::initContent();
}
public function initProcess()
{
if (!Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT'))
{
$this->warnings[md5('PS_ADVANCED_STOCK_MANAGEMENT')] = $this->l('You need to activate advanced stock management prior to use this feature.');
return false;
}
parent::initProcess();
}
}