nesakysiu Posted July 26, 2010 Share Posted July 26, 2010 Hello, how to put manufacture name near product name?thanks. Link to comment Share on other sites More sharing options...
rocky Posted July 27, 2010 Share Posted July 27, 2010 Use {$product->manufacturer_name} in product.tpl and {$product.manufacturer_name} in product-list.tpl. Link to comment Share on other sites More sharing options...
nesakysiu Posted July 27, 2010 Author Share Posted July 27, 2010 no.. realy i need the blocknewproducts.tpl and blockbestsales.tpl . How to do with these? very big thanks Link to comment Share on other sites More sharing options...
nesakysiu Posted July 27, 2010 Author Share Posted July 27, 2010 please help :/ Link to comment Share on other sites More sharing options...
rocky Posted July 28, 2010 Share Posted July 28, 2010 You can use {$product.manufacturer_name} in modules/blocknewproducts/blocknewproducts.tpl. Unfortunately, the variable is not accessible in the best sellers block. You'll need to modify the query in the getBestSalesLight function on line 107 of classes/ProductSale.php (in PrestaShop v1.3.1) to include the manufacturer name. Add the following to the left joins: LEFT JOIN `'._DB_PREFIX_.'manufacturer` m ON (m.`id_manufacturer` = p.`id_manufacturer`) and the following to the SELECT list: m.`name` AS manufacturer_name Then you'll be able to use {$product.manufacturer_name} in modules/blockbestsellers/blockbestsellers.tpl too. Link to comment Share on other sites More sharing options...
robkwal Posted August 20, 2010 Share Posted August 20, 2010 Handy piece of code! Thanks! 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