I am working on a theme for Opencart and am finding I need access to different variables than provided by the default controllers.
For example, in the Category view, I would like to access the full product image rather than the thumbnail which is what the controller provides by default.
Coming from WordPress, I would be used to simply calling a function to retrieve a different image size, but I assume that in MVC, this functionality needs to be in the controller.
However, I see no way to write a custom controller and editing the original means huge problems when updating.
As a very basic fundamental question, is the only solution to write a Module? Is this the proper practice when developing a theme for opencart? Somehow, I have not found a very definitive clear explanation of how I am supposed to work with opencart themes (a la wordpress codex).
This doesn’t need to be done in the controller at all, the view can access just as much information as the controller can. You just need to use this in the product loop
Note however that you should resize the image from there using the resize method of the tool/image model to the dimensions you want for consistency