adamthomson123 Posted January 17, 2015 Share Posted January 17, 2015 i am trying to change the attributes from radio button to drop down menu, but i dont know how to do it, need help please, screenshot is attached thanks Link to comment Share on other sites More sharing options...
vekia Posted January 17, 2015 Share Posted January 17, 2015 product.tpl everything depends on attribute that you want to change, i will show an example for "color" attributes. there is a code: <ul id="color_to_pick_list" class="clearfix"> {assign var="default_colorpicker" value=""} {foreach from=$group.attributes key=id_attribute item=group_attribute} {assign var='img_color_exists' value=file_exists($col_img_dir|cat:$id_attribute|cat:'.jpg')} <li{if $group.default == $id_attribute} class="selected"{/if}> <a href="{$link->getProductLink($product)|escape:'html':'UTF-8'}" id="color_{$id_attribute|intval}" name="{$colors.$id_attribute.name|escape:'html':'UTF-8'}" class="color_pick{if ($group.default == $id_attribute)} selected{/if}"{if !$img_color_exists && isset($colors.$id_attribute.value) && $colors.$id_attribute.value} style="background:{$colors.$id_attribute.value|escape:'html':'UTF-8'};"{/if} title="{$colors.$id_attribute.name|escape:'html':'UTF-8'}"> {if $img_color_exists} <img src="{$img_col_dir}{$id_attribute|intval}.jpg" alt="{$colors.$id_attribute.name|escape:'html':'UTF-8'}" title="{$colors.$id_attribute.name|escape:'html':'UTF-8'}" width="20" height="20" /> {/if} </a> </li> {if ($group.default == $id_attribute)} {$default_colorpicker = $id_attribute} {/if} {/foreach} </ul> <input type="hidden" class="color_pick_hidden" name="{$groupName|escape:'html':'UTF-8'}" value="{$default_colorpicker|intval}" /> change it to: {foreach from=$group.attributes key=id_attribute item=group_attribute} {$colors.$id_attribute.name|escape:'html':'UTF-8'} <input onchange="findCombination()" type="radio" class="color_pick_hidden" name="{$groupName|escape:'html':'UTF-8'}" value="{$id_attribute|intval}" /> <br/> {/foreach} effect: Link to comment Share on other sites More sharing options...
adamthomson123 Posted January 17, 2015 Author Share Posted January 17, 2015 product.tpl everything depends on attribute that you want to change, i will show an example for "color" attributes. there is a code: <ul id="color_to_pick_list" class="clearfix"> {assign var="default_colorpicker" value=""} {foreach from=$group.attributes key=id_attribute item=group_attribute} {assign var='img_color_exists' value=file_exists($col_img_dir|cat:$id_attribute|cat:'.jpg')} <li{if $group.default == $id_attribute} class="selected"{/if}> <a href="{$link->getProductLink($product)|escape:'html':'UTF-8'}" id="color_{$id_attribute|intval}" name="{$colors.$id_attribute.name|escape:'html':'UTF-8'}" class="color_pick{if ($group.default == $id_attribute)} selected{/if}"{if !$img_color_exists && isset($colors.$id_attribute.value) && $colors.$id_attribute.value} style="background:{$colors.$id_attribute.value|escape:'html':'UTF-8'};"{/if} title="{$colors.$id_attribute.name|escape:'html':'UTF-8'}"> {if $img_color_exists} <img src="{$img_col_dir}{$id_attribute|intval}.jpg" alt="{$colors.$id_attribute.name|escape:'html':'UTF-8'}" title="{$colors.$id_attribute.name|escape:'html':'UTF-8'}" width="20" height="20" /> {/if} </a> </li> {if ($group.default == $id_attribute)} {$default_colorpicker = $id_attribute} {/if} {/foreach} </ul> <input type="hidden" class="color_pick_hidden" name="{$groupName|escape:'html':'UTF-8'}" value="{$default_colorpicker|intval}" /> change it to: {foreach from=$group.attributes key=id_attribute item=group_attribute} {$colors.$id_attribute.name|escape:'html':'UTF-8'} <input onchange="findCombination()" type="radio" class="color_pick_hidden" name="{$groupName|escape:'html':'UTF-8'}" value="{$id_attribute|intval}" /> <br/> {/foreach} effect: Hi, Vekia, My Website attributes are already in radio button, i want to change them from radio button to drop down, please how to do it? thanks Link to comment Share on other sites More sharing options...
mickeyboy1 Posted January 17, 2015 Share Posted January 17, 2015 Goto BO/catalog/product attributes and click on edit next to color then choose dropdown from the attribute type result is 2 1 Link to comment Share on other sites More sharing options...
adamthomson123 Posted January 17, 2015 Author Share Posted January 17, 2015 Thanks Mate for your help, thanks again Link to comment Share on other sites More sharing options...
vekia Posted January 17, 2015 Share Posted January 17, 2015 lol how i can miss the real question sorry for the confusion. gladly mickeyboy1 found solution without touching the code. Link to comment Share on other sites More sharing options...
adamthomson123 Posted January 17, 2015 Author Share Posted January 17, 2015 lol how i can miss the real question sorry for the confusion. gladly mickeyboy1 found solution without touching the code. no, problem ! thank you very much too! you always helped alot , thanks Link to comment Share on other sites More sharing options...
Faizan Qureshi Posted July 16, 2020 Share Posted July 16, 2020 Hi, I see, its a very old post but if anyone can attend the similar nature of problem. i want to convert the social titles from radio to drop down in the new account creation form in prestashop 1.7.6 https://xyzcom/en/login?create_account=1 Link to comment Share on other sites More sharing options...
mickeyboy1 Posted July 17, 2020 Share Posted July 17, 2020 (edited) Hi, I see, its a very old post but if anyone can attend the similar nature of problem. i want to convert the social titles from radio to drop down in the new account creation form in prestashop 1.7.6 https://xyzcom/en/login?create_account=1 classes/form/CustomerFormatter.php line 98 reads ->setType('radio-buttons') change it to ->setType('select') Edited July 17, 2020 by mickeyboy1 (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now