Child pages
  • Creating a PrestaShop module

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • "Bootstrap" file: name_of_the_module.php
  • Cache configuration file: config.xml
  • Module-specific controllers, all in the /controllers sub-folder
  • Class-overriding code, all in the /override sub-folder (automatic install/uninstall using copy or merge)
  • View files: JavaScript, images, CSS files, template files, etc. They are can be placed in folders within the module's main folder:
    • /css folder for CSS files
    • /img folder for image files
    • /js folder for JavaScript files
    • /views/templates/admin sub-folder for files used by the module's admin controller
    • /views/templates/front sub-folder for files used by the module's front controller
    • /views/templates/hook sub-folder for files used by the module's hooks
    From v1.5 onward, JavaScript and CSS files can also be placed in sub-folders:
    • /views/css sub-folder for CSS files
    • /views/img folder for image files
    • /views/js sub-folder for JavaScript files

      Info

      You can put your CSS, JavaScript and image file in any of the allowed folder. The important thing is to be consistent, and in case of an overload, to use the same path as the original code.

  • 16x16 module logo: name_of_the_module.jpg (JPG format)
  • 32x32 module logo: name_of_the_module.png (PNG format)
  • Translation files: fr.php, en.php, es.php, etc. From v1.5 onward, all these files can be placed in the /translations sub-folder.

...