From 9dd87e5200b69ec503c08cd518de4b05eff956b4 Mon Sep 17 00:00:00 2001 From: rMalie Date: Wed, 18 Apr 2012 08:26:41 +0000 Subject: [PATCH] // Add multishop checkbox for id_category_default in admin products --- .../template/controllers/products/associations.tpl | 3 +++ js/admin-products.js | 8 ++++++++ 2 files changed, 11 insertions(+) diff --git a/admin-dev/themes/default/template/controllers/products/associations.tpl b/admin-dev/themes/default/template/controllers/products/associations.tpl index 4dbfa2b49..0aad16f5b 100644 --- a/admin-dev/themes/default/template/controllers/products/associations.tpl +++ b/admin-dev/themes/default/template/controllers/products/associations.tpl @@ -27,6 +27,8 @@

{l s='Associations'}

+ + {include file="controllers/products/multishop/check_fields.tpl" product_tab="Associations"}
{l s='Please select a default category.'} @@ -54,6 +56,7 @@ + {include file="controllers/products/multishop/checkbox.tpl" field="id_category_default" type="default"} diff --git a/js/admin-products.js b/js/admin-products.js index 3f7622589..de04a9b2a 100644 --- a/js/admin-products.js +++ b/js/admin-products.js @@ -712,6 +712,9 @@ product_tabs['Associations'] = new function(){ $('#divAccessories').delegate('.delAccessory', 'click', function(){ self.delAccessory($(this).attr('name')); }); + + if (display_multishop_checkboxes) + multishopCheckAllProductFieldsAssociations(); }; } @@ -1535,6 +1538,11 @@ function multishopCheckAllProductFieldsSeo(checked) }); } +function multishopCheckAllProductFieldsAssociations(checked) +{ + multishopCheckProductField($('input[name=\'multishop_check[id_category_default]\']').attr('checked'), 'id_category_default'); +} + var tabs_manager = new ProductTabsManager(); tabs_manager.setTabs(product_tabs);