Jump to content

[SOLVED] Manufacturer name in product


nesakysiu
 Share

Recommended Posts

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.

Share this post


Link to post
Share on other sites

  • 4 weeks later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More