Page 1 of 1
Brand / Manufacturer name
Posted: Thu Jul 21, 2016 11:18 pm
by Ladi
Hello,
Is any possibility for Brand / Manufacturer name to be displayed in products list (latest.tpl) on homepage and product category list.
I`m not really familiar with OC and PHP. Any kind of help will be appreciated.
Example in attachment.
Thanks!
Re: Brand / Manufacturer name
Posted: Thu Jul 21, 2016 11:33 pm
by straightlight
Welcome to Opencart forum.
In catalog/controller/module/latest.php file,
find:
add above:
Code: Select all
$product_info = $this->model_catalog_product->getProduct($result['product_id']);
Then, find:
add below:
Code: Select all
'manufacturer' => html_entity_decode($product_info['manufacturer'], ENT_QUOTES, 'UTF-8'),
Then, in your catalog/view/theme/<your_theme>/template/module/latest.tpl file,
you can use:
Code: Select all
<?php echo $product['manufacturer']; ?>
wherever you see fit.
Note: The demonstration above is only for demonstration purposes since Opencart does not recommend to alter core files. I would suggest to read:
http://docs.opencart.com for more information. Also, you can visit:
http://www.vqmod.com to use XML files and also OCMod extensions usable from the admin - > extensions - > installer and extensions page.
Re: Brand / Manufacturer name
Posted: Fri Jul 22, 2016 7:06 pm
by Ladi
Thank you!