Page 1 of 1

opencart version category page product model code

Posted: Fri Oct 21, 2016 6:49 pm
by hassanpk
I am trying to show the product model in the category page.
I have added 'model'=> $result['model'] in the /catalog/controller/product/category.php

$data['products'][] = array(

'product_id' => $result['product_id'],

'thumb' => $image,
'name' => $result['name'],
'description' => utf8_substr(strip_tags(html_entity_decode($result['description'], ENT_QUOTES, 'UTF-8')), 0, $this->config->get('config_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),
'model' => $result['model']
);
also i have edited category.tpl
<h4 class="model"><?php echo $product['model']; ?></h4>

but category page erro show.

: Undefined index: model in
*\catalog\view\theme\*\template\product\category.tpl

Re: opencart version category page product model code

Posted: Mon Oct 24, 2016 8:33 am
by IP_CAM
Just look here, to find a solution:
viewtopic.php?f=182&t=170072&p=645653#p645254

Good Luck! ;)
Ernie

Re: opencart version category page product model code

Posted: Mon Oct 24, 2016 4:25 pm
by opencartboost
May be this link will help you :
viewtopic.php?f=190&t=149352

Re: opencart version category page product model code

Posted: Sat Nov 12, 2016 1:41 pm
by hassanpk
Thanks But My Problem solved