sshare Posted May 10, 2013 Share Posted May 10, 2013 (edited) I've been searching and trying to find a solution for this but can't seem to figure it out. I would like to do 2 things: 1. Modify the "More details" button on the product page to scroll down to the "Data sheet" (features) tab instead of the "More details" (description) tab. 2. Add an extra button (duplicate of "More details" and make that go to another tab. I can do duplicate button no problem, but it obviously still scrolls down to the "More details" tab. If any knows please let me know what to modify to have it work like I would like. Thanks in advance. Edited May 10, 2013 by sshare (see edit history) Link to comment Share on other sites More sharing options...
NemoPS Posted May 10, 2013 Share Posted May 10, 2013 You need some javascript knowledge. I would put that code inside product.js Locate about line 539, where this is called $('#short_description_block .button').click(function(){ $('#more_info_tab_more_info').click(); $.scrollTo( '#more_info_tabs', 1200 ); }); Now, you might want to have the other tab active, in that case you also have to add something like $('#more_info_tab_data_sheet').click(); To trigger the click event on the features tab for example. The same goes with the other button, just be sure which one you target each time Link to comment Share on other sites More sharing options...
sshare Posted May 10, 2013 Author Share Posted May 10, 2013 Hi Vekia, Thanks for answering, not sure if I misunderstood or if you misunderstood my question. It's about the tabs at the bottom of the product.tpl (more details, data sheet, atributes, etc.) The button in my theme has the same code as in the default theme: <p class="buttons_bottom_block"><a href="javascript:{ldelim}{rdelim}" class="button">{l s='More details'}</a></p> But I dont know where it's getting the code from to know what to do when people click the button. Link to comment Share on other sites More sharing options...
sshare Posted May 10, 2013 Author Share Posted May 10, 2013 You need some javascript knowledge. I would put that code inside product.js Locate about line 539, where this is called $('#short_description_block .button').click(function(){ $('#more_info_tab_more_info').click(); $.scrollTo( '#more_info_tabs', 1200 ); }); Now, you might want to have the other tab active, in that case you also have to add something like $('#more_info_tab_data_sheet').click(); To trigger the click event on the features tab for example. The same goes with the other button, just be sure which one you target each time Thanks Nemo1, I didnt see your reply when I replied to Vekia, I'll give this a go and report back. Link to comment Share on other sites More sharing options...
vekia Posted May 10, 2013 Share Posted May 10, 2013 hello it was my mistake i wrote post not where I wanted :/ sorry for that solution works like a charm :-) Link to comment Share on other sites More sharing options...
sshare Posted May 10, 2013 Author Share Posted May 10, 2013 Thanks Nemo1, I didnt see your reply when I replied to Vekia, I'll give this a go and report back. You need some javascript knowledge. I would put that code inside product.js Locate about line 539, where this is called $('#short_description_block .button').click(function(){ $('#more_info_tab_more_info').click(); $.scrollTo( '#more_info_tabs', 1200 ); }); Now, you might want to have the other tab active, in that case you also have to add something like $('#more_info_tab_data_sheet').click(); To trigger the click event on the features tab for example. The same goes with the other button, just be sure which one you target each time Thanks Nemo1, works great, would've never found it as was looking for bits of the button ID,etc. in code when scanning through the Presta files. hello it was my mistake i wrote post not where I wanted :/ sorry for that solution works like a charm :-) No problem Vekia,thanks anyways. Link to comment Share on other sites More sharing options...
vendugeek Posted December 11, 2016 Share Posted December 11, 2016 Is it possible to delete the "more détails" button ? Thank you. Link to comment Share on other sites More sharing options...
NemoPS Posted December 12, 2016 Share Posted December 12, 2016 Yes, you can just get rid of it in product.tpl Link to comment Share on other sites More sharing options...
Recommended Posts