I would like to write to a log upon Order Confirmation. I already have a vqmod that I'm using to grab what I need from the "success" .php and .tpl files. I just want to write these variables to a log file.
I currently tried fopen(), fwrite(), fclose() and tried everything to ensure that the path/filename is valid in fwrite(). And the mode is correct too, it's "a".
I'm not sure if it's a permission thing or what, but is there anyway to write to a custom log in php for opencart? I know there has to be but it's not working for me.
Try:
You should find that will put a log in the ../system/logs/ folder.
Code: Select all
$log = new Log('LOG_NAME.log');
$log->write('TEXT = ' . $VARIABLE);
-
VIEW ALL EXTENSIONS * EXTENSION SUPPORT * WEBSITE * CUSTOM REQUESTS
Who is online
Users browsing this forum: Baidu [Spider] and 3 guests