babyewok Posted June 30, 2010 Share Posted June 30, 2010 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 More sharing options...
tomerg3 Posted June 30, 2010 Share Posted June 30, 2010 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=83a62168274f0c363ed5716dcf519be9You'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 More sharing options...
babyewok Posted July 5, 2010 Author Share Posted July 5, 2010 that works great - thanks Link to comment Share on other sites More sharing options...
tomerg3 Posted July 5, 2010 Share Posted July 5, 2010 Great, please edit you first post and add (Solved) to the title. Link to comment Share on other sites More sharing options...
Adel Posted August 4, 2010 Share Posted August 4, 2010 hey, Will you tell me which file you have been modified because i am trying to hide an attribute group from my customer into the product page RegardsAdel Link to comment Share on other sites More sharing options...
tomerg3 Posted August 4, 2010 Share Posted August 4, 2010 /themes/prestashop/product.tpl Link to comment Share on other sites More sharing options...
babyewok Posted August 24, 2010 Author Share Posted August 24, 2010 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 More sharing options...
babyewok Posted August 26, 2010 Author Share Posted August 26, 2010 Well, I nearly have this working. I put However, ==1 does not work and <=1 or <2 hides the div regardless of the number of attributes….so close yet so far! Anyone have any ideas as to the missing link?? Link to comment Share on other sites More sharing options...
babyewok Posted August 26, 2010 Author Share Posted August 26, 2010 Well I had posted this on another thread and super rocky came to the rescue as always with this solution: Works a treat! Link to comment Share on other sites More sharing options...
babyewok Posted August 26, 2010 Author Share Posted August 26, 2010 I had to make a change to allow for the text field customisation when there were no groups at all. This seems to work: customizable==false}style="display: none"{/if}> Link to comment Share on other sites More sharing options...
willrose84 Posted October 7, 2011 Share Posted October 7, 2011 Hi i dont understand how you solved hiding the attribute box if you have colour picker active i think the site is hiding some of the info any help would be great. 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