Post by sferris » Sat Jul 16, 2011 12:54 am

I searched for this, but most solutions seem to be pre-1.5.

I would like to have a basic checkout with no accounts. So, ideally, when a customer clicks checkout, it will take them to step 2 of the guest checkout.

And, if it's not too much to ask, is there a way to remove the country drop-down during checkout? I've removed everything but the United States, but since the States are populated based on it, I'm not sure how to do that.

Thank you in advance!

New member

Posts

Joined
Sat Jul 16, 2011 12:46 am

Post by i2Paq » Sat Jul 16, 2011 12:55 am

Just remove the part where you can create an account and leave the guest checkout part in tact.

You only need to modify your theme for this I guess.

Norman in 't Veldt
Moderator OpenCart Forums

_________________ READ and Search BEFORE POSTING _________________

Our FREE search: Find your answer FAST!.

[How to] BTW + Verzend + betaal setup.


User avatar
Global Moderator

Posts

Joined
Mon Nov 09, 2009 7:00 pm
Location - Winkel - The Netherlands

Post by sferris » Sat Jul 16, 2011 3:33 am

I was going to just comment that section out, but you have to select Register Account or Guest Account on the first step and then it automatically updates Step 2. How would I tell it to go to the Guest Account settings?

New member

Posts

Joined
Sat Jul 16, 2011 12:46 am

Post by jenstm » Sat Jul 16, 2011 7:01 pm

I have same issue as you, but no one seems to know, hence no answers.
Please post if you find a way. So will I.

Best regards,

Jens

Newbie

Posts

Joined
Fri Jul 15, 2011 7:33 am

Post by gtamborero » Sat Aug 20, 2011 12:39 am

Hi!
I'm having the same problem.
By the way I have done a little trick to skip de shipping option. This code only autoclicks de button on "continue".

I know it's not the best way to do it but its a way! (It works on Mozilla and Explorer but I think it doesn't in safari)

On catalog/view/theme/default/template/checkout/shipping.tpl add this line:

<script language="Javascript" type="text/javascript">
function clickTheDurnLink(){
document.getElementById('button-shipping').click();
}
window.setTimeout("clickTheDurnLink()", 0);
</script>

just befor this one (line 36):
<div class="buttons">
<div class="right"><a id="button-shipping" class="button"><span><?php echo $button_continue; ?></span></a></div>
</div>

Today or tomorrow I will try to auto-select the non-member checkout radiobutton and auto-click the continue button.

Cheerrs!
Guillermo

Newbie

Posts

Joined
Fri Aug 19, 2011 5:24 pm

Post by gtamborero » Sat Aug 20, 2011 1:09 am

Hi!
As I said in the last post, it's easy to Autoselect the non-registered checkout option and autoclick button of "continue".
This it's ok to me right now...
Remember that it's a trick. The customers will be able to go back with the "modify" button of the right side to change anything he want.

That's the file to modify:
catalog/view/theme/default/template/checkout/login.tpl
That's the code to put on the first line:

Code: Select all

<script language="Javascript" type="text/javascript">
function clickTheDurnLink(){
document.getElementById('button-account').click();
}
window.setTimeout("clickTheDurnLink()", 0);
</script>
To autoselect always the non-registered user checkout have a look at the code:

Code: Select all

    <input type="radio" name="account" value="register" id="register" checked="checked"/>
    <?php } else { ?>
    <input type="radio" name="account" value="register" id="register" />
    <?php } ?>
    <b><?php echo $text_register; ?></b></label>
  <br />
  <?php if ($guest_checkout) { ?>
  <label for="guest">
    <?php if ($account == 'guest') { ?>
    <input type="radio" name="account" value="guest" id="guest" checked="checked" />
    <?php } else { ?>
    <input type="radio" name="account" value="guest" id="guest" />
and swap it with this one:

Code: Select all

    <input type="radio" name="account" value="register" id="register" />
    <?php } else { ?>
    <input type="radio" name="account" value="register" id="register" />
    <?php } ?>
    <b><?php echo $text_register; ?></b></label>
  <br />
  <?php if ($guest_checkout) { ?>
  <label for="guest">
    <?php if ($account == 'guest') { ?>
    <input type="radio" name="account" value="guest" id="guest" checked="checked" />
    <?php } else { ?>
    <input type="radio" name="account" value="guest" id="guest" checked="checked" />
Is it compatible with every navigator? Try on mozilla, explorer, safari, etc. The code is very simple so it should work... On my Safari it doesn't.

Newbie

Posts

Joined
Fri Aug 19, 2011 5:24 pm

Post by sferris » Tue Aug 23, 2011 11:13 am

Thank you so much, gtamborero! It does work on IE, I tried it on FF, Safari & Chrome and it does auto select the guest checkout, but it doesn't automatically advance to the address. It's still better than nothing.

New member

Posts

Joined
Sat Jul 16, 2011 12:46 am

Post by gtamborero » Tue Aug 23, 2011 5:53 pm

sferris wrote:Thank you so much, gtamborero! It does work on IE, I tried it on FF, Safari & Chrome and it does auto select the guest checkout, but it doesn't automatically advance to the address. It's still better than nothing.
That's the way I have the selection. (see link)
(I have deleted the customer register option, the Login sidebar, and arranged the text)

On mozilla should work! It does on mine ;) I will try to put a better code for all navigators...

Attachments

muestra.jpg

muestra.jpg (54.39 KiB) Viewed 31928 times


Newbie

Posts

Joined
Fri Aug 19, 2011 5:24 pm

Post by amarsanaag » Wed Aug 24, 2011 11:47 pm

Thanks, Guillermo! and all
I have a issue that is to hide all of steps except Step 2 - billing details and Step 6 - confirm order. In my store, customers add to cart then only fill personal details and confirm orders. How to do this customization? Please, give me some advice.
Thanks in advance.

Newbie

Posts

Joined
Wed Aug 24, 2011 11:37 pm

Post by gtamborero » Wed Aug 31, 2011 2:30 am

Hi There!
I have been improving the code for the multiple Auto - skip checkout proces on Opencart so now it's working on all browsers (mozilla, safari, Explorers, Chrome...)

To skip the account option just copy paste this code on the top of the catalog/view/theme/default/template/checkout/login.tpl:

Code: Select all

<script language="Javascript" type="text/javascript">
$(document).ready(function(){
  $('#button-account').trigger('click');
});
</script>
Remember to have a look to some older post I have done to autoselect login options.


To skip the shipping option just copy paste this code on the top of the catalog/view/theme/default/template/checkout/shipping.tpl:

Code: Select all

<script language="Javascript" type="text/javascript">
$(document).ready(function(){
  $('#button-shipping').trigger('click');
});
</script>

To skip the payment option just copy paste this code on the top of the catalog/view/theme/default/template/checkout/payment.tpl:

Code: Select all

<script language="Javascript" type="text/javascript">
$(document).ready(function(){
  $('#button-payment').trigger('click');
});
</script>
In these case, in opencart 1.5 you also will have to change this code (line 36):

Code: Select all

    <input type="checkbox" name="agree" value="1"/>
to this one:

Code: Select all

    <input type="checkbox" name="agree" value="1" checked="checked"/>
Remember that these tricks will only work if the default option is the one you want (or if you force opencart to autoselect one concrete option)

Newbie

Posts

Joined
Fri Aug 19, 2011 5:24 pm

Post by simpl3 » Thu Sep 08, 2011 3:40 am

My solution for skipping step 1 in the checkout process:

login.tpl

Code: Select all


  $('input[name=account]:eq(1)').attr('checked', 'checked');
  $('#button-account').trigger('click');

stylesheet

Code: Select all


#checkout {
	display: none;
}

because this skips registration and hides step 1 alomost immeadiately without animation, you have to edit your language file though (step 2 is now step 1 etc.)

Newbie

Posts

Joined
Tue Sep 06, 2011 4:23 am

Post by gtamborero » Thu Sep 08, 2011 3:44 pm

It works! Thanks Simpl3!

Newbie

Posts

Joined
Fri Aug 19, 2011 5:24 pm

Post by simpl3 » Thu Sep 08, 2011 4:24 pm

I used you Button autoclick Code, so thx to you, too

But again: registration should really be an Admin Option, how to Request this?

Newbie

Posts

Joined
Tue Sep 06, 2011 4:23 am

Post by sferris » Thu Sep 08, 2011 11:32 pm

I will try later today! Thank you!

New member

Posts

Joined
Sat Jul 16, 2011 12:46 am

Post by sferris » Fri Sep 23, 2011 1:17 am

simpl3 - that is genius! Worked perfectly! Thank you, thank you!

New member

Posts

Joined
Sat Jul 16, 2011 12:46 am

Post by simpl3 » Fri Sep 23, 2011 1:25 am

no problem

Newbie

Posts

Joined
Tue Sep 06, 2011 4:23 am

Post by Rebecka » Wed Sep 28, 2011 10:12 pm

I'm a little confused. I want to not only redirect customers from the checkout pages to the guest checkout pages, but also disable the login and account features. I have read what you have written but are unsure of what steps I should do.

Would you like to write how you solved this, step by step, that an amateur as I can understand? You have written so many codes here and I would also like to make it work in all browsers (if you have got it to work in all browsers).

Thanks in advance!

Update: I also want to disable country selection (only to have Sweden and its regions).

Rebecka went over to PrestaShop.


Active Member

Posts

Joined
Sun Sep 18, 2011 4:49 am
Location - Sweden

Post by Rebecka » Wed Sep 28, 2011 10:48 pm

simpl3 wrote:My solution for skipping step 1 in the checkout process:

login.tpl

Code: Select all


  $('input[name=account]:eq(1)').attr('checked', 'checked');
  $('#button-account').trigger('click');

stylesheet

Code: Select all


#checkout {
	display: none;
}

because this skips registration and hides step 1 alomost immeadiately without animation, you have to edit your language file though (step 2 is now step 1 etc.)
Ok, I think I should do this step in each case. Where can I find login.tpl?

By doing this I'll just redirect? How do I disable the login/account functions as well?

Rebecka went over to PrestaShop.


Active Member

Posts

Joined
Sun Sep 18, 2011 4:49 am
Location - Sweden

Post by simpl3 » Wed Sep 28, 2011 11:54 pm

template/checkout/login.tpl

just try and see if it fits your needs

login functionality is still there, buts its not visible to the user, of course you have to get rid of the stuff related to login in other parts of the layout (header e.g.)

Newbie

Posts

Joined
Tue Sep 06, 2011 4:23 am

Post by Rebecka » Thu Sep 29, 2011 5:13 am

Sorry, but I do not really understand.

Am I supposed to change, modify or add (?) this:

Code: Select all


  $('input[name=account]:eq(1)').attr('checked', 'checked');
  $('#button-account').trigger('click');

In the login.tpl file? Where and how?

This is how the login.tpl file looks like from the beginning:

Code: Select all

<div class="left">
  <h2><?php echo $text_new_customer; ?></h2>
  <p><?php echo $text_checkout; ?></p>
  <label for="register">
    <?php if ($account == 'register') { ?>
    <input type="radio" name="account" value="register" id="register" checked="checked" />
    <?php } else { ?>
    <input type="radio" name="account" value="register" id="register" />
    <?php } ?>
    <b><?php echo $text_register; ?></b></label>
  <br />
  <?php if ($guest_checkout) { ?>
  <label for="guest">
    <?php if ($account == 'guest') { ?>
    <input type="radio" name="account" value="guest" id="guest" checked="checked" />
    <?php } else { ?>
    <input type="radio" name="account" value="guest" id="guest" />
    <?php } ?>
    <b><?php echo $text_guest; ?></b></label>
  <br />
  <?php } ?>
  <br />
  <p><?php echo $text_register_account; ?></p>
  <a id="button-account" class="button"><span><?php echo $button_continue; ?></span></a><br />
  <br />
</div>
<div id="login" class="right">
  <h2><?php echo $text_returning_customer; ?></h2>
  <p><?php echo $text_i_am_returning_customer; ?></p>
  <b><?php echo $entry_email; ?></b><br />
  <input type="text" name="email" value="" />
  <br />
  <br />
  <b><?php echo $entry_password; ?></b><br />
  <input type="password" name="password" value="" />
  <br />
  <a href="<?php echo $forgotten; ?>"><?php echo $text_forgotten; ?></a><br />
  <br />
  <a id="button-login" class="button"><span><?php echo $button_login; ?></span></a><br />
  <br />
</div>
And this:

Code: Select all


#checkout {
	display: none;
}

In the stylesheet (stupid question perhaps, but where can I find the stylesheet?).

Rebecka went over to PrestaShop.


Active Member

Posts

Joined
Sun Sep 18, 2011 4:49 am
Location - Sweden
Who is online

Users browsing this forum: No registered users and 39 guests