// Add PS_ADVANCED_STOCK_MANAGEMENT configuration in admin product preference

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9561 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
mDeflotte
2011-10-21 15:13:35 +00:00
parent ba09ad8613
commit 2bc17241ca
2 changed files with 6 additions and 0 deletions
+1
View File
@@ -45,6 +45,7 @@ class AdminPPreferences extends AdminPreferences
'PS_CATALOG_MODE' => array('title' => $this->l('Catalog mode:'), 'desc' => $this->l('When active, all features for shopping will be disabled'), 'validation' => 'isBool', 'cast' => 'intval', 'required' => true, 'type' => 'bool'),
'PS_ORDER_OUT_OF_STOCK' => array('title' => $this->l('Allow ordering out-of-stock product:'), 'desc' => $this->l('Add to cart button is hidden when product is unavailable'), 'validation' => 'isBool', 'cast' => 'intval', 'required' => true, 'type' => 'bool'),
'PS_STOCK_MANAGEMENT' => array('title' => $this->l('Enable stock management:'), 'desc' => '', 'validation' => 'isBool', 'cast' => 'intval', 'required' => true, 'type' => 'bool', 'js' => array('on' => 'onchange="stockManagementActivationAuthorization()"', 'off' => 'onchange="stockManagementActivationAuthorization()"')),
'PS_ADVANCED_STOCK_MANAGEMENT' => array('title' => $this->l('Enable advanced stock management:'), 'desc' => '', 'validation' => 'isBool', 'cast' => 'intval', 'required' => true, 'type' => 'bool'),
'PS_DISPLAY_QTIES' => array('title' => $this->l('Display available quantities on product page:'), 'desc' => '', 'validation' => 'isBool', 'cast' => 'intval', 'required' => true, 'type' => 'bool'),
'PS_DISPLAY_JQZOOM' => array('title' => $this->l('Enable JqZoom instead of Thickbox on product page:'), 'desc' => '', 'validation' => 'isBool', 'cast' => 'intval', 'required' => true, 'type' => 'bool'),
'PS_DISP_UNAVAILABLE_ATTR' => array('title' => $this->l('Display unavailable product attributes on product page:'), 'desc' => '', 'validation' => 'isBool', 'cast' => 'intval', 'required' => true, 'type' => 'bool'),
+5
View File
@@ -753,6 +753,8 @@ function stockManagementActivationAuthorization()
getE('PS_ORDER_OUT_OF_STOCK_off').disabled = false;
getE('PS_DISPLAY_QTIES_on').disabled = false;
getE('PS_DISPLAY_QTIES_off').disabled = false;
getE('PS_ADVANCED_STOCK_MANAGEMENT_on').disabled = false;
getE('PS_ADVANCED_STOCK_MANAGEMENT_off').disabled = false;
}
else
{
@@ -762,6 +764,9 @@ function stockManagementActivationAuthorization()
getE('PS_ORDER_OUT_OF_STOCK_on').checked = true;
getE('PS_ORDER_OUT_OF_STOCK_on').disabled = 'disabled';
getE('PS_ORDER_OUT_OF_STOCK_off').disabled = 'disabled';
getE('PS_ADVANCED_STOCK_MANAGEMENT_off').checked = true;
getE('PS_ADVANCED_STOCK_MANAGEMENT_on').disabled = 'disabled';
getE('PS_ADVANCED_STOCK_MANAGEMENT_off').disabled = 'disabled';
}
}