So I have a few ideas for the future that I think would be great conceptually that I'll mark down here.
MVC and Namespace Restructure
Currently a big annoyance with the way MVC is laid out in opencart is the fact that it spread all over the place. This is especially true for extensions. It would be nice if they were grouped better. So looking at only the catalog side only for now, a module typically has 3-4 files.
Code: Select all
model/module/file.php
view/module/file.tpl
controller/module/file.php
language/english/module/file.php
So one idea I had was to use the folder as the namespace and let each module folder have its own MVC layout. Some possible naming conventions:
1. Folder Namespace
Code: Select all
/module
/latest
/controller.php
/model.php
/view.php
/language.en.php
2. File Namespace & type
Code: Select all
/module
/latest.controller.php
/latest.model.php
/latest.view.php
/latest.language.en.php
This would also change the directory structure completely of course. So some possible structures:
Code: Select all
/catalog
/page
/module
/latest
/controller.php
/model.php
/view.php
/language.en.php
/cart
/controller.php
/model.php
/view.php
/language.en.php
/payment
/shipping