Skip to main content
correct custom path
Source Link

When you click on the back button in the onepage steps, you are calling a js prototype method Checkout.prototype.back() (see skin/frontend/base/default/js/opcheckout.js:245).

So, one way to modify the actual behaviour is to override this method :

  1. If not already done, copy in your theme the file app/design/frontend/base-or-rwd/default/template/checkout/onepage.phtml. Then, after the line

    getSkinUrl('js/opcheckout.js') ?>">

Add the following line to add your own js file (that we will create soon) :

<script type="text/javascript" src="<?php echo $this->getSkinUrl('js/opcheckout-override.js') ?>"></script>
  1. In your theme, create the file skin/frontend/<your-theme>package>/default<your-theme>/js/opcheckout-override.js.

  2. In this file, we have to override the Checkout.prototype.back() method. I did not test it but we could write something like :

    Checkout.prototype.back = Checkout.prototype.back.wrap(function(parentMethod) {

     if (this.loadWaiting) return;
    
     if(this.currentStep == 'shipping_method'){
         this.changeSection('opc-billing');
     }
     else{
        parentMethod();
     }
    

    });

Hope it helps.

When you click on the back button in the onepage steps, you are calling a js prototype method Checkout.prototype.back() (see skin/frontend/base/default/js/opcheckout.js:245).

So, one way to modify the actual behaviour is to override this method :

  1. If not already done, copy in your theme the file app/design/frontend/base-or-rwd/default/template/checkout/onepage.phtml. Then, after the line

    getSkinUrl('js/opcheckout.js') ?>">

Add the following line to add your own js file (that we will create soon) :

<script type="text/javascript" src="<?php echo $this->getSkinUrl('js/opcheckout-override.js') ?>"></script>
  1. In your theme, create the file skin/frontend/<your-theme>/default/js/opcheckout-override.js.

  2. In this file, we have to override the Checkout.prototype.back() method. I did not test it but we could write something like :

    Checkout.prototype.back = Checkout.prototype.back.wrap(function(parentMethod) {

     if (this.loadWaiting) return;
    
     if(this.currentStep == 'shipping_method'){
         this.changeSection('opc-billing');
     }
     else{
        parentMethod();
     }
    

    });

Hope it helps.

When you click on the back button in the onepage steps, you are calling a js prototype method Checkout.prototype.back() (see skin/frontend/base/default/js/opcheckout.js:245).

So, one way to modify the actual behaviour is to override this method :

  1. If not already done, copy in your theme the file app/design/frontend/base-or-rwd/default/template/checkout/onepage.phtml. Then, after the line

    getSkinUrl('js/opcheckout.js') ?>">

Add the following line to add your own js file (that we will create soon) :

<script type="text/javascript" src="<?php echo $this->getSkinUrl('js/opcheckout-override.js') ?>"></script>
  1. In your theme, create the file skin/frontend/<your-package>/<your-theme>/js/opcheckout-override.js.

  2. In this file, we have to override the Checkout.prototype.back() method. I did not test it but we could write something like :

    Checkout.prototype.back = Checkout.prototype.back.wrap(function(parentMethod) {

     if (this.loadWaiting) return;
    
     if(this.currentStep == 'shipping_method'){
         this.changeSection('opc-billing');
     }
     else{
        parentMethod();
     }
    

    });

Hope it helps.

add rwd possibility
Source Link

When you click on the back button in the onepage steps, you are calling a js prototype method Checkout.prototype.back() (see skin/frontend/base/default/js/opcheckout.js:245).

So, one way to modify the actual behaviour is to override this method :

  1. If not already done, copy in your theme the file app/design/frontend/base-or-rwd/default/template/checkout/onepage.phtml. Then, after the line

    getSkinUrl('js/opcheckout.js') ?>">

Add the following line to add your own js file (that we will create soon) :

<script type="text/javascript" src="<?php echo $this->getSkinUrl('js/opcheckout-override.js') ?>"></script>
  1. In your theme, create the file skin/frontend/<your-theme>/default/js/opcheckout-override.js.

  2. In this file, we have to override the Checkout.prototype.back() method. I did not test it but we could write something like :

    Checkout.prototype.back = Checkout.prototype.back.wrap(function(parentMethod) {

     if (this.loadWaiting) return;
    
     if(this.currentStep == 'shipping_method'){
         this.changeSection('opc-billing');
     }
     else{
        parentMethod();
     }
    

    });

Hope it helps.

When you click on the back button in the onepage steps, you are calling a js prototype method Checkout.prototype.back() (see skin/frontend/base/default/js/opcheckout.js:245).

So, one way to modify the actual behaviour is to override this method :

  1. If not already done, copy in your theme the file app/design/frontend/base/default/template/checkout/onepage.phtml. Then, after the line

    getSkinUrl('js/opcheckout.js') ?>">

Add the following line to add your own js file (that we will create soon) :

<script type="text/javascript" src="<?php echo $this->getSkinUrl('js/opcheckout-override.js') ?>"></script>
  1. In your theme, create the file skin/frontend/<your-theme>/default/js/opcheckout-override.js.

  2. In this file, we have to override the Checkout.prototype.back() method. I did not test it but we could write something like :

    Checkout.prototype.back = Checkout.prototype.back.wrap(function(parentMethod) {

     if (this.loadWaiting) return;
    
     if(this.currentStep == 'shipping_method'){
         this.changeSection('opc-billing');
     }
     else{
        parentMethod();
     }
    

    });

Hope it helps.

When you click on the back button in the onepage steps, you are calling a js prototype method Checkout.prototype.back() (see skin/frontend/base/default/js/opcheckout.js:245).

So, one way to modify the actual behaviour is to override this method :

  1. If not already done, copy in your theme the file app/design/frontend/base-or-rwd/default/template/checkout/onepage.phtml. Then, after the line

    getSkinUrl('js/opcheckout.js') ?>">

Add the following line to add your own js file (that we will create soon) :

<script type="text/javascript" src="<?php echo $this->getSkinUrl('js/opcheckout-override.js') ?>"></script>
  1. In your theme, create the file skin/frontend/<your-theme>/default/js/opcheckout-override.js.

  2. In this file, we have to override the Checkout.prototype.back() method. I did not test it but we could write something like :

    Checkout.prototype.back = Checkout.prototype.back.wrap(function(parentMethod) {

     if (this.loadWaiting) return;
    
     if(this.currentStep == 'shipping_method'){
         this.changeSection('opc-billing');
     }
     else{
        parentMethod();
     }
    

    });

Hope it helps.

Source Link

When you click on the back button in the onepage steps, you are calling a js prototype method Checkout.prototype.back() (see skin/frontend/base/default/js/opcheckout.js:245).

So, one way to modify the actual behaviour is to override this method :

  1. If not already done, copy in your theme the file app/design/frontend/base/default/template/checkout/onepage.phtml. Then, after the line

    getSkinUrl('js/opcheckout.js') ?>">

Add the following line to add your own js file (that we will create soon) :

<script type="text/javascript" src="<?php echo $this->getSkinUrl('js/opcheckout-override.js') ?>"></script>
  1. In your theme, create the file skin/frontend/<your-theme>/default/js/opcheckout-override.js.

  2. In this file, we have to override the Checkout.prototype.back() method. I did not test it but we could write something like :

    Checkout.prototype.back = Checkout.prototype.back.wrap(function(parentMethod) {

     if (this.loadWaiting) return;
    
     if(this.currentStep == 'shipping_method'){
         this.changeSection('opc-billing');
     }
     else{
        parentMethod();
     }
    

    });

Hope it helps.