RCP90 Posted January 16, 2014 Share Posted January 16, 2014 (edited) Hi, I'm using 1.5.6.1 I know that I can hide the product features/specs from being displayed on a product, but I was wondering how I can hide specific features from being displayed in the product details. As it stands it is either show all or show none. I want most of them to be displayed, but some of the features are specifically for filtering purposes within the layered navigation, and do not need to be seen by the customer. For example, http://puu.sh/6mQFT.png Lets say that I do not want the 3rd feature to be displayed, is there a way to achieve this? Thank you in advance for any help or advice on this topic! Edited January 16, 2014 by RCP90 (see edit history) Link to comment Share on other sites More sharing options...
Ronaldo Perez Posted January 16, 2014 Share Posted January 16, 2014 I don't see your html code, but you can use something like this in your javascript $('li:contains("Headphone")').hide(); 1 Link to comment Share on other sites More sharing options...
RCP90 Posted January 16, 2014 Author Share Posted January 16, 2014 (edited) I don't see your html code, but you can use something like this in your javascript $('li:contains("Headphone")').hide(); Hi, And thanks for the reply! Would this code be in product.tpl in my theme ? and also although hidden will the feature still function in terms of the layered navigation filtering. Thanks again Edited January 16, 2014 by RCP90 (see edit history) Link to comment Share on other sites More sharing options...
Ronaldo Perez Posted January 16, 2014 Share Posted January 16, 2014 Hi, 2. yes, will stiil working, this is just hide some text on client side 1. not .tpl, you can add it e.g. in /themes/your_theme/js/product.js 1 Link to comment Share on other sites More sharing options...
RCP90 Posted January 16, 2014 Author Share Posted January 16, 2014 Hi, 2. yes, will stiil working, this is just hide some text on client side 1. not .tpl, you can add it e.g. in /themes/your_theme/js/product.js Hi, I have 2 files, product.js and productstab.js. I have taken a look at product.js, but am not entirely sure where to add that code. The 2 files https://www.dropbox.com/sh/788wr45ug7xrvag/6iadPThr21 If you have a chance maybe you could take a quick look and suggest where it should go? Thanks again for your help, I appreciate it. Link to comment Share on other sites More sharing options...
Ronaldo Perez Posted January 16, 2014 Share Posted January 16, 2014 (edited) I add code for "default" html layout in line 550 in product.js https://www.dropbox.com/s/63916s3zbs3c7iw/product.js but, it's bad idea for perfomance use :contains selector without ID, need to see your html code p.s. show your url or product.tpl Edited January 16, 2014 by SergeyH (see edit history) 1 Link to comment Share on other sites More sharing options...
RCP90 Posted January 16, 2014 Author Share Posted January 16, 2014 I sent you URL, but do not worry if it is too much time. Thanks again Link to comment Share on other sites More sharing options...
Ronaldo Perez Posted January 16, 2014 Share Posted January 16, 2014 you sent PM without link) 1 Link to comment Share on other sites More sharing options...
RCP90 Posted January 16, 2014 Author Share Posted January 16, 2014 Resent, Sorry Link to comment Share on other sites More sharing options...
Ronaldo Perez Posted January 16, 2014 Share Posted January 16, 2014 redownload product.js from my dropbox. I added code for your Data Sheet tab and line - Battery Voltage, you can change text on any othe in 550 line 1 Link to comment Share on other sites More sharing options...
vekia Posted January 16, 2014 Share Posted January 16, 2014 hello in fact if you will hide it with javascript it will be still visible in page contents you want to hide it permanently, or only from view? if second option, this solution will be enough 1 Link to comment Share on other sites More sharing options...
RCP90 Posted January 16, 2014 Author Share Posted January 16, 2014 (edited) hello in fact if you will hide it with javascript it will be still visible in page contents you want to hide it permanently, or only from view? if second option, this solution will be enough I just want to hide it from being viewed by the customer, just a few specific features. Thank you for your time and help Sergey, it is all working now. I appreciate it a lot Edited January 16, 2014 by RCP90 (see edit history) Link to comment Share on other sites More sharing options...
RCP90 Posted January 16, 2014 Author Share Posted January 16, 2014 I add code for "default" html layout in line 550 in product.js https://www.dropbox.com/s/63916s3zbs3c7iw/product.js but, it's bad idea for perfomance use :contains selector without ID, need to see your html code p.s. show your url or product.tpl So you think it is bad for performance? Link to comment Share on other sites More sharing options...
Ronaldo Perez Posted January 16, 2014 Share Posted January 16, 2014 So you think it is bad for performance? in last example all ok with performance, I added right code Link to comment Share on other sites More sharing options...
RCP90 Posted January 16, 2014 Author Share Posted January 16, 2014 in last example all ok with performance, I added right code So to clarify, this is the correct one: https://www.dropbox.com/s/63916s3zbs3c7iw/product.js Link to comment Share on other sites More sharing options...
Ronaldo Perez Posted January 16, 2014 Share Posted January 16, 2014 (edited) yes p.s. course, this issue can be solved and from php/tpl code (and it is a better way), but js code also works -> fast solution Edited January 16, 2014 by SergeyH (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts