sjohanna Posted July 20, 2010 Share Posted July 20, 2010 Hi,I tried to change the code of the Shopping-cart.tpl to include the Manufaturer in the table.So I changed the header of the table by this code: {l s='Manufacturer'} {l s='Item'} {l s='Unit price'} {l s='Qty'} {l s='Total'} And I tried to call the Manufacturer in shopping-cart-product-line.tpl in the column like this: {$product->manufacturer_name|escape:'htmlall':'UTF-8'} But, as you may have guessed... It doesn't work.Any idea?Thanks! Link to comment Share on other sites More sharing options...
rocky Posted July 20, 2010 Share Posted July 20, 2010 Try using $product.manufacturer_name instead of $product->manufacturer_name. Link to comment Share on other sites More sharing options...
sjohanna Posted July 20, 2010 Author Share Posted July 20, 2010 Thanks!But it didn't work I wonder if I need to change a PHP file to get the Manufacturer name before displaying it. What do you think? Link to comment Share on other sites More sharing options...
rocky Posted July 20, 2010 Share Posted July 20, 2010 I checked the code and the manufacturer name isn't passed in to the shopping cart. You'd have to modify the SQL query in the getProducts() function in classes/Cart.php and add the following to the list of left joins: LEFT JOIN `'._DB_PREFIX_.'manufacturer` m ON (m.`id_manufacturer` = p.`id_manufacturer`) then add the following to the SELECT: m.`name` as manufacturer_name Then my code above should work. 1 Link to comment Share on other sites More sharing options...
sjohanna Posted July 20, 2010 Author Share Posted July 20, 2010 It works!!!!!I can't believe it...I have been asking so many questions since I started this first website with Prestashop and that's the first one being solved Thanks a million! Link to comment Share on other sites More sharing options...
sjohanna Posted July 21, 2010 Author Share Posted July 21, 2010 By the way... Would you be able to help me for my other problem: http://www.prestashop.com/forums/viewthread/61907/#271538It is really important for the client that I manage to display the subcategories on these pages...Maybe I just need a tip or something. I suppose I have to change something in the SELECT here as well, no?Thanks. Link to comment Share on other sites More sharing options...
kosmolog Posted September 25, 2011 Share Posted September 25, 2011 Try using $product.manufacturer_name instead of $product->manufacturer_name. Link to comment Share on other sites More sharing options...
kosmolog Posted September 25, 2011 Share Posted September 25, 2011 Please help as it will in version 1.4.4 of the manufacturer placed in the shopping cart shopping-cart-product-line.tpl Link to comment Share on other sites More sharing options...
babu_babu Posted November 9, 2011 Share Posted November 9, 2011 I checked the code and the manufacturer name isn't passed in to the shopping cart. You'd have to modify the SQL query in the getProducts() function in classes/Cart.php and add the following to the list of left joins: LEFT JOIN `'._DB_PREFIX_.'manufacturer` m ON (m.`id_manufacturer` = p.`id_manufacturer`) then add the following to the SELECT: m.`name` as manufacturer_name Then my code above should work. Thanks! Please help as it will in version 1.4.4 of the manufacturer placed in the shopping cart shopping-cart-product-line.tpl It worked for me on 1.4.3 Link to comment Share on other sites More sharing options...
César Posted November 28, 2012 Share Posted November 28, 2012 is the same for 1.5.2? I don't find LEFTJOINs in getProducts(). Link to comment Share on other sites More sharing options...
Mezza Posted April 22, 2013 Share Posted April 22, 2013 It is! Very helpful, thanks a lot rocky! Link to comment Share on other sites More sharing options...
Hirosaki Posted November 29, 2014 Share Posted November 29, 2014 I checked the code and the manufacturer name isn't passed in to the shopping cart. You'd have to modify the SQL query in the getProducts() function in classes/Cart.php and add the following to the list of left joins: LEFT JOIN `'._DB_PREFIX_.'manufacturer` m ON (m.`id_manufacturer` = p.`id_manufacturer`) then add the following to the SELECT: m.`name` as manufacturer_name Then my code above should work. Hello, I need to display the manufacturer (brand) name in my cart too. I am running PS 1.6.0.9 and can't find the right getProducts() function, nor where to place all that code above. Looks like the code isn't the same since last versions of prestashop. Can somebody help me please? It's been my 15th post with still no answer anywhere on that forum.... Thanks ! Link to comment Share on other sites More sharing options...
Hirosaki Posted December 1, 2014 Share Posted December 1, 2014 Up! Anybody can help? Link to comment Share on other sites More sharing options...
Stanleyek Posted August 4, 2015 Share Posted August 4, 2015 Same problem here.. I think it is solution for older prestashops. 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