Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Work_Rewrites_Model_Payment_Info extends Mage_Payment_Model_Info {
- public function getMethodInstance()
- {
- Mage::log("In rewrite payment info model");
- if (!$this->hasMethodInstance()) {
- if ($this->getMethod()) {
- $instance = Mage::helper('payment')->getMethodInstance($this->getMethod());
- if ($instance) {
- $instance->setInfoInstance($this);
- $this->setMethodInstance($instance);
- return $instance;
- }
- }
- //return false;
- Mage::throwException(Mage::helper('payment')->__('The requested Payment Method is not available.'));
- }
- return $this->_getData('method_instance');
- }
- }
- <config>
- <global>
- <models>
- <rewrites>
- <class>Work_Rewrites_Model</class>
- </rewrites>
- <payment>
- <rewrite>
- <info>Work_Rewrites_Model_Payment_Info</info>
- </rewrite>
- </payment>
- <models>
- <global>
- <config>
Add Comment
Please, Sign In to add comment