Page 1 of 1

Display more fields of product in category page

Posted: Sat Oct 09, 2010 6:29 pm
by opencartnovice
Hi all,
I want to display more information of per product in category page, say "location" for example. I found a topic indicating how to display more fields of product in product page but cannot follow to do in category page. Their codes look quite different as product page is for single item while category page shows many items.

I think we need edit file category.* in view and controller. I can understand the code in /view/.../product/category.tpl but don't know how to do in /..../controller/product/category.php. Can anybody give full instruction please?

Kind regards,
a very new of OC and php

Re: Display more fields of product in category page

Posted: Mon Oct 11, 2010 10:53 am
by jty
In addition to .tpl and the controller, you might also have to modify the model if the model doesn't already get the data that you require
This topic http://forum.opencart.com/viewtopic.php?f=19&t=21195
shows how to add stock status to the category page in 1.4.7
see if that can help you. I know it's status and not location but a field is a field. It's also 1.4.7 and not 1.4.9 but php is php

Re: Display more fields of product in category page

Posted: Tue Oct 12, 2010 3:13 am
by opencartnovice
jty wrote:In addition to .tpl and the controller, you might also have to modify the model if the model doesn't already get the data that you require
This topic http://forum.opencart.com/viewtopic.php?f=19&t=21195
shows how to add stock status to the category page in 1.4.7
see if that can help you. I know it's status and not location but a field is a field. It's also 1.4.7 and not 1.4.9 but php is php
Thanks very much in deed for your instruction I will try.
In the given topic, they didn't change any file in model so I think we don't need change.