Please explain in detail what it is you are trying to accomplish
Please explain in detail what it is you are trying to accomplish
Zen-Venom Get Bitten
I just want to call zen functions like storing data in database using $db->Execute plus some other functions for reading categories and sub categories name using zen cart functions.
I have created a new php file on root directory where zen cart is installed but I'm not able to access these functions in the php files created at root.
For example www.mydomain.com/myphpfile.php
In this file i want to call zen cart functions for accessing database and some other functions for categories manipulation.
The zen cart functions are at:
www.mydomain.com/includes/functions/....
Please let me know if this is clear now.
So, you're writing scripts to run completely outside of Zen Cart but you want to hijack Zen Cart code to do something from outside Zen Cart?
.
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.
No, in fact I'm using Ajax using Jquery. The files are placed at different folders because when I place my php files inside includes/functions directory i'm not able to access it through AJAX call therefore i placed my files in root directory.
When I place files in root directory i no longer can access zen cart functions.
I'm not doing any hijacking or cracking stuff just adding AJAX calls to my zencart.
Your script needs to load /includes/application_top.php ... which will in turn load everything else needed for Zen Cart operation, including the functions files.
.
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.
Can try this
Code:require('includes/application_top.php');
Zen-Venom Get Bitten
When I include require('../includes/application_top.php') at the top of the file, the function used inside my php file 'json_encode() stops working.
Can you tell me the reason for this?