Customizing Onepage Checkout - Remove login
This is an old revision of the document!
How to remove login block from OnepageCheckout. Every customer checkout as guest.
This is working with Magento 1.1.6!
1.) Onepage.php
- public function getSteps()
- {
- $steps = array();
- if (!$this->isCustomerLoggedIn()) {
- //$steps['login'] = $this->getCheckout()->getStepData('login');
- $steps['billing'] = array("label"=>"Billing Information", "allow"=>true);
- }
- $stepCodes = array('shipping', 'shipping_method', 'payment', 'review');
- foreach ($stepCodes as $step) {
- $steps[$step] = $this->getCheckout()->getStepData($step);
- }
- return $steps;
- }
- public function getActiveStep()
- {
- return 'billing';
- }
2.) opcheckout.js Class Checkout Function setMethod
- setMethod: function(){
- //if ($('login:guest') && $('login:guest').checked) {
- this.method = 'guest';
- var request = new Ajax.Request(
- this.saveMethodUrl,
- {method: 'post', onFailure: this.ajaxFailure.bind(this), parameters: {method:'guest'}}
- );
- Element.hide('register-customer-password');
- this.gotoSection('billing');
- /*}
- else if($('login:register') && ($('login:register').checked || $('login:register').type == 'hidden')) {
- this.method = 'register';
- var request = new Ajax.Request(
- this.saveMethodUrl,
- {method: 'post', onFailure: this.ajaxFailure.bind(this), parameters: {method:'register'}}
- );
- Element.show('register-customer-password');
- this.gotoSection('billing');
- }
- else{
- alert(Translator.translate('Please choose to register or to checkout as a guest'));
- return false;
- }*/
- },
3.) billing.phtml (Template) Here you need to remove or comment out the input-fields for passwords.


