I am generating XML which is sent to an external system whenever a Credit Memo is generated. I am using the event sales_order_creditmemo_refund
which gives me the credit memo and order models (which I am using to generate the appropriate XML)
$creditMemo = $observer->getEvent()->getCreditmemo();
$order = $creditMemo->getOrder();
However I am having trouble accessing comments. I can see in Mage_Sales_Model_Order_Creditmemo
there is getCommentsCollection()
but this is not returning anything.
I am guessing the comments are added to the model at a later stage, should I be using a different event for my observer?
I can see that Mage::dispatchEvent('sales_order_creditmemo_refund', array($this->_eventObject=>$this));
is located inside the refund()
method of the same model, but the only other event I can see in the model is sales_order_creditmemo_cancel