carpealexdiem Posted February 28, 2014 Share Posted February 28, 2014 (edited) Hello, I had to add an extra tab with manufacturer name,short description,description and "All products from this manufacturer" link to the product page as it was requested from my client and I'm sharing what I did to you guys. Add thos code in the file ProductController.php in /controllers/front/ : $id_lang = $this->context->language->id; $manufacturer = new Manufacturer($this->product->id_manufacturer, $id_lang); $manuf_description = $manufacturer->description; $this->context->smarty->assign('manufact_desc', $manuf_description); $id_lang = $this->context->language->id; $manufacturer = new Manufacturer($this->product->id_manufacturer, $id_lang); $manuf_name = $manufacturer->name; $this->context->smarty->assign('manufact_name', $manuf_name); $id_lang = $this->context->language->id; $manufacturer = new Manufacturer($this->product->id_manufacturer, $id_lang); $manuf_shortdesc = $manufacturer->short_description; $this->context->smarty->assign('manufact_shortdesc', $manuf_shortdesc); Add it just above: $this->context->smarty->assign(array( 'pictures' => $pictures, 'textFields' => $text_fields)); Then add the following code to the product.tpl file in your theme directory(/themes/themename/): <li><a id="more_info_tab_more_info" href="#idTab3">Manufacturer</a></li> Add it above: {if $attachments}<li><a id="more_info_tab_attachments" href="#idTab9">{l s='Download'}</a></li>{/if} And finally add this code to the same file product.tpl: <ul id="idTab3" class="rte"> <h3>{$manufact_name}{$manufact_shortdesc}</h3> <p>{$manufact_desc}<a href="{$link->getmanufacturerLink($product->id_manufacturer, $product->link_rewrite)}">View all products from {$product->manufacturer_name|escape:'htmlall':'UTF-8'}</a></p> </ul> Add it above: {if isset($attachments) && $attachments} <ul id="idTab9" class="bullet"> I attached the image of this tweak. Ciao! Edited February 28, 2014 by carpealexdiem (see edit history) 1 Link to comment Share on other sites More sharing options...
spoonxaver2 Posted March 9, 2014 Share Posted March 9, 2014 HI, thanks You for tutorial. But if i make changes in the ProductController.php, front office shop is blank :-(Where is problem, please? Thanks You for reply Prestashop version: 1.5.4 Link to comment Share on other sites More sharing options...
carpealexdiem Posted March 9, 2014 Author Share Posted March 9, 2014 HI, thanks You for tutorial. But if i make changes in the ProductController.php, front office shop is blank :-( Where is problem, please? Thanks You for reply Prestashop version: 1.5.4 You should enable debug in prestashop: go to config > defines.inc.php change the line: define('_PS_MODE_DEV_', false); to define('_PS_MODE_DEV_', true); and let me know what it says. Link to comment Share on other sites More sharing options...
Nixon_ Posted March 24, 2014 Share Posted March 24, 2014 Hello, very good, it is possible to translate this great code in ps 1.6? Thank you!! 1 Link to comment Share on other sites More sharing options...
vekia Posted March 24, 2014 Share Posted March 24, 2014 this code should work in prestashop 1.6 have you tried it? 1 Link to comment Share on other sites More sharing options...
sooroos Posted May 16, 2014 Share Posted May 16, 2014 how did you manage to have product comments as extra tab? (i use p.s 1.6) Link to comment Share on other sites More sharing options...
David Bucur Posted May 22, 2014 Share Posted May 22, 2014 Thanks man, this helped me a lot. 1 Link to comment Share on other sites More sharing options...
phenoma Posted June 11, 2014 Share Posted June 11, 2014 I've tried in 1.6 with no succes.... Link to comment Share on other sites More sharing options...
wojtaskul Posted September 9, 2014 Share Posted September 9, 2014 Can you show us how to add this tab in 1.6? Link to comment Share on other sites More sharing options...
carpealexdiem Posted September 9, 2014 Author Share Posted September 9, 2014 I'll try to make a tutorial for 1.6 as soon as possible. Link to comment Share on other sites More sharing options...
wojtaskul Posted September 9, 2014 Share Posted September 9, 2014 Thanks a lot! Link to comment Share on other sites More sharing options...
houin Posted September 13, 2014 Share Posted September 13, 2014 Thank you, very well on 1.6.06 Link to comment Share on other sites More sharing options...
frank_jarle Posted October 29, 2014 Share Posted October 29, 2014 So to my understanding this makes it possible to add multiple section in the product page? Link to comment Share on other sites More sharing options...
frank_jarle Posted November 23, 2014 Share Posted November 23, 2014 No tutorial for Prestashop 1.6.0.9 yet? 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