You are here: Blog » Code Snippets » Magento Enable Check Money Order Option for Admin Only

Magento Enable Check Money Order Option for Admin Only

Magento Enable Check Money Order Option for Admin Only

Typically on a live site in Magento, you don’t want to give the customer the option of paying via check or money order. So normally you are going to have this option disabled for your stores. The problem is, when this payment method is disabled, you will no longer be able to use it when creating custom orders via the Magento admin either. Let’s say you want to create a record of a customer order in the Magento system where the customer has already paid for the item, but for whatever reason it wasn’t recorder into the system. You won’t be able to do this because when you try and create the order via Magento admin the system will want you to enter a credit card number (and charge that credit card)! Wouldn’t it be great if you could enable the ‘check/money order’ payment method for admin created orders only?

How to do that

Copy and paste the file from app\code\core\Mage\Payment\Model\Method\Checkmo.php to to app\code\local\Mage\Payment\Model\Method\Checkmo.php (it’s best practice to never edit core files directly). Under the protected $_code = ‘checkmo;’ line of code, add the following 2 lines:

And Voila!

This entry was posted in Code Snippets and tagged by .

Author: justin saad

Justin Saad is first and foremost a husband and a father of four. He is also a web developer and designer who has been making websites for over twenty years. His company is called The Motech Network and his website is ClevelandWebDeveloper.com. In addition to building websites, Justin makes WordPress plugins and likes writing tutorials to help others learn about various aspects of web development.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">