Jump to content

Help with Prestashop theme


Recommended Posts

Just wondering if someone can help me - I have purchased the following theme: http://www.templatemonster.com/demo/34909.html Basically on the HOME page and underneath 'Featured products' I wanted to add some text and use the following jquery tab structure from this page: http://www.templatemonster.com/demo/34909.html and underneath the product i.e. where it says; 'More info' and 'Datasheet'.

I can see that this is as per the following code:

<div id="more_info_block" class="clear">
<ul id="more_info_tabs" class="idTabs idTabsShort">
<li>
<a id="more_info_tab_more_info" class="selected" href="#idTab1">More info</a>
</li>
<li>
<a id="more_info_tab_data_sheet" href="#idTab2">Data sheet</a>
</li>
</ul>
<div id="more_info_sheets" class="sheets align_justify">
<div id="idTab1" class="">
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc id elementum orci. Quisque lorem ante, elementum ac congue vel, porttitor eu ipsum. Mauris porttitor consectetur aliquet. Suspendisse id arcu nulla. Praesent mi erat, laoreet eu aliquet sed, consectetur ut nibh. Cras sit amet dui et justo molestie convallis non id tellus. Nunc sed sem quis tellus aliquet blandit ac id magna. Cras non nibh nec velit lacinia congue malesuada vel erat.</p>
</div>

 

Therefore I wondered if anyone could advise me on where I can place this so that it is displayed on the HOME page as I see the HOME page is made up of various modules, but not sure where I can add this?

Thanks

Link to comment
Share on other sites

Hi Olly,

 

Are you just wanting some general tabs, mimicking those on the product page with some custom information?

 

It looks like Prestashop uses a jQuery plugin called idTabs by Sean Catchpole. The script is included in the <head> of product pages but not on the home/index page.

 

You can override this though in the IndexController (read Rocky's post on overriding controllers for more info).

 

I haven't tested this but try the following:

 

Create a new file /overrides/controllers/IndexController.php and add:

class IndexController extends IndexControllerCore
{
public function setMedia()
{
 parent::setMedia();
 Tools::addJS(_PS_JS_DIR_.'jquery/jquery.idTabs.modified.js');
}
}

 

This should add the idTabs javascript to your <head>, and make the script available to your home page. You can then use the tabs following the instructions on Sean's website.

 

Hope that helps, let me know how it goes.

 

Mark

Link to comment
Share on other sites

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...