thalloderma Posted September 9, 2016 Share Posted September 9, 2016 Hello, Is it possible to hide attributes in the product page, but still be used in the filter? Thank you! Link to comment Share on other sites More sharing options...
thalloderma Posted September 9, 2016 Author Share Posted September 9, 2016 Thank you, but i don't know which code and how should i change it. Link to comment Share on other sites More sharing options...
thalloderma Posted September 9, 2016 Author Share Posted September 9, 2016 Someone? Link to comment Share on other sites More sharing options...
rocky Posted September 12, 2016 Share Posted September 12, 2016 You can change the following on line 342 of product.tpl (in the default PrestaShop v1.6.1.7 theme) from: <fieldset class="attribute_fieldset"> to: <fieldset class="attribute_fieldset"{if $id_attribute_group == 1} style="display: none"{/if}> Change 1 to the ID of the attribute group you want to hide from the product page. 1 Link to comment Share on other sites More sharing options...
thalloderma Posted September 12, 2016 Author Share Posted September 12, 2016 Than you! I will try this! Link to comment Share on other sites More sharing options...
thalloderma Posted September 15, 2016 Author Share Posted September 15, 2016 That helped me! Thank you! 1 Link to comment Share on other sites More sharing options...
Celsi Posted December 6, 2018 Share Posted December 6, 2018 (edited) On 9/12/2016 at 5:46 AM, rocky said: <fieldset class="attribute_fieldset"> to: <fieldset class="attribute_fieldset"{if $id_attribute_group == 1} style="display: none"{/if}> Is it some way how to add more id attribute? I´m trying == "1","2" / ´1´,´2´ / 1,2 / 1;2 / etc. Please help Edited December 6, 2018 by Celsi (see edit history) Link to comment Share on other sites More sharing options...
rocky Posted December 7, 2018 Share Posted December 7, 2018 Try: {if $id_attribute_group == 1 || $id_attribute_group == 2} Add more || statements as needed. Link to comment Share on other sites More sharing options...
Celsi Posted December 7, 2018 Share Posted December 7, 2018 7 hours ago, rocky said: Try: {if $id_attribute_group == 1 || $id_attribute_group == 2} Add more || statements as needed. its working, thank you rocky! Link to comment Share on other sites More sharing options...
siomosp Posted July 6, 2019 Share Posted July 6, 2019 Hi. where i have to put the code at PS 1.7.5.2 Link to comment Share on other sites More sharing options...
spc Posted May 26, 2021 Share Posted May 26, 2021 (edited) On 7/6/2019 at 12:02 PM, siomosp said: Hi. where i have to put the code at PS 1.7.5.2 Did you manage to find out to hide the attributes in 1.7.5 I add this code in my /Theme/templates/catalog/_partials/product-variants.tpl right under {foreach from=$groups key=id_attribute_group item=group}. {if $group.attributes|@count && $id_attribute_group != 4} 4 is the attributes nr i whant to remove from the product page. And you need to add one more {/if} to close the if code. Edited May 26, 2021 by spc (see edit history) 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