Hello,
It would be good to have a separation between core and view files. Sometimes there are things rendered within the core classes of tomatocart. like an example:
/includes/classes/product.php
You can find a renderProductVariant method here. This causes 2 problems
- It makes things difficult to create templates if you have to search the core files for layout stuff
- If you modify it, it could be a potential problem when upgrading (you can upgrade but you get conflicts)
A better approach would be to do everything layout in the layout directory and just work with the models classes there. So none of the model classes contains layout info. This way it will be more flexible and people just can deliver a folder instead of some core files that need to be overwritten and a folder.
I think it's a good practice to always keep everything that is layout depended in the layout dirs.
Greets,
Ward Loockx