// 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:
1 parent
14cdbef06e
commit
7247e325a4
6 files changed
+112
-1
No files matched your search
@@ -552,4 +552,24 @@ class AdminStockConfigurationControllerCore 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();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -351,4 +351,24 @@ class AdminStockCoverControllerCore extends AdminController
|
|||||||
$quantity = Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($query);
|
$quantity = Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($query);
|
||||||
return $quantity;
|
return $quantity;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -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();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -951,6 +951,12 @@ class AdminStockManagementControllerCore extends AdminController
|
|||||||
*/
|
*/
|
||||||
public function initContent()
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
// Manage the add stock form
|
// Manage the add stock form
|
||||||
if ($this->display == 'addstock' || $this->display == 'removestock' || $this->display == 'transferstock')
|
if ($this->display == 'addstock' || $this->display == 'removestock' || $this->display == 'transferstock')
|
||||||
{
|
{
|
||||||
@@ -1138,4 +1144,14 @@ class AdminStockManagementControllerCore extends AdminController
|
|||||||
|
|
||||||
return $this->context->smarty->fetch('helpers/list/list_action_transferstock.tpl');
|
return $this->context->smarty->fetch('helpers/list/list_action_transferstock.tpl');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -293,5 +293,25 @@ class AdminStockMvtControllerCore extends AdminController
|
|||||||
echo sprintf("%s\n", implode(';', array_map(array('CSVCore', 'wrap'), $row_csv)));
|
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();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -845,6 +845,11 @@ class AdminSupplyOrdersControllerCore extends AdminController
|
|||||||
*/
|
*/
|
||||||
public function initContent()
|
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;
|
||||||
|
}
|
||||||
// Manage the add stock form
|
// Manage the add stock form
|
||||||
if (Tools::isSubmit('changestate'))
|
if (Tools::isSubmit('changestate'))
|
||||||
$this->initChangeStateContent();
|
$this->initChangeStateContent();
|
||||||
@@ -2164,4 +2169,14 @@ class AdminSupplyOrdersControllerCore extends AdminController
|
|||||||
|
|
||||||
return $status;
|
return $status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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