So you mean I should change the folder location?
So you mean I should change the folder location?
Changing the folder location won't help as the only place from which your AJAX handler can invoke application_top will still be your admin's root folder.
Kuroi Web Design and Development | Twitter
(Questions answered in the forum only - so that any forum member can benefit - not by personal message)
I have resolved the issue by writing my own functions instead of using zen cart functions.
But here, i'm encountering a very serious problem with $_SESSION variables. In my root directory I set a session variable but when i try to access it on EZ pages i don't get that value rather I get 0.
How to resolve this issue?
Unless you're prepared to write your own version of Zen Cart's page and session initialisation routines, you resolve it by putting your ajax handler in the admin root folder and calling application_top to do the heavy lifting for you.
Kuroi Web Design and Development | Twitter
(Questions answered in the forum only - so that any forum member can benefit - not by personal message)
I don't understand what you mean by all this. Please explain in a different or easy way.
Any script that you want to run from outside Zen Cart but access resources from within Zen Cart ... requires that you load application_top.
If you don't do that, then you need to re-invent all the core logic that Zen Cart runs on ... essentially recreating your own framework.
So ... if you want to access Zen Cart resources, use application_top.
.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole
Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.
Thanks for your suggestion, but i include application_top.php everything stops working in my application.
The two most likely reasons for this are:
- that you are invoking application_top from a script that's not being run from your admin root folder, which will cause problems with the paths of some of the files to be loaded and/or
- that you are loading separately files that application_top has already loaded causing duplicate function errors.
Sadly, this simply isn't that easy. It can get very technical, especially when ajaxing into the admin, as you have to also allow for the session expiring on you. PM me an email address and I'll send you some working code to look at.
Last edited by kuroi; 1 Jun 2011 at 08:30 AM. Reason: added offer
Kuroi Web Design and Development | Twitter
(Questions answered in the forum only - so that any forum member can benefit - not by personal message)
Your first point is correct. I'm loading application_top.php from different folder than admin but again the problem is if i copy that file to admin folder and include application_top.php and then give it AJAX call , it does not work. Otherwise it works fine.
And, as I said before, using PHP error_reporting can help you see what PHP errors your scripts are encountering.
.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole
Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.
Bookmarks