Magento

eCommerce Software for Online Growth

Magento Forum

From setting up your store to managing your products, pages and promotions to generating detailed reports, the Magento User Guide empowers the user to utilize the platform for all of its vast capacity.
Available in eBook and Print formats – Download Now!!!
   
How to Use Radio Buttons instead of Drop Downs for Configurable Product Custom Attribute
 
marioj
Jr. Member
 
Total Posts:  25
Joined:  2009-03-09
 

As the title suggests, I am trying to figure out how to use radio buttons instead of drop down boxes for my custom attributes used in configurable products.  The drop down boxes really do not go with the design on my pages and the radio boxes would really save space and keep the flow of data on page unencumbered.  So, can this be done in stock Magento?  If not, are there available plug-ins with this functionality?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Florent
Jr. Member
 
Total Posts:  16
Joined:  2008-09-15
 

This drop-down menu is built in ths file

js/varien/Product.js

It is not that simple to change it without breaking the dynamic price functionality.

Personally, I juste removed the “Choose an Option...” text by doing that :

In the file Product.js :

var options this.getAttributeOptions(attributeId);
        
this.clearSelect(element);
        
//element.options[0] = new Option(this.config.chooseText, ''); // COMMENT OUT THIS LINE

        
var prevConfig false;
        if(
element.prevSetting){
            prevConfig 
element.prevSetting.options[element.prevSetting.selectedIndex];
        
}

        
if(options{
            
var index 0// CHANGE THE INDEX TO 0

If anybody has made the real script to build radio, please post it smile

 Signature 

Florent
Smile - Open Source Solutions

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top
 
© Copyright 2010 Magento Inc.
Privacy Policy|Terms of Service
Magento Community Count
277222 users|1045 users currently online|346981 forum posts