opencart version category page product model code
Posted: Fri Oct 21, 2016 6:49 pm
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
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