From cd80e68ae23619f01504d078410414f67b33194b Mon Sep 17 00:00:00 2001 From: lLefevre Date: Mon, 19 Dec 2011 13:20:30 +0000 Subject: [PATCH] // small bugs in combinaitions of virtual products --- .../themes/template/products/combinations.tpl | 31 +++++-------------- admin-dev/themes/template/products/form.tpl | 4 ++- .../template/products/virtualproduct.tpl | 15 ++++----- classes/ProductDownload.php | 17 ++++++++++ controllers/admin/AdminProductsController.php | 20 ++++++++++-- js/admin-products.js | 12 +++---- js/attributesBack.js | 1 - 7 files changed, 57 insertions(+), 43 deletions(-) diff --git a/admin-dev/themes/template/products/combinations.tpl b/admin-dev/themes/template/products/combinations.tpl index 32c331c91..acf4af555 100644 --- a/admin-dev/themes/template/products/combinations.tpl +++ b/admin-dev/themes/template/products/combinations.tpl @@ -34,6 +34,12 @@ }); }); + {if $product->is_virtual} + $('#virtual_good_attributes').show(); + {else} + $('#virtual_good_attributes').hide(); + {/if} + var msg_combination_1 = '{l s='Please choose a group'}'; var msg_combination_2 = '{l s='Please choose an attribute'}'; var msg_combination_3 = '{l s='You can only add one combination per type of group'}'; @@ -47,30 +53,6 @@ updateMvtStatus($(this).val()); }); updateMvtStatus($(this).val()); - - if ( $("input[name=is_virtual_file]:checked").val() == 1) - { - $("#virtual_good_attributes").show(); - $("#is_virtual_file_product").show(); - } - else - { - $("#virtual_good_attributes").hide(); - $("#is_virtual_file_product").hide(); - } - - $("input[name=is_virtual_file]").live("change", function() { - if($(this).val() == "1") - { - $("#virtual_good_attributes").show(); - $("#is_virtual_file_product").show(); - } - else - { - $("#virtual_good_attributes").hide(); - $("#is_virtual_file_product").hide(); - } - }); });