Jump to content

Select list to radiobutton list


salvo-1

Recommended Posts

Hi, I would like to change the attribute list from "select, option" to radiobutton. I want to do something like in the image in attachment :
I have to modify this code. I tried to edit it but javascript doesn't work anymore.
Any solution?
The code in product.tpl is:

{foreach from=$groups key=id_attribute_group item=group}
                   {if $group.attributes|@count}                    
{$group.name|escape:'htmlall':'UTF-8'} :
                       {assign var='groupName' value='group_'|cat:$id_attribute_group}
0}$('#wrapResetImages').show('slow');{/if}">
                           {foreach from=$group.attributes key=id_attribute item=group_attribute}
{$group_attribute|escape:'htmlall':'UTF-8'}
                           {/foreach}

                      {/if}
       {/foreach}  



Thanks in advance !!!

39821_2SjOX9TDQOm74lTqrgFV_t

Link to comment
Share on other sites

-The onclick function should call the "findCombination()" call in "product.js"
-In product.js the function findCombination() needs theese parameters :

 $('div#attributes select').each(function(){
       choice.push($(this).val());
   });


and they are passed with the "select, option" :

0}$('#wrapResetImages').show('slow');{/if}">
                           {foreach from=$group.attributes key=id_attribute item=group_attribute}
{$group_attribute|escape:'htmlall':'UTF-8'}
                           {/foreach}



But what have I to do if I want to use "Radiobutton list"?
I would like to use an image with radiobutton for each attribute in "select, option" menu and update the image when I change my choise. (as in the attachment image)

Thanks in advance

39822_NVc1J8sRQKc9MJ3egWVB_t

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...