AbanteCart Community
AbanteCart Development => Customization help => Topic started by: rachelsung on July 27, 2016, 03:39:51 AM
-
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.
-
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.
-
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