diff --git a/admin-dev/themes/default/template/controllers/products/customization.tpl b/admin-dev/themes/default/template/controllers/products/customization.tpl index 12d86ac7d..ca7584557 100644 --- a/admin-dev/themes/default/template/controllers/products/customization.tpl +++ b/admin-dev/themes/default/template/controllers/products/customization.tpl @@ -28,17 +28,24 @@
| {l s='File fields:'} | ++ {include file="controllers/products/multishop/checkbox.tpl" field="uploadable_files" type="default"} + + |
{l s='Number of upload file fields displayed'} |
| {l s='Text fields:'} | ++ {include file="controllers/products/multishop/checkbox.tpl" field="text_fields" type="default"} + + |
{l s='Number of text fields displayed'} diff --git a/classes/Product.php b/classes/Product.php index 95729d79c..a3a976b28 100644 --- a/classes/Product.php +++ b/classes/Product.php @@ -247,7 +247,6 @@ class ProductCore extends ObjectModel 'depth' => array('type' => self::TYPE_FLOAT, 'validate' => 'isUnsignedFloat'), 'weight' => array('type' => self::TYPE_FLOAT, 'validate' => 'isUnsignedFloat'), 'quantity_discount' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), - 'uploadable_files' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt'), 'ean13' => array('type' => self::TYPE_STRING, 'validate' => 'isEan13', 'size' => 13), 'upc' => array('type' => self::TYPE_STRING, 'validate' => 'isUpc', 'size' => 12), 'cache_is_pack' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), @@ -268,6 +267,7 @@ class ProductCore extends ObjectModel 'additional_shipping_cost' => array('type' => self::TYPE_FLOAT, 'shop' => true, 'validate' => 'isPrice'), 'customizable' => array('type' => self::TYPE_INT, 'shop' => true, 'validate' => 'isUnsignedInt'), 'text_fields' => array('type' => self::TYPE_INT, 'shop' => true, 'validate' => 'isUnsignedInt'), + 'uploadable_files' => array('type' => self::TYPE_INT, 'shop' => true, 'validate' => 'isUnsignedInt'), 'active' => array('type' => self::TYPE_BOOL, 'shop' => true, 'validate' => 'isBool'), 'available_for_order' => array('type' => self::TYPE_BOOL, 'shop' => true, 'validate' => 'isBool'), 'available_date' => array('type' => self::TYPE_DATE, 'shop' => true, 'validate' => 'isDateFormat'), diff --git a/js/admin-products.js b/js/admin-products.js index 88e666607..8203d1ce5 100644 --- a/js/admin-products.js +++ b/js/admin-products.js @@ -27,6 +27,12 @@ // The ProductTabsManager instance will make sure the onReady() methods of each tabs are executed once the tab has loaded var product_tabs = []; +product_tabs['Customization'] = new function(){ + this.onReady = function(){ + if (display_multishop_checkboxes) + ProductMultishop.checkAllCustomization(); + } +} product_tabs['Combinations'] = new function(){ var self = this; this.bindEdit = function(){ @@ -1543,6 +1549,12 @@ var ProductMultishop = new function() ProductMultishop.checkField($('input[name=\'multishop_check[id_category_default]\']').prop('checked'), 'categories-treeview', 'category_box'); }; + this.checkAllCustomization = function() + { + ProductMultishop.checkField($('input[name=\'multishop_check[uploadable_files]\']').prop('checked'), 'uploadable_files'); + ProductMultishop.checkField($('input[name=\'multishop_check[text_fields]\']').prop('checked'), 'text_fields'); + }; + this.checkAllCombinations = function() { ProductMultishop.checkField($('input[name=\'multishop_check[attribute_wholesale_price]\']').prop('checked'), 'attribute_wholesale_price'); |