Jump to content

Radio button text clickable ?


klor

Recommended Posts

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

 

 

 

post-1289067-0-66461500-1472165585_thumb.png

Edited by klor (see edit history)
Link to comment
Share on other sites

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

 

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

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...