klor Posted August 25, 2016 Share Posted August 25, 2016 (edited) Hello I have a product with a lot of declination and in the end you can choose between Glossy and Matte i have setup this with radio button, all work good but on mobile it's hard to click on the button radio so i need your help . Does it possible to make the text Glossy or Matte clickable too ? Thanks you very much Edited August 25, 2016 by klor (see edit history) Link to comment Share on other sites More sharing options...
Rolige Posted August 25, 2016 Share Posted August 25, 2016 Just need put it inside a label, in the code of the default theme in PS 1.6.1.6, in the file: /themes/default-bootstrap/product.tpl You can find this code: {elseif ($group.group_type == 'radio')} <ul> {foreach from=$group.attributes key=id_attribute item=group_attribute} <li> <input type="radio" class="attribute_radio" name="{$groupName|escape:'html':'UTF-8'}" value="{$id_attribute}" {if ($group.default == $id_attribute)} checked="checked"{/if} /> <span>{$group_attribute|escape:'html':'UTF-8'}</span> </li> {/foreach} </ul> {/if} Just replace it for this below: {elseif ($group.group_type == 'radio')} <ul> {foreach from=$group.attributes key=id_attribute item=group_attribute} <li> <label> <input type="radio" class="attribute_radio" name="{$groupName|escape:'html':'UTF-8'}" value="{$id_attribute}" {if ($group.default == $id_attribute)} checked="checked"{/if} /> <span>{$group_attribute|escape:'html':'UTF-8'}</span> </label> </li> {/foreach} </ul> {/if} Link to comment Share on other sites More sharing options...
klor Posted August 25, 2016 Author Share Posted August 25, 2016 What files it is please ? thanks you very much Link to comment Share on other sites More sharing options...
klor Posted August 25, 2016 Author Share Posted August 25, 2016 Just need put it inside a label, in the code of the default theme in PS 1.6.1.6, you can find this code: {elseif ($group.group_type == 'radio')} <ul> {foreach from=$group.attributes key=id_attribute item=group_attribute} <li> <input type="radio" class="attribute_radio" name="{$groupName|escape:'html':'UTF-8'}" value="{$id_attribute}" {if ($group.default == $id_attribute)} checked="checked"{/if} /> <span>{$group_attribute|escape:'html':'UTF-8'}</span> </li> {/foreach} </ul> {/if} Just replace it for this below: {elseif ($group.group_type == 'radio')} <ul> {foreach from=$group.attributes key=id_attribute item=group_attribute} <li> <label> <input type="radio" class="attribute_radio" name="{$groupName|escape:'html':'UTF-8'}" value="{$id_attribute}" {if ($group.default == $id_attribute)} checked="checked"{/if} /> <span>{$group_attribute|escape:'html':'UTF-8'}</span> </label> </li> {/foreach} </ul> {/if} What files it is please ? thanks you very much Link to comment Share on other sites More sharing options...
klor Posted August 25, 2016 Author Share Posted August 25, 2016 i have a customized theme does it in the product.tpl files ? because i have testing it and that's did nothing :/ Link to comment Share on other sites More sharing options...
klor Posted August 26, 2016 Author Share Posted August 26, 2016 so Rolige your solution work when i disable my module filter attribute but when i reactive this one the text was not clickable i search in the module files but i don't find anything . Link to comment Share on other sites More sharing options...
klor Posted August 26, 2016 Author Share Posted August 26, 2016 (edited) you can put this topic as solved thanks for your help i have find the good line in the module Edited August 26, 2016 by klor (see edit history) Link to comment Share on other sites More sharing options...
Rolige Posted August 26, 2016 Share Posted August 26, 2016 Sorry, yes the file to change it is in the product.tpl, I have added this in the original reply. 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