Page 1 of 1

Custom Template, fallback method and the controller

Posted: Wed Dec 07, 2011 7:37 pm
by angelo
Hi, I've just started working on a template and till now I've just overridden .tpl files by creating a new folder under catalogue/view/theme. Now I need to add modify a behavior in a php file under catalogue/controller/common (I need to isolate the categories module from the others in the left column in order to nest it into my navigation menu) an I've just realized that (it seems to me) the fallback method doesn't apply to the controller (you can't create a folder with your customized files overriding the default ones). I should then edit the default file.
Is it a good practice? What about upgrades?
Thanks

Re: Custom Template, fallback method and the controller

Posted: Wed Dec 07, 2011 11:18 pm
by webvet
The best way to modify .tpl and .php files without modifying any core files is to use vQmod:

http://forum.opencart.com/viewtopic.php ... 42#p196942

This is planned to be a future-proof/upgrade-proof method as you will see from the info provided in the link.

Re: Custom Template, fallback method and the controller

Posted: Wed Dec 07, 2011 11:36 pm
by angelo
Thank you so much... I'll give it a read... Cheers

Re: Custom Template, fallback method and the controller

Posted: Wed Dec 07, 2011 11:42 pm
by webvet
No problem - it's great fun to use, and there are loads of free scripts now available that others have come up with (alongwith some very sophisticated commercial ones) on the relevant forum threads.

Enjoy :)