Good day, today, one of the customers in the store on the engine, opencart required to bring the field model in the general list of products in the category as well as in modules recommended, news, stocks, and others ....
It makes it all very simple and takes only a few minutes, and in this article I will try to describe it all!
And so to bring the field model in a list of categories open file catalogcontrollerproductcategory.php and after variable :
1 |
'name' => $result['name'], |
Add the following line:
1 |
'model' => $result['model'], |
Then open the file catalogviewthemedefaulttemplateproductcategory.tpl and in it we find the code:
1 |
<?php echo $product['name']; ?> |
After which add:
1 |
<?php echo $product['model']; ?> |
That's basically all that was required to do, we now have in the model displays the list of categories, if you want to display this field in modules all do similar, only this time in the files of the module you require.
Use, will be very happy if this article will be helpful.
No Comment
You can post first response comment.