Jump to content

How to hide round check pimp then only 1 variant exists


Recommended Posts

in this case you have to modify product.tpl file 

there is:
 

{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}" value="{$id_attribute}" {if ($group.default == $id_attribute)} checked="checked"{/if} onclick="findCombination();getProductAttribute();" />
											<span>{$group_attribute|escape:'htmlall':'UTF-8'}</span>
										</li>
									{/foreach}
								</ul>
							{/if}

just add if condition with style="display:none;" to <input type="radio">

Link to comment
Share on other sites

Sorry, i think i didn`t get the needed IF sentence.

 

I added

{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}" value="{$id_attribute}" 
{if ($group.default == $id_attribute)} checked="checked" {/if} 

style="display:none;" 

onclick="findCombination();getProductAttribute();" /><span>{$group_attribute|escape:'htmlall':'UTF-8'}</span>
</li>
{/foreach}
</ul>
{/if}

And it doesn`t showed at all, even for 2 values. 

 

Could you please say which IF should i add for style="display:none;" to get checks for 2 and more values of attribute AND no check in case of 1 value in attribute?

Link to comment
Share on other sites

×
×
  • Create New...