Customizing Onepage Checkout - Remove login

Last modified by KeyboardCowboy on Thu, June 24, 2010 17:03
Source|Old Revisions  

This is an old revision of the document!

Look at the Old Revisions to see a version, which is working with Magento 1.1.X and Internet Explorer (6, 7 and 8)!

How to remove login block from OnepageCheckout. Every customer checkout as guest.

This is working with Magento 1.2.1 in Firefox, but not in Internet Explorer!

1.) /app/design/frontend/default/detault/layout/checkout.xml

Comment out or remove the reference to “checkout.onepage.login” addLink under the checkout_onepage_index section.

  1. <!-- <block type="checkout/onepage_login" name="checkout.onepage.login" as="login" template="checkout/onepage/login.phtml"/> -->

2.) /app/design/frontend/default/default/template/checkout/onepage.phtml

Edit the code at the bottom (see line 2 line 19):

  1. <!-- ADD THIS NEXT LINE!!! -->
  2. <input type="hidden" name="checkout_method" id="login:guest" checked="checked" value="guest"/>
  4. <script type="text/javascript">
  5. //<![CDATA[
  6.     var accordion = new Accordion('checkoutSteps', '.head', true);
  7.     <?php if($this->getActiveStep()): ?>
  8.     accordion.openSection('opc-billing');
  9.     <?php endif ?>
  11.     var checkout = new Checkout(accordion,{
  12.         progress: '<?php echo $this->getUrl('checkout/onepage/progress') ?>',
  13.         review: '<?php echo $this->getUrl('checkout/onepage/review') ?>',
  14.         saveMethod: '<?php echo $this->getUrl('checkout/onepage/saveMethod') ?>',
  15.         failure: '<?php echo $this->getUrl('checkout/cart') ?>'}
  16.     );
  18.     // Go to the next method on start (it will look for the input we added above)
  19.     checkout.setMethod();  // MAKE SURE TO ADD THIS LINE!!!
  20. //]]>
  21. </script>

The checkout.setMethod() will move to the next checkout method (billing) if it sees that the input for a guest is checked (hence why we add the hidden input)Code Text


Magento 2 GitHub Repository

Magento Job Board - Some sort of tag line goes here

Latest Posts| View all Jobs