Answer the question
In order to leave comments, you need to log in
How to specify the full path to a file in Magento?
My module is located here: /app/code/local/MySpacename/MyModule.
This folder contains a file that I need to access via Ajax.
How can I specify the full path to this file?
No matter how you try, it doesn't work. Even manually wrote /app/code/local/MySpacename/MyModule/ajax.php.
Now, as a test, I posted it in /skin/ajax.php.
This way everything works. But this is not comme il faut.
Answer the question
In order to leave comments, you need to log in
it's bad practice to keep the file in a module and access it like ajax, it's better to make a method in the controller, then you can access it by url, if you still really want to push it into the module then
or
in both cases it will be necessary to add handles, but still I advise you to use the controller
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question