Page 1 of 1

How to display custom products on home page?

Posted: Sat Nov 20, 2010 12:05 am
by Abidrizvi
Hello,
I want to display a set of custom products on home page on my current template that i have designed.
I want to know that

- where should i write the database query (on which file )
- where should i call it to display (on which file), current the template is broken into 3 simpler pieces

.../catalog/view/theme/themename/common/header.tpl
.../catalog/view/theme/themename/common/home.tpl
.../catalog/view/theme/themename/common/footer.tpl

i have php knowledge but i am unable to find the proper documentation of open cart. If you give me idea ony to display product the rest of the things i will understand by myself :-)

Looking for your Help!!!
Thanks

Re: How to display custom products on home page?

Posted: Sat Nov 20, 2010 7:14 am
by justinv
Do you understand MVC? The three tpl files are views, any database queries should be written in the model and pulled through in the controller to be available to the view.

In the directory catalog/ you will find subdirectories called model, view, controller (and language) which you can use for these purposes. It looks like you have already found the view - home.tpl is the one to control the middle content of the home page.

Hope that helps!

Re: How to display custom products on home page?

Posted: Sat Nov 20, 2010 9:19 am
by De[v]
Why don't just edit the layout of 'Featured' and tell it to go to the middle other then the side and use that.