Magento Onepage Checkout – Do not Jump to Footer

Magento Onepage Checkout is designed to quickly move your customer through the shopping cart but opening and closing sections as they complete them all on one page.  One common issue with this feature is that some have experienced that the “drop” to the next section throws the customer down to the footer instead of showing the top of their section. This is an easy fix in Magento 1.9.

Code Amendment

You simply will stick a chunk of code into the following page:

/app/design/frontend/base/default/template/checkout/onepage.phtml

(or the one page file within your theme folder)

 

Insert this code:

 

checkout.gotoSection = function (section, reloadProgressBlock) {
    Checkout.prototype.gotoSection.call(this, section, reloadProgressBlock);
    $('opc-' + section).scrollTo();
};


Below:

var checkout = new Checkout(....);