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
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!
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!
Documentation: OpenCart User Guide
Mods: Total Import PRO | CSV Import PRO | Ecom Tracking | Any Feed | Autosuggest | OpenCart CDN
Who is online
Users browsing this forum: No registered users and 11 guests