Magento Onestep Checkout – Remove Payment Method Step

In this blog post, we will see how to remove the payment method step from onepage checkout.

This source code of this blog has been tested in magento 1.6 but should work on magento 1.4+, no core magento files have been changed including javascript files.
Removing the payment method step is very complex and require many files changes, so this blog would be lengthy again [:)]. Attached is source code for the module
As explained in the previous blog post, the basic idea of removing any step from checkout is to see a set a default value for that step, so that magento order processing runs smoothly. So when removing the payment method step, i have set the payment method “Zero Subtotal Checkout” with code “free” as the default payment method.

Magneto Zero Subtotal Payment Method

Magneto Zero Subtotal Payment Method

Now lets see step by step how to do it.

Step1: Onepage Block

First we need to override the Onepage.php block, so that we can change the steps array. So to override the block Mage_Checkout_Block_Onepage open your module’s config.xml file and put inside the blocks tag, below code


So the core block Mage_Checkout_Block_Onepage has been overridden by Excellence_Remove_Block_Onepage block. In the code in this block is

class Excellence_Remove_Block_Onepage extends Mage_Checkout_Block_Onepage
	public function getSteps()
		$steps = array();

		if (!$this->isCustomerLoggedIn()) {
			$steps['login'] = $this->getCheckout()->getStepData('login');

		$stepCodes = array('billing', 'shipping', 'shipping_method', 'review');

		foreach ($stepCodes as $step) {
			$steps[$step] = $this->getCheckout()->getStepData($step);
		return $steps;

So here as we can see i have removed the ‘payment’ step from the $stepCodes array.

Step2: PHTML and Layout Files

Next we need to make changes to these phtml files
1. checkout/onepage.phtml : To include our new javascript files
2. checkout/onepage/shipping_method.phtml: To change the shipping method javascript, so that after shipping step, review step shows up instead of payment step
3. checkout/onepage/progress.phtml: To remove payment method from progress sidebar
4. checkout/onepage/review/info.phtml: To make changes in submit order javascript
I am just pointing out changes done in these phtml files, for details you can download and see the module. Also there files have been overridden through layout xml inside the remove/ folder, so no changes made to core files. So in the file remove/checkout/onepage.phtml a new javascript file has been added for our custom javascript needs

<script type="text/javascript" src="<?php echo $this->getSkinUrl('js/removecheckout.js') ?>"></script>


var checkout = new Excellence(accordion,{

instead of

var checkout = new Checkout(accordion,{

In the file remove/checkout/onepage/shipping_method.phtml the change is

var shippingMethod = new ExcellenceShippingMethod('co-shipping-method-form', "<?php echo $this->getUrl('checkout/onepage/saveShippingMethod') ?>");

instead of

var shippingMethod = new ShippingMethod('co-shipping-method-form', "<?php echo $this->getUrl('checkout/onepage/saveShippingMethod') ?>");

In the file remove/checkout/onepage/progress.phtml
I have simple removed the Payment Method box.
In the file remove/checkout/onepage/review/info.phtml change made is

review = new ExcellenceReview('<?php echo $this->getUrl('checkout/onepage/saveOrder') ?>', '<?php echo $this->getUrl('checkout/onepage/success') ?>', $('checkout-agreements'));

instead of

review = new Review('<?php echo $this->getUrl('checkout/onepage/saveOrder') ?>', '<?php echo $this->getUrl('checkout/onepage/success') ?>', $('checkout-agreements'));

So as we can see in the above changes, the major changes made are using of 3 new javascript classes Excellence,ExcellenceReview and ExcellenceShippingMethod. All these 3 javascript class are defined in removecheckout.js file.

Step3: Javascript Files

The source code the javascript file removecheckout.js is below

var Excellence = Class.create(Checkout, {
	initialize: function($super,accordion, urls){
		$super(accordion, urls);
		//New Code Addded
		this.steps = ['login','billing', 'shipping', 'shipping_method', 'review'];
var ExcellenceShippingMethod = Class.create(ShippingMethod , {
	initialize: function($super,form, saveUrl){
		$super(form, saveUrl);
	nextStep: function(transport){
        if (transport && transport.responseText){
                response = eval('(' + transport.responseText + ')');
            catch (e) {
                response = {};

        if (response.error) {
            return false;
var ExcellenceReview = Class.create(Review,{
	initialize: function($super,saveUrl, successUrl, agreementsForm){
		$super(saveUrl, successUrl, agreementsForm);
	save: function(){
        if (checkout.loadWaiting!=false) return;
        var params = 'payment[method]=free';
        if (this.agreementsForm) {
            params += '&'+Form.serialize(this.agreementsForm);
        } = true;
        var request = new Ajax.Request(
                onComplete: this.onComplete,
                onSuccess: this.onSave,
                onFailure: checkout.ajaxFailure.bind(checkout)

There is not much to explain here except one important thing, in the ExcellenceReview class, i have put in the code

var params = 'payment[method]=free';

Here ‘free’ is the code of the payment method i am setting as default. So, if you setting some other payment method you need to put in that payment method’s code.

Step5: Controller

We need to override the default OnepageController.php and place in new code inside the saveShippingMethodAction() action. Here what we need to do is, set the payment method ‘free’ into the quote object when the shipping step is completed, and then redirect directly to the review step. So code to be added is

					$data = array('method'=>'free');
					$result = $this->getOnepage()->savePayment($data);
					$redirectUrl = $this->getOnepage()->getQuote()->getPayment()->getCheckoutRedirectUrl();
					if (empty($result['error']) && !$redirectUrl) {
						$result['goto_section'] = 'review';
						$result['update_section'] = array(
	                    'name' => 'review',
	                    'html' => $this->_getReviewHtml()
					if ($redirectUrl) {
						$result['redirect'] = $redirectUrl;
				} catch (Mage_Payment_Exception $e) {
					if ($e->getFields()) {
						$result['fields'] = $e->getFields();
					$result['error'] = $e->getMessage();
				} catch (Mage_Core_Exception $e) {
					$result['error'] = $e->getMessage();
				} catch (Exception $e) {
					$result['error'] = $this->__('Unable to set Payment Method.');

Details are found in the module.

Step6: Override the Free Payment Method

This is a special step required, only when using the ‘free’ payment method only. By default in magento, the ‘Free’ payment is available only when order total is zero. So we need to change this in the Free Payment method class, so as to allow it in our case also.
So the class Mage_Payment_Model_Method_Free is overriden by Excellence_Remove_Model_Method_Free and the function

public function isAvailable($quote = null)
		return true;

is used instead of default

public function isAvailable($quote = null)
        return parent::isAvailable($quote) && (!empty($quote))
            && (Mage::app()->getStore()->roundPrice($quote->getGrandTotal()) == 0);

After doing this everything should work fine and payment method will not show up in checkout

Magento Onepage Checkout  - Remove Payment Step

Magento Onepage Checkout – Remove Payment Step

Step7: Email

Next we need to remove the payment block from the email sent as well. This is very simple, open you email template files usually located at
1. app\locale\en_US\template\email\sales\order_new.html
2. app\locale\en_US\template\email\sales\order_new_guest.html
Find this code in the template files {{var payment_html}} and remove it.

That’s it, these are all the steps required.
  • Hi

    I’m trying to install this now and just wanted to conform where this bit of the script needs to go:


    I have a config.xml file in app/code/local/Mage/page/etc/config.xml

    Is this the correct place?

    Many Thanks

    • Manish Prakash

      The best way to install this on your site is to download my module and upload it to your magento.
      But from your question, it seems like your are not using my module or you dont have your own module? Am i right?

  • Hi Manish

    I’m trying to use your module – just a little unsure where it needs to be uploaded and what amends ( if any ) I need to make in order to get it working.

    Once uploaded do I need to make any changes to the code apart from changing :

    var params = ‘payment[method]=free’;I am using Check / Money order – what does this need to be changed to?Many ThanksJason

    • Manish Prakash

      After you upload the module you need to make change only to files
      the removecheckout.js and OnepageController.php
      payment[method]=free; need to make change here if you are using a different payment method. If your alright with the free payment method, then no more changes are needed. 

      • I’m using check / money order as payment method so what would this need chaging to in removecheckout.js?


        • Manish Prakash

          in the removecheckout.js you need to do
          var params = ‘payment[method]=checkmo’;

          and in the Excellence_Remove_OnepageController you need to change
          $data = array(‘method’=>’free’);
          $data = array(‘method’=>’checkmo’);

          hopefully this should do the trick. let me know if you face any problems.

          • Hi Manish

            I seem to have everything installed ok but now I get a blank screen on checkout/onepage/

            The module seems to be working as the payment method has been removed from the progress bar on the right hand side, it’s just the main conent that is not showing.

            All the products are virtual so don’t have billing or postal details on teh check out page. Will this affect anything

            Thanks for your help with this


          • Manish Prakash

            Do you get any error in log files or somewhere? blank screen means there is some php error. you need to find the error. read through my blog of error debugging maybe it will help to find the error.

          • I’ve got it working with simple products but I can’t get it workign wiht virtual products which I really need to.

            I see in onepagecontroller.php and removecheckout.js it checks to see if teh shipping mehtod is set.

            As the product is virtiual it doesnt have a shipping method so I can’t get past this step and review the order

            Can the references to shipping method be removed and which files would need to be edited to do this?


          • Manish Prakash

            I have uploaded the source code again, please check it now

          • Thanks I will give it a try and let you know how i get on.

            I really appreciate this Manish

          • I’m still not able to get past the billing information stage and review the order.

            Is there something I should look for in the updated code to make sure I have the correct version?


          • Manish Prakash

            It is working for me fine on my local system.

            Just check your Onepagecontroller.php for this line


            $method = ‘freeshipping_freeshipping’;

            $result = $this->getOnepage()->saveShippingMethod($method);


          • No it’s not in the latest version I downloaded. Where should I add it?


          • Manish Prakash

            It is not in this blog post.

            Your downloading source file this blog post right?

          • Thanks – no I didn’t download the source files from there! Its all working perfectly now

            I really appreciate the help you have given me in this. It’s much appreciated.

            Is there a way I can contact you privately as I would like to put a proposal to you?

            Many Thanks

          • Manish Prakash

            Yes you can contact me. Please use the form in the contact us. Then I will get an email

          • Mohsinrafiq

            what should i use for creditcard?

          • jeethendar

            i have 1 problem regarding in checkout page so help me

          • jeethendar

            are you their

  • Michael Fanini

    I succeeded in the remove shipping step method.

    Now I want to plug the remove payment step method so that I can go from adresses to directly the review.

    Do you think it is possible?

  • Patchlawler

    I have a question regarding this module in the file info.phtm there is the following code
    getChildHtml(‘button’) ?>

    I’m using and the button is contained within /onepage/review.phtml not onepage/review/info.phtml

    So at present there is no button rendered. Any ideas should I just copy the code for the button
    <button type="submit" title="__(‘Place Order’) ?>” class=”button btn-checkout” onclick=”;”>__(‘Place Order’) ?>
    from review.phtml into info.phtml ?

    • Manish Prakash

      In magento 1.4 the button code is directly placed in review.phtml file line 34

      <button type="submit" title="__(‘Place Order’) ?>” class=”button btn-checkout” onclick=”;”>__(‘Place Order’) ?>

      in my module i have not made any changes to review.phtml file, i have just changed the info.phtml file.

      So the button show up in the review.phtml itself. 

  • naga

    iam new to magento
    when iam adding coupon in discount coupons  textbox in onestepcheckout , it is applying but in totals it is taking last added coupon amount.

    • Manish Prakash

      There must be some problem in your magento theme. Do you get the same problem in default magento theme as well?

  • Hi there, so I have just implemented the source code you provide on here but for some reason on the checkout page once I click ‘continue’ under billing information nothing happens… any thought to fix it?

    If not, what do I need to do to ‘undo’ the source codes I did? I’m using magento btw

    • Nevermind, issue fixed 🙂

      • Troy

        How did you fix this issue?

      • imane

        how did you resolve that help me pleaaaaase i have the same problem

      • Mohsinrafiq

        Same problem here…. Any Help?

  • Hello, 
    I downloaded ans installed but when i am going to checkout doesn’t check my custom payment merthod that i setup and stack in last step.


  • garethdaine

     Any ideas on this Manish? Thanks.

  • really nice article

  • Mariya Davis

    Hi Manish,

    I followed your steps and download your module and did the below:

    i did the step1 in app/code/core/Mage/Checkout/etc/config.xml file

    in server : app/design/frontend/base/default/layout/remove.xml
    in server : app/design/frontend/base/default/template/remove
    in server : app/code/local
    in server : app/etc/modules/Excellence_Remove.xml
    in server : skin/frontend/base/default/js/removecheckout.js
    Then i flush the cahe in admin panel.And tabke add the proudct in to cart by clicking on the button Add to Cart.then i got an 404 error:`
    Whoops, our bad…

    The page you requested was not found, and we have a fine guess why.

    If you typed the URL directly, please make sure the spelling is correct.
    If you clicked on a link to get here, the link is outdated.

    What can you do?
    Have no fear, help is near! There are many ways you can get back on track with Magento Store.

    Go back to the previous page.
    Use the search bar at the top of the page to search for your products.
    Follow these links to get you back on track!
    Store Home | My Account

    How can i solve this?What is the mistake in code?My magento version is
    Anybody have any idea about this?all helps are appreciatable.
    I need a the solution immediately.Plz help me ……

  • Mohsinrafiq

    what is the path for file

  • Hello, Plz tell me how to Removing Step 2 “Shipping Information” from Magento!

    Thanks so much!

  • Hello,
    I installed the extension and at the checkout (it removed the payment) when i press the “Continue” button, doesn’t do nothing… what can be the problem?

    • Keshav yadav

      Same Problem please help ASAP

  • iLoveMage

    One of the powerful module to enhance your customer experience by making your 6 steps checkout into 1 single step. Best Selling one step checkout for magento community, professional and enterprise version


  • heaven78

    Hi Manish,
    first thanks for your extension. I tested it with CE and i recognized that instead of


    the folder structure should be:


    All other things run smooth.
    Keep on your good work!

  • David Bania

    For magento 1.8.x I had to update the javascript in info.phtml to include the Form Key:


    review = new ExcellenceReview('getUrl(‘checkout/onepage/saveOrder’, array(‘form_key’ => Mage::getSingleton(‘core/session’)->getFormKey())) ?>’, ‘getUrl(‘checkout/onepage/success’) ?>’, $(‘checkout-agreements’));


  • Keshav yadav

    I installed the extension and at the checkout (it removed the payment)
    when i press the “Continue” button, doesn’t do nothing… what can be
    the problem?

  • Tom Garcia

    Is this still available to download? Can’t find any download links


  • Adela Militaru

    Hi Manish
    where ist your module? I cannot find it!

    • Adela Militaru

      “Removing the payment method step is very complex and require many files changes, so this blog would be lengthy again [:)]. Attached is source code for the module”
      Where is this extention attached?
      Can somebody help me???

      Tanks, Adela

  • Anto Nishanth

    Hi, how to download, I can find any download links here

  • Pawan Shukla

    Hi Manish,

    I have followed your instructions to remove the payment method from the checkout steps. I have made changes in every file as per the instructions given in the blog. There is a problem with the place order. When I click on the place order button, nothing happens.

    I am using Magento 1.9.

    I will appreciate your valuable comments on this.

    • Riyaz Pathan

      Please update info.phtml file and change first parameter with form key.

      review = new ExcellenceReview(‘getUrl(‘checkout/onepage/saveOrder’, array(‘form_key’ => Mage::getSingleton(‘core/session’)->getFormKey())) ?>’, ‘getUrl(‘checkout/onepage/success’) ?>’, $(‘checkout-agreements’));