robkwal Posted July 1, 2010 Share Posted July 1, 2010 Hi all,I would like to know if it is possible when using the colour picker, to remove/disable the drop down option for colour. It seems unnecessary/messy if the colour picker is in use. Would like to know your thoughts on how this can be achieved, and weather you could create a similar selector for size. Eventually removing the drop down menus completely, allowing for a better shopping experience allowing the web site to be more interactive? Link to comment Share on other sites More sharing options...
rocky Posted July 2, 2010 Share Posted July 2, 2010 To hide the colour dropdown when the colour picker is activated, change the attributes section on line 236-253 (in PrestaShop v1.3.1) of product.tpl in your theme's directory from: {if isset($groups)} <!-- attributes --> <div id="attributes"> {foreach from=$groups key=id_attribute_group item=group} <p> <label for="group_{$id_attribute_group|intval}">{$group.name|escape:'htmlall':'UTF-8'} :</label> {assign var='groupName' value='group_'|cat:$id_attribute_group} <select name="{$groupName}" id="group_{$id_attribute_group|intval}"> 0}$('#resetImages').show('slow');{/if}"> {foreach from=$group.attributes key=id_attribute item=group_attribute} <option value="{$id_attribute|intval}"{if (isset($smarty.get.$groupName) && $smarty.get.$groupName|intval == $id_attribute) || $group.default == $id_attribute} selected="selected"{/if} title="{$group_attribute|escape:'htmlall':'UTF-8'}">{$group_attribute|escape:'htmlall':'UTF-8'}</option> {/foreach} </select> </p> {/foreach} </div> {/if} to: {if isset($groups)} <!-- attributes --> <div id="attributes"> {foreach from=$groups key=id_attribute_group item=group} <p{if $id_attribute_group == $product->id_color_default} class="hidden"{/if}> <label for="group_{$id_attribute_group|intval}">{$group.name|escape:'htmlall':'UTF-8'} :</label> {assign var='groupName' value='group_'|cat:$id_attribute_group} <select name="{$groupName}" id="group_{$id_attribute_group|intval}"> 0}$('#resetImages').show('slow');{/if}"> {foreach from=$group.attributes key=id_attribute item=group_attribute} <option value="{$id_attribute|intval}"{if (isset($smarty.get.$groupName) && $smarty.get.$groupName|intval == $id_attribute) || $group.default == $id_attribute} selected="selected"{/if} title="{$group_attribute|escape:'htmlall':'UTF-8'}">{$group_attribute|escape:'htmlall':'UTF-8'}</option> {/foreach} </select> </p> {/foreach} </div> {/if} Link to comment Share on other sites More sharing options...
robkwal Posted July 2, 2010 Author Share Posted July 2, 2010 Thanks Rocky,Helpful as ever... Any ideas on how to get the available colours to appear within the product list, to notify the customers there is more that one colour available? Link to comment Share on other sites More sharing options...
Mr Viny Posted November 13, 2010 Share Posted November 13, 2010 Helpful as ever... Any ideas on how to get the available colours to appear within the product list, to notify the customers there is more that one colour available? Did you find the way to do it? there is the same question on the French forumthanks in advance !Edit: have a look at the link above, they explain how to do. Link to comment Share on other sites More sharing options...
imps Posted May 20, 2012 Share Posted May 20, 2012 can anybody repeat rocky's code? it became weird because of forum format. Link to comment Share on other sites More sharing options...
imps Posted May 24, 2012 Share Posted May 24, 2012 bump! anyone? Link to comment Share on other sites More sharing options...
Svanhoof Posted June 29, 2012 Share Posted June 29, 2012 Anyone? Because the code doesn't work and we really need the solution :-) Link to comment Share on other sites More sharing options...
Bill Dalton Posted July 2, 2012 Share Posted July 2, 2012 lools like just one line of code changed. <!-- attributes --> Should be <!--attributes --> You could just remove that line, it is just a comment. 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