2026 Executive BenchmarkMid-Market Enterprise Modernization: How leaders across unify Commerce, Odoo ERP & AI in 90 days.
MAGENTO COMMERCE

How to place an order for free ( using free payment option) in admin?

Some time we need to place and order for our customer as a demo or any missing products in last orders, in such of conditions we create order manually, and we dont need to use any...

Akshar Group Technologies
Dec 25, 2020
2 min read
Verified Source

Some time we need to place and order for our customer as a demo or any missing products in last orders, in such of conditions we create order manually, and we dont need to use any payment method to create such types of orders. In that situation we need a free payment option in admin and not for front end. I am going to share with you how we can use free payment option in admin which is shows in follwoing steps:

1. Go toapp/code/core/Mage/Payment/Model/Methodand open fileFree.phpfile.

2. Then go toLine 48-49you will notice following code:

php
protected $_canAuthorize = true;
protected $_canCapture = true;
3. After these lines add 2 lines of custom code as show in following:
php
protected $_canAuthorize = true;
protected $_canCapture = true;
protected $_canUseInternal = true;
protected $_canUseCheckout = false;
4. Next you will notice follwoingcode :
php
public function isAvailable($quote = null)
{
return parent::isAvailable($quote) && (!empty($quote))
&& (Mage::app()->getStore()->roundPrice($quote->getGrandTotal()) == 0);
}
5. Replace above code with the following code (in this function only change == 0? to > 0?):
php
public function isAvailable($quote = null)
{
return parent::isAvailable($quote) && (!empty($quote))
&& (Mage::app()->getStore()->roundPrice($quote->getGrandTotal()) > 0);
}
6. Now save Free.php file and upload it to custom local location app/code/local/Mage/Payment/Model/Method/Free.php.

7. Next go to Admin panel and using navigation open System -> Configuration -> Payment Methods then Enable Zero Subtotal Checkout payment method, you can rename its title according to your desire.

8. Now clear Magento cache.

9. Done, now when to create any new order from admin you will see Zero Subtotal Checkout. it will not show on front end.
Share this playbook
LET'S BUILD WHAT'S NEXT

What's Holding Your Business Back?

Tell us where you want to go, what's getting in the way, and we'll help you figure out the technology to get there.

No sales pitch. Confidential strategic advisory.