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 don’t 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 to app/code/core/Mage/Payment/Model/Method and open file Free.php file.
2. Then go to Line 48-49 you will notice following code:
protected $_canAuthorize = true; protected $_canCapture = true;
3. After these lines add 2 lines of custom code as show in following:
protected $_canAuthorize = true;
protected $_canCapture = true;
protected $_canUseInternal = true;
protected $_canUseCheckout = false;
4. Next you will notice follwoing code :
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′):
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.
10. Hope it help you
11. For more detail visit Magento Post.
Comments
This is amazing, well explained. Keep up the good work always. All the best my friend !!!!
Must be really thankful for this because this is really a great help for my magento. But have one more request, can you post a video on how to make this work? Just trying my luck.
Hi Maxwell,
Contact me on skype : banga.jagdeep
Great beat ! I wish to apprentice at the same time as you amend your web site, how could i subscribe for a blog website? The account aided me a appropriate deal. I had been a little bit acquainted of this your broadcast offered vibrant transparent concept
Matchless topic, it is very interesting to me )))) tHANKS jagdeepbanga.com tEAM
You certainly have some agreeable opinions and views. jagdeepbanga.com provides a fresh look at the subject.
The best essential information is this, that you have try to do very well approaching for that homelessness body and their helping hand. I am so inspired about that, after read your this useful written articles and your opinions on jagdeepbanga.com also which is so attractive for do something for those
Very informative post. Thanks jagdeepbanga.com for taking the time to share your view with us.
I am always investigating online for tips that can benefit me. Thanks jagdeepbanga.com
I love this blog.