Jump to content

Accessories flydown button


Recommended Posts

What I am trying to achieve is to have a button just like the "More details" but one called "Accessories" that flys down the bottom of the page and displays the related Accessories tab.

I would of thought that you could look at the more details button, duplicate it and change the ID of the div layer you want to display but just cant get my head around how to it works.

Im pretty sure the tab situation uses jquery but im not sure?

Has anyone done something similar or could explain how I could achieve this?

Regards

Mike

Link to comment
Share on other sites

OK, heres how i did it in the end.

that file that controls the tabs and sliding effects is:

\themes\prestashop\js\product.js


1) add the button to product.tpl wherever in the position you would like it to appear.







2) add code to the js file that controls the tabs 'product.js' after line 274.

    //catch the click for "accessories" button
   $('div#accessoriesbutton a.buttonacc').click(function(){
       $('#more_info_tab_accessories').click();
       $.scrollTo( '#more_info_tabs', 1200 );
   });

Link to comment
Share on other sites

  • 1 month later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...