Jump to content

How to use PrestaShop 1.7 core functions on php file?


Recommended Posts


I'm doing custom PHP that needs to use Prestashop base functions.

In 1.6 i used to do:

   include '../config/settings.inc.php';
   include '../config/defines.inc.php';
   include '../config/config.inc.php'; 
   include '../init.php'; 

And i was able to use, for example, the function Mail::Send and other core classes and objects.

Any ideas how to do this in Prestashop 1.7?


Link to comment
Share on other sites

Nothing has changed.
Only one include_once is needed.

When the php file will be in the main directory of Prestashop:


When the php file will be in modules/my_module/, for example:




Edited by Guest (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...