I have an observer method that triggers upon the event sales_order_creditmemo_save_after
, basically when a credit memo was created. The method I have fires:
public function handleCreditmemoCreation(Varien_Event_Observer $observer)
{
//$observer contains data passed from when the event was triggered.
$fp = fopen('/Applications/MAMP/htdocs/magento-1/var/log/request.log', 'a');
fwrite($fp, $observer->getData());
fwrite($fp, 'test');
fclose($fp);
}
However, $observer->getData()
doesn't output anything into the request.log log file. To confirm I configured the file correctly, I write the string 'test' to the file, which works.
Also, when I check $observer for null, it tells me that $observer is not null. Does anyone know why then it does not seem to contain anything?