Magento : 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 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

Arun 29-07-2012, 01:53

This is amazing, well explained. Keep up the good work always. All the best my friend !!!!

Reply
Maxwell Spunter 04-08-2012, 00:12

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.

Reply
Jagdeep Banga 04-08-2012, 00:43

Hi Maxwell,

Contact me on skype : banga.jagdeep

Reply
escorte Paris 04-01-2013, 06:47

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

Reply
escorte paris 04-01-2013, 21:42

Matchless topic, it is very interesting to me )))) tHANKS jagdeepbanga.com tEAM

Reply
internet promotion 05-01-2013, 15:43

You certainly have some agreeable opinions and views. jagdeepbanga.com provides a fresh look at the subject.

Reply
Dubai escort girls 08-01-2013, 03:57

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

Reply
buy anabolics 15-01-2013, 06:38

Very informative post. Thanks jagdeepbanga.com for taking the time to share your view with us.

Reply
forex trading education 11-02-2013, 17:13

I am always investigating online for tips that can benefit me. Thanks jagdeepbanga.com

Reply
escorte Paris 18-04-2013, 23:31

I love this blog.

Reply
Peter 16-04-2014, 16:34

It’s a helpful information you shared about magento platform. Thanks for the step wise instructions.

Reply

Leave a Reply



+ two = seven