File/folder name | Description | Details |
---|---|---|
name_of_the_mod | Main file. | The main PHP |
ule.php | file should | |
have the same | ||
name as the | ||
module's root | ||
folder. For | ||
instance, for | ||
the BlockCMS | ||
module: | ||
Folder name: | ||
/modules/ | ||
blockcms | ||
Main file | ||
name: | ||
/modules/ | ||
blockcms/ | ||
blockcms. | ||
php | ||
------------------------ | -------------------- | --------------- |
config.xml | Cache | If it does |
configuration | not exist | |
file. | yet, this | |
file is | ||
automatica | ||
lly generated | ||
by PrestaShop | ||
when the | ||
module is | ||
first | ||
installed. | ||
------------------------ | -------------------- | --------------- |
logo.gif or logo.jpg | Icon files | PrestaShop |
(up to v1.4) logo.png | representing this | 1.4: 16*16 |
(v1.5 | ) | module in the back |
office. | Jpeg file. | |
PrestaShop | ||
1.5: 32*32 | ||
pixels PNG | ||
file. If your | ||
module works | ||
on both | ||
PrestaShop | ||
1.4 and | ||
PrestaShop | ||
1.5 | ||
should have | ||
both a | ||
logo.gif AND | ||
a logo.png | ||
file. | ||
------------------------ | -------------------- | --------------- |
/views | This folder | |
contains the View | ||
files. | ||
------------------------ | -------------------- | --------------- |
/views/templates | This folder | If the module |
contains your | needs to work | |
module's template | with | |
files (.tpl). | 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/a | Sub-folder for | |
dmin | template files | |
used by the | ||
module's | ||
administration | ||
controllers. | ||
------------------------ | -------------------- | --------------- |
/views/templates/f | Sub-folder for | |
ront | template files | |
used by the | ||
module's front | ||
office | ||
controllers. | ||
------------------------ | -------------------- | --------------- |
/views/templates/h | Sub-folder for | |
ook | template files | |
used by the | ||
module's hooks. | ||
------------------------ | -------------------- | --------------- |
/views/css | Sub-folder for CSS | If the module |
files used. | 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/js | Sub-folder for | If the module |
JavaScript files. | 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/img | Sub-folder for | If the module |
image files. | 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/bankw | ||
ire/controller | ||
s/front/paymen | ||
t.php . | ||
------------------------ | -------------------- | --------------- |
/override | Sub-folder for the | This is very |
class-overridi | useful when | |
ng code. | 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/S | ||
hop.php | ||
extends the | ||
default | ||
ShopCore | ||
class. | ||
------------------------ | -------------------- | --------------- |
/translations | Sub-folder for the | fr.php, |
translation files. | en.php, | |
es.php, etc. | ||
------------------------ | -------------------- | --------------- |
/themes/[theme_na | Sub-folder for | This folder |
me]/modules | overriding .tpl | is essential |
files and | during | |
languages files, | modificati | |
if necessary. | ons 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 | When |
upgrade files | 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. | ||
------------------------ | -------------------- | --------------- |
Last active
March 15, 2018 15:15
-
-
Save mickaelandrieu/a2251f1afe00f57bd8b144239284c9cf to your computer and use it in GitHub Desktop.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment