Reading list Switch to dark mode

    Module Development on PrestaShop

    Updated 23 December 2016

    1. Directory structure of prestashop :- Prestashop work on MVC pattern

           M = MODEL(In prestashop classes folder is model)

           V = View (Themes folder is view )

           C = Controller ( and controller folder itself controller )

          Config : – Folder contain all the configuration .

    Searching for an experienced
    Prestashop Company ?
    Find out More

          Css : – contain all the css file.

         Modules:- Folder contains all Module

         Controllers  : – Folder contain two different folder

    1) Front (contain all controller for front ).

    2) Admin (contain all controller for admin).

    Themes : – Folder contain default themes available for prestashop.

    Directory structure of prestashop modules :-

                  For creating a  new module you just create a folder  and rename it as my module name is “simplemodule” then folder name is “simplemodule”

    And the “simplemodule” folder contain a “simplemodule.php” file(it is necessary to have one file with same name as folder name which will have module install and uninstall functions.)

    7

    2

     

    3

     

     

    First write the code for installation in my case my module name is “simplemodule” hence I am writting installation code within “simplemodule.php”.

     

    4

     

    1. simplemodule.php contain Simplemodule class which extends module class

    2.__contructor is the constructor.

    3. we use two function here install() and uninstall in

      install function:- we call all the function which we need at the time of installation in installation function

    Uninstall function : we need to uninstall all the functionality  which we are install at the time of installation.

    Hook calling (simple hook calling) refer image-below

    5

    Front end Display for hook

    6

     

     

     

     

     

     

     

     

    . . .

    Leave a Comment

    Your email address will not be published. Required fields are marked*


    Be the first to comment.

    Back to Top

    Message Sent!

    If you have more details or questions, you can reply to the received confirmation email.

    Back to Home