Page 1 of 1

How to show Brand name (Manufacturer) before product tittle in OC-Version 2.3.0.2

Posted: Tue Dec 05, 2017 1:53 pm
by kdsingh0@gmail.com
Hi Everyone,
I am using OC-Version 2.3.0.2. I want to show Brand name under product image and before product tittle at everywhere (Category pages, Bestseller, latest products...etc.)
How can I do this? when i tried this-
add this line in (controller/product/category.php)
'manufacturer' => $result['manufacturer'],
and also add this (template/product/category.tpl)
<div>Manufacturer: <?php echo $product['manufacturer']; ?></div>

getting an error like- (Notic: Undefined index: manufacturer in www.xxxxx.com/categoryxyz.tpl)

Re: How to show Brand name (Manufacturer) before product tittle in OC-Version 2.3.0.2

Posted: Tue Dec 05, 2017 2:45 pm
by sachin6609
kdsingh0@gmail.com wrote:
Tue Dec 05, 2017 1:53 pm
Hi Everyone,
I am using OC-Version 2.3.0.2. I want to show Brand name under product image and before product tittle at everywhere (Category pages, Bestseller, latest products...etc.)
How can I do this? when i tried this-
add this line in (controller/product/category.php)
'manufacturer' => $result['manufacturer'],
and also add this (template/product/category.tpl)
<div>Manufacturer: <?php echo $product['manufacturer']; ?></div>

getting an error like- (Notic: Undefined index: manufacturer in www.xxxxx.com/categoryxyz.tpl)
Hii

in controller have you added that line in product array or out side the product array..?

Thanks

Sachin

Re: How to show Brand name (Manufacturer) before product tittle in OC-Version 2.3.0.2

Posted: Tue Dec 05, 2017 2:52 pm
by kdsingh0@gmail.com
hello sachin,
Thanks for your reply
I added that line inside the product array
here is the code
$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($this->config->get('config_theme') . '_product_description_length')) . '..',
'price' => $price,
'special' => $special,
'tax' => $tax,
'minimum' => $result['minimum'] > 0 ? $result['minimum'] : 1,
'rating' => $result['rating'],
'href' => $this->url->link('product/product', 'path=' . $this->request->get['path'] . '&product_id=' . $result['product_id'] . $url)
);
Thank you

Re: How to show Brand name (Manufacturer) before product tittle in OC-Version 2.3.0.2

Posted: Tue Dec 05, 2017 4:33 pm
by sachin6609
kdsingh0@gmail.com wrote:
Tue Dec 05, 2017 2:52 pm
hello sachin,
Thanks for your reply
I added that line inside the product array
here is the code
$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($this->config->get('config_theme') . '_product_description_length')) . '..',
'price' => $price,
'special' => $special,
'tax' => $tax,
'minimum' => $result['minimum'] > 0 ? $result['minimum'] : 1,
'rating' => $result['rating'],
'href' => $this->url->link('product/product', 'path=' . $this->request->get['path'] . '&product_id=' . $result['product_id'] . $url)
);
Thank you
Hello

Please share the screenshot on which page you got this error

Thanks

Sachin

Re: How to show Brand name (Manufacturer) before product tittle in OC-Version 2.3.0.2

Posted: Tue Dec 05, 2017 4:48 pm
by kdsingh0@gmail.com
here is the screenshot please find the attachment

Re: How to show Brand name (Manufacturer) before product tittle in OC-Version 2.3.0.2

Posted: Tue Dec 05, 2017 4:56 pm
by sachin6609
kdsingh0@gmail.com wrote:
Tue Dec 05, 2017 4:48 pm
here is the screenshot please find the attachment
hello

I think its your home page and this product may be you have set in feature or latest or bestseller module Right.???

Please share the url plz

Thanks

Sachin