// Disable content of stocks tab if advanced stock management is not activated
This commit is contained in:
@@ -293,5 +293,25 @@ class AdminStockMvtControllerCore extends AdminController
|
||||
echo sprintf("%s\n", implode(';', array_map(array('CSVCore', 'wrap'), $row_csv)));
|
||||
}
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user