Page 1 of 1

Automatically choose guest checkout option?

Posted: Sat Jul 31, 2010 3:09 am
by boon4376
I am using opencart as a Direct Response checkout for a product. Not really the store feature.

I need the cart to be as simple as possible. The less clicks, the better. 1 click is optimal however probably not possible without a lot of ajax in this case...

However automatically choosing the "guest checkout" option would eliminate yet another click.

How can I go about making it so that there is only the guest checkout option and it is automatically chosen when the user clicks "checkout"?

Re: Automatically choose guest checkout option?

Posted: Sat Jul 31, 2010 3:15 am
by boon4376
I have an idea... I used this tweak to remove a click by automatically choosing shipping and payment method
http://www.opencart.com/index.php?route ... path=47_48

I think I can apply the same principle to when the user gets to the page
/index.php?route=account/login
^^ which is where they can either login or select guest.

I think If there is somewhere on that page for for me to add this line of code it will work
$this->redirect(HTTPS_SERVER . 'index.php?route=checkout/guest_step_1');
^^ which might auto-redirect from the account login page to the first step of guest checkout.

But the question is, where can I stick that code?

Re: Automatically choose guest checkout option?

Posted: Sat Jul 31, 2010 5:39 am
by boon4376
Figured it out. In Catelog -> Controller - > Checkout - > shipping.php

Find this:

Code: Select all

		if (!$this->customer->isLogged()) {
			$this->session->data['redirect'] = HTTPS_SERVER . 'index.php?route=checkout/shipping';

	  		$this->redirect(HTTPS_SERVER . 'index.php?route=account/login');
    	} 
And change it to this

Code: Select all

		if (!$this->customer->isLogged()) {
			$this->session->data['redirect'] = HTTPS_SERVER . 'index.php?route=checkout/shipping';

	  		$this->redirect(HTTPS_SERVER . 'index.php?route=checkout/guest_step_1');
    	} 
Which, instead of taking the user to the login screen, takes them directly to the first page of the guest checkout.

This combined with the tweak mentioned earlier has significantly shortened the journey from adding the item to the cart and paying.

Re: Automatically choose guest checkout option?

Posted: Sat Jul 31, 2010 7:40 am
by JAY6390
You should also get the account/login controller to redirect to that page too

Re: Automatically choose guest checkout option?

Posted: Wed Aug 04, 2010 2:05 am
by Qphoria
Here is the tutorial for that already
http://forum.opencart.com/viewtopic.php?f=20&t=10814

Re: Automatically choose guest checkout option?

Posted: Tue Aug 17, 2010 3:32 am
by boon4376
JAY6390 wrote:You should also get the account/login controller to redirect to that page too
I deleted those links from the navigation menu