Post by arosesiej » Thu Oct 08, 2015 3:19 am

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.

New member

Posts

Joined
Thu Jun 25, 2015 8:52 pm

Post by grgr » Thu Oct 08, 2015 4:10 am

Try:

Code: Select all

	$log = new Log('LOG_NAME.log');
	$log->write('TEXT = ' . $VARIABLE);
You should find that will put a log in the ../system/logs/ folder.

-
Image Image Image
VIEW ALL EXTENSIONS * EXTENSION SUPPORT * WEBSITE * CUSTOM REQUESTS


User avatar
Active Member

Posts

Joined
Mon Mar 28, 2011 4:08 pm
Location - UK
Who is online

Users browsing this forum: Baidu [Spider] and 3 guests