Post by Ladi » Thu Jul 21, 2016 11:18 pm

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!

Attachments

Untitled-1.jpg

Homepage Example - Untitled-1.jpg (89.9 KiB) Viewed 722 times


Newbie

Posts

Joined
Thu Jul 21, 2016 10:17 pm

Post by straightlight » Thu Jul 21, 2016 11:33 pm

Welcome to Opencart forum.

In catalog/controller/module/latest.php file,

find:

Code: Select all

$data['products'][] = array(
add above:

Code: Select all

$product_info = $this->model_catalog_product->getProduct($result['product_id']);
Then, find:

Code: Select all

'thumb'       => $image,
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.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by Ladi » Fri Jul 22, 2016 7:06 pm

Thank you!

Newbie

Posts

Joined
Thu Jul 21, 2016 10:17 pm
Who is online

Users browsing this forum: No registered users and 8 guests