I am using Opencart Version 2.0.3.1 and the Journal 2.5.4 theme.
I want to display model number/reference on category grid and list view under product image and description.
I wondered if this is possible?
Thanks in advance

Code: Select all
$data['products'][] = array();
Code: Select all
'model' => $result['model'],
Freelance Opencart 1.5.x and 2.x Developer - Available For Hire
Latest Opencart 2 Project --> http://www.falcon-rangecookers.co.uk
Thank you very much for your helpKenberne1965 wrote:Anything is possible
Im not sure how advanced you are? but you would need to edit the catalog/controller/product/category.php file and look for theand insertCode: Select all
$data['products'][] = array();
after the product_id variable assignment.Code: Select all
'model' => $result['model'],
it can then be accessed in the category.tpl file as
$product['model'] anywhere after the $products foreach statement.
Hope that Helps
http://www.viethemes.com - OpenCart turtorials, news, tips and stricks, extension
Our extensions:
Visual Theme Editor - Powerful tool for customizing style of any theme visually
Live Theme Editor - Customize layout, colors, backgrounds, fonts of the default theme
Theme Animation - Animation Editor for any theme
Extra Positions PRO, Custom JavaScript, Custom CSS and others
VQmod is great and it is the way to do it properly, but its also good to know how the code worksviethemes wrote:I have made a VQMOD extension to do that. You can download it here: https://www.dropbox.com/s/njh8ligmordw2 ... t.xml?dl=0.
No need to modify core files directly
Freelance Opencart 1.5.x and 2.x Developer - Available For Hire
Latest Opencart 2 Project --> http://www.falcon-rangecookers.co.uk
--- please reply only with verified data, that is: no 'I think', 'maybe' etc. ---
Please make sure you are add codedharam81 wrote:Hi All.
i am trying to implement this but getting error for my category grid/list product page:
Notice: Undefined index: model in template/product/category.tpl on line 147
any suggestion to fix this please?
My Ver is 2.3.0.2
Code: Select all
'model' => $result['model'],
Code: Select all
$data['products'][] = array(
Code: Select all
<search><![CDATA[<div class="caption">]]></search>
Code: Select all
<search><![CDATA[<div class="description"><?php echo $product['description']; ?></div>]]></search>
Code: Select all
<search><![CDATA[<p class="description"><?php echo $product['description']; ?></p>]]></search>
Code: Select all
class="description"><?php echo $product['description']
My Github OC Site: https://github.com/IP-CAM
5'600 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.
My Github OC Site: https://github.com/IP-CAM
5'600 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.
Users browsing this forum: No registered users and 28 guests