Orders Payment-Methods – Removed Payment Method, Old Orders Not Loading

orderspayment-methods

Synopsis: I've deleted an ancient payment method extension from my magento install, and now orders made using this payment method cannot be viewed and result in an exception.

Specifically, our store has been using an ancient payment method extension which I am now in the process of upgrading to a brand spanking new version, from a different vendor.

The old extension is badly written and a complete mess, so I just wanted to get rid of it. The new extension is for the same payment provider, but uses a different $_code and is incompatible with the old extension.

Trying to view any order where this payment method is used, in either the back end or the customer account page, results in an exception: "The requested Payment Method is not available."

How do I get around this? I don't care about the payment method for these old orders, I just want to be able to view further details about the order without it crashing.

I cannot change the payment method code on the orders themselves to the new payment method code as they are incompatible and generate further errors. Is it possible to create a "skeleton" payment method that uses the $_code from the old payment method for the sole purpose of satisfying magento needs, and how difficult would this be? Or is there another way round this problem which doesn't involve me keeping the old legacy extension kicking around?

Best Answer

Yes, it is possible to strip down the extension to just provide the payment method. I recently did the same for the replaced extension Saferpay_Business. just removing the extension will prevent the users from viewing their order history and throw an exception in the shop backend whenever one opens an old order.

just disabling the module output unfortunately is not enough: observers will still be called which might lead to nasty side effects. in our case, the saferpay extension added extra js files and changed headers through an observer, which prevented the onepage checkout to work properly.

here's what we did to strip down the extension:

  1. removed <resources>, <events> and <routers> entries from Saferpay_Business/etc/config.xml

  2. set <show_in_default>, <show_in_website>, <show_in_store> to 0 in Saferpay_Business/etc/system.xml (will hide the specific payment settings in the admin)

  3. removed layout changes/override entries in <layout> from app/design/base/default/layout/saferpaybe.xml

  4. change the version information in Saferpay_Business/etc/config.xml to prevent updating the extension if it's still available in magento connect.

your steps might differ - try in a testing environment first.

Related Topic