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)
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)
Hiikdsingh0@gmail.com wrote: ↑Tue Dec 05, 2017 1:53 pmHi 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)
in controller have you added that line in product array or out side the product array..?
Thanks
Sachin
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
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
Hellokdsingh0@gmail.com wrote: ↑Tue Dec 05, 2017 2:52 pmhello 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
Please share the screenshot on which page you got this error
Thanks
Sachin
here is the screenshot please find the attachment
Attachments
Untitled-1.png (206.86 KiB) Viewed 2492 times
hellokdsingh0@gmail.com wrote: ↑Tue Dec 05, 2017 4:48 pmhere is the screenshot please find the attachment
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
Who is online
Users browsing this forum: No registered users and 61 guests