Xinito87 Posted February 3, 2014 Share Posted February 3, 2014 Hi! I want to show the MANUFACTURAR DESCRIPTION nest to the product description and DATA SHEET tabs in the product page. I'm trying to do it but I don't find the way to solve it. Anyone has done it or has an idea about the line of code that I have to introduce? I'm thinking about modify product.tpl , but I'm not sure. If you can help me, my version is 1.5.6 Thanks. Link to comment Share on other sites More sharing options...
tarek.fellah Posted February 3, 2014 Share Posted February 3, 2014 (edited) You should get product manufacturer in product controller assign it and view it the tpl. $id_lang = $this->context->language->id; $manufacturer = new Manufacturer($this->product->id_manufacturer, $id_lang); $manuf_description = $manufacturer->description[$id_lang]; $this->context->smarty->assign('manufact_desc', $manuf_description); And in the tpl should call your manufacturer description as {$manufact_desc} Edited February 3, 2014 by tarek.fellah (see edit history) 1 Link to comment Share on other sites More sharing options...
Xinito87 Posted February 3, 2014 Author Share Posted February 3, 2014 Can you help me with the code that I have to implement? I'm junior and I don't know how to work with Prestashop code a lot. Thanks. Link to comment Share on other sites More sharing options...
tarek.fellah Posted February 3, 2014 Share Posted February 3, 2014 I edited my answer above. Link to comment Share on other sites More sharing options...
tarek.fellah Posted February 3, 2014 Share Posted February 3, 2014 You should override the ProductController.php file Link to comment Share on other sites More sharing options...
vekia Posted February 3, 2014 Share Posted February 3, 2014 you want to create separate tab or add this description just to "more info" tab ? Link to comment Share on other sites More sharing options...
Xinito87 Posted February 3, 2014 Author Share Posted February 3, 2014 Yes, I want to show this Manufacturers description as a TAB. I tryed to Copy and Paste the code in ProductController.php and call the function in Product.TPL but it doesn't work for me. I don't know if I'm missing something, if it's not annoying, if someone can exdplain step by step what I have todo, I think it's not complicated a lot but I'm mnore designer no than programmer and I need to solve it. Thanks a lot!! Link to comment Share on other sites More sharing options...
Xinito87 Posted February 4, 2014 Author Share Posted February 4, 2014 Hi Tarek, Now appear this line in my website : $id_lang = $this->context->language->id; $manufacturer = new Manufacturer($this->product->id_manufacturer, $id_lang); $manuf_description = $manufacturer->description[$id_lang]; $this->context->smarty->assign('manufact_desc', $manuf_description); http://topminerales.com/en/jewelry-/20-collar-de-hematite-cuerda.html I don't know how to make it disappear.... :s Please help, thanks. Link to comment Share on other sites More sharing options...
tarek.fellah Posted February 4, 2014 Share Posted February 4, 2014 (edited) Hi, You should add the php code in iniContent function in ProductController.php, i use Prestashop 1.5.4, in my case i can insert the code in line 207 before this code: $this->context->smarty->assign(array( 'pictures' => $pictures, 'textFields' => $text_fields)); try to change and let me know the result. Edited February 4, 2014 by tarek.fellah (see edit history) Link to comment Share on other sites More sharing options...
Xinito87 Posted February 4, 2014 Author Share Posted February 4, 2014 Hi Tarek, It doesn't work for me, if you can check this link you will se that now appear this text : $id_lang = $this->context->language->id; $manufacturer = new Manufacturer($this->product->id_manufacturer, $id_lang); $manuf_description = $manufacturer->description[$id_lang]; $this->context->smarty->assign('manufact_desc', $manuf_description); http://topminerales.com/en/jewelry-/20-collar-de-hematite-cuerda.html If you can specify which files I have to modify and where I have to introduce the codes that you are sending to me, because I can't find the way to make it work now... I'm beginner programmer. Thanks. Link to comment Share on other sites More sharing options...
tarek.fellah Posted February 4, 2014 Share Posted February 4, 2014 Hi, You should add the php code in iniContent function in ProductController.php, i use Prestashop 1.5.4, in my case i can insert the code in line 207 before this code: $this->context->smarty->assign(array( 'pictures' => $pictures, 'textFields' => $text_fields)); try to change and let me know the result. You don't read this post?, you shoud put the code $id_lang = $this->context->language->id; $manufacturer = new Manufacturer($this->product->id_manufacturer, $id_lang); $manuf_description = $manufacturer->description[$id_lang]; $this->context->smarty->assign('manufact_desc', $manuf_description); in /controllers/ProductController.php at line 207 Link to comment Share on other sites More sharing options...
Xinito87 Posted February 4, 2014 Author Share Posted February 4, 2014 I tryed tu put the code where you told me, and it's not working. Now I have removed the code... because it was not working, and keep appearing this on my site :s $id_lang = $this->context->language->id; $manufacturer = new Manufacturer($this->product->id_manufacturer, $id_lang); $manuf_description = $manufacturer->description[$id_lang]; $this->context->smarty->assign('manufact_desc', $manuf_description); Link to comment Share on other sites More sharing options...
tarek.fellah Posted February 4, 2014 Share Posted February 4, 2014 I tryed tu put the code where you told me, and it's not working. Now I have removed the code... because it was not working, and keep appearing this on my site :s $id_lang = $this->context->language->id; $manufacturer = new Manufacturer($this->product->id_manufacturer, $id_lang); $manuf_description = $manufacturer->description[$id_lang]; $this->context->smarty->assign('manufact_desc', $manuf_description); try with this code, i tested it and it works $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); Don't forget to put {$manufact_desc} in your Product.tpl file Link to comment Share on other sites More sharing options...
Xinito87 Posted February 4, 2014 Author Share Posted February 4, 2014 I think now is OK! I introduced ( {$manufact_desc} ) like this : <h6> {l s='Manufacturer'} </h6> <div id="idTab22" class="rte">{$manufact_desc}</div> {/if} So I have the title and it implemented in the TAB. Thanks! Link to comment Share on other sites More sharing options...
lovemyseo Posted March 13, 2014 Share Posted March 13, 2014 try with this code, i tested it and it works $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); Don't forget to put {$manufact_desc} in your Product.tpl file Hi I am not able to display MANUFACTURAR tab on product detail page its displaying fine on prestashop 1.4.9 which is http://biophoretics.com/biochemicals-a-z/119-acarbose-cas-56180-94-0-serva.html nut in prestashop 1.5.4 I am unable to display it I tried to copy and paste the above code you mentioned there are 2 files in root directory /public_html/controllers/front/ProductController.php /public_html/newbiosite/controllers/front/ProductController.php Which file should i edit ? http://goelectrophoresis.com/newbiosite/biochemicals-a-z/119-acarbose-cas-56180-94-0-serva.html this is version 1.5.4 Link to comment Share on other sites More sharing options...
vekia Posted March 14, 2014 Share Posted March 14, 2014 it's a code for product.tpl file, not for controllers you modified controllers/ or what? Link to comment Share on other sites More sharing options...
lovemyseo Posted March 14, 2014 Share Posted March 14, 2014 it's a code for product.tpl file, not for controllers you modified controllers/ or what? Where this product.tpl file is located ? Link to comment Share on other sites More sharing options...
vekia Posted March 14, 2014 Share Posted March 14, 2014 it's a part of your theme directory path, for default theme, looks like: themes/default/product.tpl Link to comment Share on other sites More sharing options...
lovemyseo Posted March 15, 2014 Share Posted March 15, 2014 it's a part of your theme directory path, for default theme, looks like: themes/default/product.tpl And could you please tell me the code which I should put in product.tpl to make sire manufacturer tab display on product detail page Link to comment Share on other sites More sharing options...
vekia Posted March 15, 2014 Share Posted March 15, 2014 let's clarify what you already did you attached manufacturers_desc to the smarty array in controller? Link to comment Share on other sites More sharing options...
lovemyseo Posted March 15, 2014 Share Posted March 15, 2014 let's clarify what you already did you attached manufacturers_desc to the smarty array in controller? This is new version 1.5.4 http://goelectrophoresis.com/newbiosite/blotting-instruments/174-tv100-ebk-mini-electroblotter.html and old version has tab below please check http://biophoretics.com/blotting-instruments/174-tv100-ebk-mini-electroblotter.html I want same Manufacturer tab to be displayed as it is displaying on the bottom section with downloads and other tabs I hope I clarify now Link to comment Share on other sites More sharing options...
lovemyseo Posted March 15, 2014 Share Posted March 15, 2014 try with this code, i tested it and it works $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); Don't forget to put {$manufact_desc} in your Product.tpl file Where should I put {$manufact_desc} in my product.tpl file ? Link to comment Share on other sites More sharing options...
lovemyseo Posted March 16, 2014 Share Posted March 16, 2014 I think now is OK! I introduced ( {$manufact_desc} ) like this : <h6> {l s='Manufacturer'} </h6> <div id="idTab22" class="rte">{$manufact_desc}</div> {/if} So I have the title and it implemented in the TAB. Thanks! Can you show me original product.tpl code which worked for you? Link to comment Share on other sites More sharing options...
vekia Posted March 16, 2014 Share Posted March 16, 2014 still no answer to my question you attached manufacturers_desc to the smarty array in controller? Link to comment Share on other sites More sharing options...
lovemyseo Posted March 16, 2014 Share Posted March 16, 2014 still no answer to my question I do not understood what you are talking about could you please copy code here or on your website which needs to be copy and pasted on specific file I am not tech person please explain above a little Link to comment Share on other sites More sharing options...
lovemyseo Posted March 16, 2014 Share Posted March 16, 2014 still no answer to my question You just deleted you reply ? Link to comment Share on other sites More sharing options...
vekia Posted March 16, 2014 Share Posted March 16, 2014 You just deleted you reply ? i posted it in wrong post, it was related to tinymce editor in cateogry description page, my mistake sorry but i already replied it correct forum thread Link to comment Share on other sites More sharing options...
lovemyseo Posted March 16, 2014 Share Posted March 16, 2014 (edited) i posted it in wrong post, it was related to tinymce editor in cateogry description page, my mistake sorry but i already replied it correct forum thread No Problem any help with manufacturer tab on product detail page for 1.5.4? Edited March 16, 2014 by lovemyseo (see edit history) Link to comment Share on other sites More sharing options...
lovemyseo Posted March 16, 2014 Share Posted March 16, 2014 (edited) Thanks need urgent help with manufacturer tab please Edited March 16, 2014 by lovemyseo (see edit history) Link to comment Share on other sites More sharing options...
lovemyseo Posted March 16, 2014 Share Posted March 16, 2014 still no answer to my question NO i did not attach it Link to comment Share on other sites More sharing options...
lovemyseo Posted March 16, 2014 Share Posted March 16, 2014 let's clarify what you already did you attached manufacturers_desc to the smarty array in controller? No I did nto attached manufacturer des to the smarty array in controller Link to comment Share on other sites More sharing options...
vekia Posted March 17, 2014 Share Posted March 17, 2014 ok so go to productCOntroller.php (controllers/front/productController.php) and in init function add this code: $id_lang = $this->context->language->id; $manufacturer = new Manufacturer($this->product->id_manufacturer, $id_lang); $manuf_description = $manufacturer->description[$id_lang]; $this->context->smarty->assign('manufact_desc', $manuf_description); then in product.tpl (located in your theme directory) you will be able to use {$manufact_desc} variable to display manufacturer description Link to comment Share on other sites More sharing options...
lovemyseo Posted March 17, 2014 Share Posted March 17, 2014 ok so go to productCOntroller.php (controllers/front/productController.php) and in init function add this code: $id_lang = $this->context->language->id; $manufacturer = new Manufacturer($this->product->id_manufacturer, $id_lang); $manuf_description = $manufacturer->description[$id_lang]; $this->context->smarty->assign('manufact_desc', $manuf_description); then in product.tpl (located in your theme directory) you will be able to use {$manufact_desc} variable to display manufacturer description Done great help now one questions is it possible to import 1.4.9 product database to 1.5.4? Link to comment Share on other sites More sharing options...
lovemyseo Posted March 17, 2014 Share Posted March 17, 2014 ok so go to productCOntroller.php (controllers/front/productController.php) and in init function add this code: $id_lang = $this->context->language->id; $manufacturer = new Manufacturer($this->product->id_manufacturer, $id_lang); $manuf_description = $manufacturer->description[$id_lang]; $this->context->smarty->assign('manufact_desc', $manuf_description); then in product.tpl (located in your theme directory) you will be able to use {$manufact_desc} variable to display manufacturer description But this is not displaying the option to select manufacturer on product edit page on admin just like I have on 1.4.9 can we display manufacturer drop down on admin as well? Link to comment Share on other sites More sharing options...
lovemyseo Posted March 17, 2014 Share Posted March 17, 2014 ok so go to productCOntroller.php (controllers/front/productController.php) and in init function add this code: $id_lang = $this->context->language->id; $manufacturer = new Manufacturer($this->product->id_manufacturer, $id_lang); $manuf_description = $manufacturer->description[$id_lang]; $this->context->smarty->assign('manufact_desc', $manuf_description); then in product.tpl (located in your theme directory) you will be able to use {$manufact_desc} variable to display manufacturer description Hi could you please explain how can I use {$manufact_desc} variable in product.tpl file Link to comment Share on other sites More sharing options...
vekia Posted March 18, 2014 Share Posted March 18, 2014 open product.tpl page and just paste this: {$manufact_desc} there, where you want to display description you know something about product.tpl structure? Link to comment Share on other sites More sharing options...
garyjj127 Posted February 12, 2015 Share Posted February 12, 2015 I know this is an old thread, But I've just tried this myself and it works, except it doesn't seem to get past the first character of the description! For example, the manufacturer description html is something like this: <p>Etnies have been making quality footwear since ...</p> All that appears on the page is "p" ! I wondered if it was someting to do with the html code in the description, so changed the P tag to an H1 tag, and sure enough... all I get is an "H"!! Any ideas why? 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