I need to override class Mage_Paypal_Model_Ipn.
class Budsies_Budsie_Paypal_Model_Ipn extends Mage_Paypal_Model_Ipn
{
protected function _processOrder()
{
Mage::log('Budsies_Budsie_Paypal_Model_Ipn', null, 'processOrder.log');
$orderState = $this->_order->getState();
if ($orderState != Mage_Sales_Model_Order::STATE_COMPLETE &&
$orderState != Mage_Sales_Model_Order::STATE_HOLDED) {
parent::_processOrder();
}
}
}
I added config.xml to my module в global section:
<global>
<models>
<paypal>
<rewrite>
<ipn>Budsies_Budsie_Paypal_Model_Ipn</ipn>
</rewrite>
</paypal>
</models>
</global>
But it doesn't work. What should be config file to make my class to rewrite core class. Could you please tell me what's the problem?
I corrected it, simply it's this section is larger and I made copy paste. But it doesn't work.
Thank you for your help. My rewrite works. The problem was that ipn for that account were not configured, there were not ipn, so this method wasn't called.