A client wanted every checkout on his site to be a guest checkout. He was selling a very niche product and wanted to avoid hassling potential customers with a user log-in or registration form. The goal was to modify Magento’s One Page Checkout to completely skip Step 1: Login/Register and show Step 2: Billing Information.
We are going to:
- Hide Step 1
- Tell Magento that Step 1 was “completed” as Guest
- Have Step 2 appear as Step 1
Here goes:
1. Hiding Step 1 – Login/Register
Open /app/design/frontend/<your_company>/<your_company>/template/checkout/onepage.phtml
Find:
<li id="opc-<?php echo $_stepId ?>" {...}And replace it with:
<li <?php echo $i==1 ? 'style="display:none;"' : '' ?> id="opc-<?php echo $_stepId ?>" {...}
2. Set Step 1 to equal Guest
Open /app/design/frontend/<your_company>/<your_company>/template/checkout/onepage/login.phtml
Basically, comment everything out and insert:
<input type="hidden" name="checkout_method" id="login:guest" value="guest" checked="checked" /> <script type="text/javascript"> Event.observe(window, 'load', function() { checkout.setMethod(); }); </script>
3. Make Step 2 look like Step 1
Open /app/design/frontend/<your_company>/<your_company>/template/checkout/onepage.phtml
Find:
$i=0; foreach($this->getSteps() as $_stepId => $_stepInfo):
And replace it with:
$i=-1; foreach($this->getSteps() as $_stepId => $_stepInfo):
Finally, in the same file, change this snippet that we added in step 1:
echo $i==1
to:
echo $i===0
And there you have it. Credit goes to poster imagebox on this particular Magento how-to thread





Jan 10
Worked perfectly. Thanks!
Jun 10
At first it seemed that this solution worked perfectly. But it seems that “Guest” is not selected by default in IE 6. Any suggestions would be fantastic. This is a great tip.
Jul 10
thanks..its great…:)
Jul 10
Eric, in post #10 from the thread of which this article is based on you can see how to correct the internet explorer error. Basically you need to use this code instead in login.phtml
Event.observe(window, ‘load’, function() {
// fix for IE
var cb = $(“login:guest”);
cb.checked = true;
checkout.setMethod();
});
Sep 10
Hi,
it doesn’t work…and I dont understand why…..
I have also the billing form hide…
Please help me!!!
Thanks
Nov 10
I am getting a message when placed a order.
“Sorry, guest checkout is not enabled. Please try again or contact store owner”.
Do you have any idea how fix this issue?
I am running in Magento 1.4.0
Dec 10
Worked like a charm using IE update posted by @Tiago.
Thanks to both of you.
P.S. for those using Magento V 1.4.1 if you can’t find the files onepage.phtml and onepage/login.phtml look under
app/design/frontend/base/defalt/template/checkout/
Dec 10
This works brilliantly!
Is it possible to use a similar method to skip shipping info / shipping method / payment information?
All of these are defaults on the store I’m creating and so it would be useful to skip them.
Matt
Jan 11
I am getting error on Checkout Now button (onepage checkout last step), the error is:
“Please check billing address information. Please enter first name. Please enter last name. Please enter street. Please enter city. Please enter telephone. Please enter zip/postal code. Please enter country. Please enter state/province.”
Please help me to remove this issues.
Thanks
Noman
Aug 11
This worked, thanks!