teralite Posted March 18, 2015 Share Posted March 18, 2015 (edited) Hi all! I have added a manufacturer logo to all the productlists, but i cant get it in on blockbestsellers on the front page. I dont think the id_manufacturer is called in that module and i dont know how to solve this, anyone that can help me? Edit: When i look closer to it i get a few products in Bestsellers to show the manufacturer logo but on some products i get this with print_r: Notice: Undefined index: id_manufacturer in /storage/content/10/108510/led-lampor.info/public_html/tools/smarty/sysplugins/smarty_internal_templatebase.php(157) : eval()'d code on line 137 1 Notice: Undefined index: id_manufacturer in /storage/content/10/108510/led-lampor.info/public_html/tools/smarty/sysplugins/smarty_internal_templatebase.php(157) : eval()'d code on line 140 Edit 2: This is the code i use in product-list.tpl: <div id="manufacturer"> {if ($product.id_manufacturer) && $product.id_manufacturer > 0} <img src="{$img_manu_dir}{$product.id_manufacturer}-manu_small.jpg" alt="{$product.manufacturer_name|escape:'htmlall':'UTF-8'}" title="{$product.manufacturer_name|escape:'htmlall':'UTF-8'}" /> </div> Using prestashop 1.6.0.11 and created a new imagetype aswell. Edited March 18, 2015 by teralite (see edit history) Link to comment Share on other sites More sharing options...
rocky Posted March 19, 2015 Share Posted March 19, 2015 Easiest solution it to change the following at about line 263 of modules/blockbestsellers/blockbestsellers.php: if (!($result = ProductSale::getBestSalesLight((int)$params['cookie']->id_lang, 0, (int)Configuration::get('PS_BLOCK_BESTSELLERS_TO_DISPLAY')))) to: if (!($result = ProductSale::getBestSales((int)$params['cookie']->id_lang, 0, (int)Configuration::get('PS_BLOCK_BESTSELLERS_TO_DISPLAY')))) The getBestSales function includes the manufacturer ID and name, whereas the getBestSalesLight function doesn't. 1 1 Link to comment Share on other sites More sharing options...
teralite Posted March 19, 2015 Author Share Posted March 19, 2015 Thx alot, that worked and was a very easy solution =) Link to comment Share on other sites More sharing options...
winsonhee Posted January 30, 2018 Share Posted January 30, 2018 Quote The getBestSales function includes the manufacturer ID and name, whereas the getBestSalesLight function doesn't. Thanks Rocky 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