Jump to content

[SOLVED] Hide Colour select box and ONLY show the colour picker


Recommended Posts

Selecting a colour with the colour picker updates the colour select box in form#buy_block, so I don't see the need for both. Is there some way that I can hide the select box when the attribute is colour? I can see the code for the select box is here:

{if isset($groups)}
           <!-- attributes -->

           {foreach from=$groups key=id_attribute_group item=group}


{$group.name|escape:'htmlall':'UTF-8'} :
               {assign var='groupName' value='group_'|cat:$id_attribute_group}
0}$('#resetImages').show('slow');{/if}">
                   {foreach from=$group.attributes key=id_attribute item=group_attribute}
{$group_attribute|escape:'htmlall':'UTF-8'}
                   {/foreach}


           {/foreach}

           {/if}



Any ideas?

Link to comment
Share on other sites

First you will need to find out the id of the color group, if you go to edit that group in the backoffice, the URL will look something like:
index.php?tab=AdminAttributesGroups&id_attribute_group=1&updateattribute;_group&token=83a62168274f0c363ed5716dcf519be9

You'll need to replace XYZ in the code below with that id_attribute_group number

{if isset($groups)}
           <!-- attributes -->

           {foreach from=$groups key=id_attribute_group item=group}


{$group.name|escape:'htmlall':'UTF-8'} :
               {assign var='groupName' value='group_'|cat:$id_attribute_group}
0}$('#resetImages').show('slow');{/if}">
                   {foreach from=$group.attributes key=id_attribute item=group_attribute}
{$group_attribute|escape:'htmlall':'UTF-8'}
                   {/foreach}


           {/foreach}

{/if} 



This will hide the color attribute group.

Link to comment
Share on other sites

  • 5 weeks later...
  • 3 weeks later...

OK, so now I need to hide a div when there is no customization field and no attributes groups.

Basically, I have the colour picker box and then below I have a div that opens as such:

{if isset($groups) || $product->customizable}

{l s='Customise:'}
Link to comment
Share on other sites

  • 1 year later...

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