Post by alvin20031010 » Fri Feb 27, 2015 2:21 am

Does anybody know how to display manufacture name on Product grid?



Thanks alot.
Last edited by alvin20031010 on Fri Feb 27, 2015 4:48 pm, edited 1 time in total.

New member

Posts

Joined
Fri Feb 06, 2015 4:36 am

Post by alvin20031010 » Fri Feb 27, 2015 4:38 pm

Any help is much appreciated, for what i did is listed below, and just wondering if there is anything i missed?

1. Find : catalog/controller/product/category.php
Add: 'manufacturer' => $result['manufacturer'],

Code: Select all

$data['products'][] = array(
					'product_id'  => $result['product_id'],
					'thumb'       => $image,
					'name'        => $result['name']
					'manufacturer'   => $result['manufacturer'],
					'description' => utf8_substr(strip_tags(html_entity_decode($result['description'], ENT_QUOTES, 'UTF-8')), 0, $this->config->get('config_product_description_length')) 

2. Find : catalog/view/theme/journal2/template/product/category.tpl
Add: <div class="manufacturer"><?php echo $product['manufacturer']; ?>

Code: Select all

 <div class="product-details">
      
	<div class="caption">
		<div class="manufacturer"><?php echo $product['manufacturer']; ?> </div>
		<h4 class="name"><a href="<?php echo $product['href']; ?>"><?php echo $product['name']; ?></a></h4>
                <p class="description"><?php echo $product['description']; ?></p>
3. Refresh my browser
shown: Notice undefined index "manufacturer" ....catalog/view/theme/journal2/template/product/category.tpl......etc

New member

Posts

Joined
Fri Feb 06, 2015 4:36 am

Post by cyberninja » Sun Feb 28, 2016 8:24 pm

did you manage to fix it?

Newbie

Posts

Joined
Thu Dec 10, 2015 9:11 pm

Post by igalsm » Tue Nov 08, 2016 10:06 am

Does anybody know how to do that?
I am getting the same error

New member

Posts

Joined
Tue Sep 27, 2016 4:26 am

Post by IP_CAM » Tue Nov 08, 2016 10:41 am

Add manufacturer Field to category view Products:
viewtopic.php?f=182&t=170072&p=645653#p645254

Tested with OpenCart v-2.2.x
can be seen here:
http://www.jti.li

Good Luck ! ;)
Ernie

For Sale: Top URL's, including an OpenCart V-Pro Shop!
A wide range of matching Designs can be seen here: http://www.opencart.li
For Information on URL's offered, please contact me at: jti@jacob.ch
Hundreds of Mods in 380+ Repositories for OC v.1.5.x - v.2.3.x
to be found on my Github Site: https://github.com/IP-CAM
Image


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by igalsm » Mon Nov 14, 2016 12:30 am

hi you can use this xml:

<?xml version="1.0" encoding="UTF-8" ?>
<modification>
<id><![CDATA[Manufacturer Name in Category]]></id>
<version><![CDATA[1.0]]></version>
<vqmver><![CDATA[2.5.1]]></vqmver>
<author><![CDATA[Ernie - IP_CAM]]></author>

<file name="catalog/controller/product/category.php">
<operation error="log">
<search position="after"><![CDATA[$result['name'],]]></search>
<add><![CDATA[
'manufacturer' => $result['manufacturer'],
]]></add>
</operation>
</file>

<file name="catalog/view/theme/*/template/product/category.tpl">
<operation error="log">
<search position="after"><![CDATA[<div class="caption">]]></search>
<add><![CDATA[
<div>Manufacturer: <?php echo $product['manufacturer']; ?></div>
]]></add>
</operation>
</file>
</modification>

New member

Posts

Joined
Tue Sep 27, 2016 4:26 am

Post by drestis » Tue Nov 06, 2018 4:34 pm

Works fine in OC2.3 Journal 2.16. Thanx.
!!! Remember make refresh in Home / Modifications ;)

<!--- No comments --->


Newbie

Posts

Joined
Sat Oct 20, 2018 5:08 am
Location - Greece
Who is online

Users browsing this forum: No registered users and 30 guests