...
File/folder name | Description | Details | |
---|---|---|---|
name_of_the_module.php | Main file. | The main PHP file should have the same name as the module's root folder.
| |
config.xml | Cache configuration file. | If it does not exist yet, this file is automatically generated by PrestaShop when the module is first installed. | |
| Icon files representing this module in the back-office. | PrestaShop 1.4: 16*16 pixels Gif or Jpeg file. PrestaShop 1.5: 32*32 pixels PNG file. If your module works on both PrestaShop 1.4 and PrestaShop 1.5+, you should have both a logo.gif AND a logo.png file. | |
/views | This folder contains the View files. | ||
/views/templates | This folder contains your module's template files (.tpl ). | If the module needs to work with PrestaShop 1.4, the template files should be placed either directly at at the root of the module's folder, or in a /template folder at the root of the module's folder. | |
/views/templates/admin | Sub-folder for template files used by the module's administration controllers. | ||
/views/templates/front | Sub-folder for template files used by the module's front-office controllers. | ||
/views/templates/hook | Sub-folder for template files used by the module's hooks. | ||
/views/templates/css | Sub-folder for CSS files used. | /If the module needs to work with PrestaShop 1.4, the CSS files should be placed in a /css folder at the root of the module's folder. | |
/views/templates/js | Sub-folder for JavaScript files. | /If the module needs to work with PrestaShop 1.4, the JavaScript files should be placed in a /js folder at the root of the module's folder. | |
/views/templates/img | Sub-folder for image files. | If the module needs to work with PrestaShop 1.4, the image files should be placed in a /img folder at the root of the module's folder. | |
/controllers | This folder contains the Controller files. | You can use the same sub-folder paths as for the View files. For instance, /modules/bankwire/controllers/front/payment.php . | |
/override | Sub-folder for the class-overriding code. | This is very useful when you need to change some of the default PrestaShop code. Since you must not do so, you can override the default code. For instance, /modules/gsitemap/override/classes/Shop.php extends the default ShopCore class. | |
/translations | Sub-folder for the translation files. | fr.php , en.php , es.php , etc. | |
/themes/[theme_name]/modules | Sub-folder for overriding .tpl files and languages files, if necessary. | This folder is essential during modifications of an existing module, so that you can adapt it without having to touch its original files. Notably, it enables you to handle the module's template files in various ways, depending on the current theme. | |
/upgrade | Sub-folder for upgrade files | When releasing a new version of the module, the older might need an upgrade of its data or files. This can be done using this folder. |
...