From 2bc17241cacf97bfc941e0f8392cb954eb55ce68 Mon Sep 17 00:00:00 2001 From: mDeflotte Date: Fri, 21 Oct 2011 15:13:35 +0000 Subject: [PATCH] // 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 --- admin-dev/tabs/AdminPPreferences.php | 1 + js/admin.js | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/admin-dev/tabs/AdminPPreferences.php b/admin-dev/tabs/AdminPPreferences.php index c33d6b57d..452076c3c 100644 --- a/admin-dev/tabs/AdminPPreferences.php +++ b/admin-dev/tabs/AdminPPreferences.php @@ -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'), diff --git a/js/admin.js b/js/admin.js index 3e98004fd..8e6585232 100644 --- a/js/admin.js +++ b/js/admin.js @@ -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'; } }