diff --git a/themes/default/js/product.js b/themes/default/js/product.js
index 02fe730f9..ce63b51fd 100644
--- a/themes/default/js/product.js
+++ b/themes/default/js/product.js
@@ -634,7 +634,7 @@ function checkMinimalQuantity(minimal_quantity)
function colorPickerClick(elt)
{
id_attribute = $(elt).attr('id').replace('color_', '');
- $('.color_pick').parent().removeClass('selected');
+ $(elt).parent().parent().children().removeClass('selected');
$(elt).fadeTo('fast', 1, function(){
$(this).fadeTo('fast', 0, function(){
$(this).fadeTo('fast', 1, function(){
@@ -642,7 +642,7 @@ function colorPickerClick(elt)
});
});
});
- $('#color_pick_hidden').val(id_attribute);
+ $(elt).parent().parent().parent().children('.color_pick_hidden,#color_pick_hidden').val(id_attribute);
findCombination(false);
}
diff --git a/themes/default/product.tpl b/themes/default/product.tpl
index b3f07ecb7..3ed595535 100644
--- a/themes/default/product.tpl
+++ b/themes/default/product.tpl
@@ -302,7 +302,7 @@ var fieldRequired = '{l s='Please fill in all required fields, then save the cus
{/if}
{/foreach}
-
+
{elseif ($group.group_type == 'radio')}
{foreach from=$group.attributes key=id_attribute item=group_attribute}