Thursday 5 July 2012

Onepage Checkout - Remove login in magnto

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

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

2: Create local.xml 

  1. <?xml version="1.0"?>
  2. <layout version="0.1.0">
  3. <checkout_onepage_index>
  4.       <reference name="content">
  5.              <! -- Complete process of removing steps is defined here: http://www.magentocommerce.com/wiki/5_-_modules_and_development/checkout/customizing_onepage_checkout_-_remove_shipping_method -->
  6.             <remove name="checkout.onepage.login"/>
  7.       </reference>
  8. </checkout_onepage_index>
  9. </layout>

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

  1. <!-- ADD THIS NEXT LINE!!! -->
  2. <input type="hidden" name="checkout_method" id="login:guest" checked="checked" value="guest"/>
  3.  
  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 ?>
  10.  
  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.     );
  17.  
  18.     // Go to the next method on start (it will look for the input we added above)
  19.     //IE fix
  20.     var cb = $("login:guest");
  21.     cb.checked = true;
  22.  
  23.     checkout.setMethod();  // MAKE SURE TO ADD THIS LINE!!!
  24. //]]>
  25. </script>
 

1 comment:

  1. Thanks for the module! this module is helpful for me

    ReplyDelete

Note: only a member of this blog may post a comment.