7

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?

4

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.

  • Thanks, this got me on the right track. I made a simple skeleton extension and gave it the same $_code, and made sure it wasn't available on front or back end. – Turpachull Feb 13 '15 at 8:52
  • @Turpachull that's a good solution as well. in our case, we still wanted to keep the additional payment information (like cc transaction id) that the extension stored in the payment records, thus the more complicated way. – alternize Feb 20 '15 at 15:46
1

Why don't you still keep old payment extension and just disable it? For performance, you can also go to Configuration -> Advanced -> Advanced to disable its output.

  • This might work for some but it doesn't work for me as the original module was so badly written that disabling output had no effect. Had to completely disable it through /app/etc/modules. – Turpachull Feb 13 '15 at 8:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.