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(); - } - }); });