Post by kdsingh0@gmail.com » 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)


Posts

Joined
Fri Sep 08, 2017 8:01 pm

Post by sachin6609 » Tue Dec 05, 2017 2:45 pm

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

Active Member

Posts

Joined
Thu Jul 23, 2015 2:57 pm

Post by kdsingh0@gmail.com » 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


Posts

Joined
Fri Sep 08, 2017 8:01 pm

Post by sachin6609 » Tue Dec 05, 2017 4:33 pm

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

Active Member

Posts

Joined
Thu Jul 23, 2015 2:57 pm

Post by kdsingh0@gmail.com » Tue Dec 05, 2017 4:48 pm

here is the screenshot please find the attachment

Attachments

Untitled-1.png

Untitled-1.png (206.86 KiB) Viewed 702 times



Posts

Joined
Fri Sep 08, 2017 8:01 pm

Post by sachin6609 » Tue Dec 05, 2017 4:56 pm

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

Active Member

Posts

Joined
Thu Jul 23, 2015 2:57 pm
Who is online

Users browsing this forum: hannalord and 99 guests