Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

PrestaShop uses Model-View-Controller (MVC) for its software architecture, which is often used in web applications where webpages are dynamically generated.  MVC isolates application logic from the input and presentation, so that they can be separately developed, tested and maintained.  A view provides the user interface presented to the customer in the browser.  A controller receives input from the browser, decides what to do with it and then passes information to models that carry out specific tasks.  In PrestaShop, the models are in the classes directory, the views are in the themes directory and the controllers are in the controllers directory.  The files in the root directory are the public interface used to call the controllers.

All these files have a warning at the top of them telling you not to modify them if you wish to upgrade PrestaShop to newer versions in the future.  That is because PrestaShop allows you to override its classes and controllers in the override directory.  By overriding classes and controllers instead of modifying them, you can safely overwrite them with new versions in the future without having to worry about losing any changes you have made.  PrestaShop’s modules also have the same warning, since they can be overridden in a theme by mirroring the module’s directory inside the theme, e.g. themes/themename/modules/blockuserinfo/blockuserinfo.tpl.

  • No labels