Enabling Magento payment methods for backend orders

Magento has a great, albeit lesser known feature that allows you to create orders in the backend. This is especially handy for stores that also take orders by phone because this allows them to utilize Magento’s inventory status, coupons etc. but the order is also registered in Magento’s statistics, providing a clearer picture.

Sadly there aren’t that many payment methods that allow transactions from the backend of Magento. Of course this is because in most cases this would require you to know the payment data of your client. In my case a client of mine wanted to create orders in the backend for the customers who would order by phone, come to the store to pick up the order and pay in cash. To achieve this I copied ‘/app/code/core/Mage/Payment/Model/Method/Purchaseorder.php’ to the local pool and added these two lines in the body of the class.

The first variable allows the payment method to be used in the backend if set to true. The second blocks it from being used in the frontend if set to false. So If you still want to use purchase order to be used in the frontend just set it to true.

I’ve picked purchase order because this allows my client to give the order some identifier so it’s easier to recognize afterwards. Of course you can pick just about any payment method that is available, however keep in mind that if a payment method works in the front end it doesn’t necessarily work in the backend.

With local pool I mean the local folder in /app/code. You don’t want to edit core files and lose your alterations with upgrades. If you copy the required files/folders from the core folder to the local folder you can safely edit those and still run updates ( as long as the extension isn’t changed significantly ).