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

This commit is contained in:
rGaillard committed 2012-08-07 13:08:37 +00:00
1 parent 1ba927785d
commit e07c1dbf17
6 files changed
+112 -1

No files matched your search

@@ -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();
}
}