Nishith Nesdiya Posted November 29, 2013 Share Posted November 29, 2013 hello friends i try to get the prestashop admin directory path but no success. how to get the admin directorypath in prestashop php file. 1 Link to comment Share on other sites More sharing options...
Er.Ritesh Posted November 29, 2013 Share Posted November 29, 2013 _PS_ROOT_DIR_."/testadmin" This will give you full path to the admin directory. The _PS_ROOT_DIR_ is used to get the PS complete path to directory where it is installed. 1 Link to comment Share on other sites More sharing options...
Nishith Nesdiya Posted November 29, 2013 Author Share Posted November 29, 2013 thanks.. i need to the only admin directory path Link to comment Share on other sites More sharing options...
PascalVG Posted November 29, 2013 Share Posted November 29, 2013 try _PS_ADMIN_DIR_ 1 Link to comment Share on other sites More sharing options...
El Patron Posted November 29, 2013 Share Posted November 29, 2013 note when using _PS_ADMIN_DIR_, for newer releases this is only set when logged into back office, i.e. not set in front office so you will want to check that it's available before using. if (defined('_PS_ADMIN_DIR_')) 1 Link to comment Share on other sites More sharing options...
Nishith Nesdiya Posted November 30, 2013 Author Share Posted November 30, 2013 Thanks.. i try it.. Link to comment Share on other sites More sharing options...
MikeCodes Posted April 12, 2021 Share Posted April 12, 2021 (edited) On 11/29/2013 at 9:43 PM, El Patron said: note when using _PS_ADMIN_DIR_, for newer releases this is only set when logged into back office, i.e. not set in front office so you will want to check that it's available before using. if (defined('_PS_ADMIN_DIR_')) How can we get the Admin DIR if this constant is not defined? I had to use it from the hook ActionOrderStatusUpdate - where it's not defined if the customer makes an order from frontend and the status changes. Edited April 12, 2021 by MikeCodes (see edit history) Link to comment Share on other sites More sharing options...
El Patron Posted May 13, 2021 Share Posted May 13, 2021 On 4/12/2021 at 2:45 AM, MikeCodes said: How can we get the Admin DIR if this constant is not defined? I had to use it from the hook ActionOrderStatusUpdate - where it's not defined if the customer makes an order from frontend and the status changes. that post from 2013, now I only create module idea and one of my developers develops it. I recommend posting a new question and not on an eight year old post. 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