Jump to content

baseDir is not defined in PS 1.7


Recommended Posts

I have developed a simple module in PS 1.6; a simple js int the module use the baseDir instruction as

 

    var query = $.ajax({
                    type: 'POST',
                    url: baseDir + 'modules/......',

In PrestaShop 1.7 i get an error 

 


ReferenceError: baseDir is not defined

 A simple workaround is to hardcode the base Dir with php line

 

$url = .$_SERVER['HTTP_HOST'].'/';

 

but why baseDir fail?

Thank you

 
 

 

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...