aljon ngo Posted June 25, 2014 Share Posted June 25, 2014 (edited) Hello i created a module, for example my module name is product inquiry. how can the codes below work on my other php files that is not a class. echo Tools::getValue('id_product'); echo Configuration::get('module_NAME'); currently i have 2 files in my root module file productinquiry.php - this is where i set class productinquiry extends Module process.php - this is where my form will be send inside my modules folder , this is also where i wanted to use tools: and configuration: but it is not working Edited June 25, 2014 by aljon ngo (see edit history) Link to comment Share on other sites More sharing options...
bellini13 Posted June 25, 2014 Share Posted June 25, 2014 Add the following lines to the top of your process.php file. This will cause the core Prestashop files to autoload and make them available to you. It will also load your module class so you can utilize any module functions you require include(dirname(__FILE__). '/../../config/config.inc.php');include(dirname(__FILE__). '/../../init.php');include(dirname(__FILE__). '/productinquiry.php'); Link to comment Share on other sites More sharing options...
aljon ngo Posted June 26, 2014 Author Share Posted June 26, 2014 (edited) Add the following lines to the top of your process.php file. This will cause the core Prestashop files to autoload and make them available to you. It will also load your module class so you can utilize any module functions you require include(dirname(__FILE__). '/../../config/config.inc.php'); include(dirname(__FILE__). '/../../init.php'); include(dirname(__FILE__). '/productinquiry.php'); it works but if i add it to my codes .. my jquery post form doesnt work. in the process.php. Edited June 26, 2014 by aljon ngo (see edit history) Link to comment Share on other sites More sharing options...
bellini13 Posted June 26, 2014 Share Posted June 26, 2014 you will need to provide more information if you are looking for assistance. what doesn't work? do you get an error? Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now