News:

AbanteCart v1.4.2 is released.

Main Menu

Check out as guest only?

Started by rachelsung, July 27, 2016, 03:39:51 AM

Previous topic - Next topic

rachelsung

Hi,

I would like to direct the customers as guest checkout only.  That means after click the "check out" button, the flow will skip choosing new customer/existing customers/checkout as guest page and go directly to "guest checkout step 1" page.  How should I do that?

I don't mind to change the code now.

Which files and values should I modify?

Thank you very much in advance.

eCommerce Core

The easiest way to do this is to change code in login controller.

/storefront/controller/pages/account/login.php

Add below line right after: public function main(){

$this->redirect($this->html->getSecureURL('checkout/guest_step_1'));

Essentially, what are you doing, is forcing any login attempt to go to guest checkout.

If you need to do this in extension, you can hook to "_InitData" of this controller and do same redirect.
It is easy and straight forward.

"If you're in the luckiest one per cent of humanity, you owe it to the rest of humanity to think about the other 99 per cent."
― Warren Buffett

rachelsung

#2
hi, eCommerce Core:

Thank you for the prompt answer.

I followed the instruction to add the line in login.php and it worked perfectly !

Thank you so much ! :D

Forum Rules Code of conduct
AbanteCart.com 2010 -