AbanteCart Community

AbanteCart Development => Customization help => Topic started by: masalachai on January 18, 2017, 03:36:52 PM

Title: Set Guest Checkout as default login on account/login page?
Post by: masalachai on January 18, 2017, 03:36:52 PM
Anybody know how to make the "checked" bullet for the account/login page  Register Account be set to Guest Checkout instead?
The other option (actually preferred because it skips a step) is to bypass the account/login page completely and go straight to /abantecart/index.php?rt=checkout/guest_step_1 from the Checkout buttons.

UPDATE:
Just did it this way, erased the social bookmarks block with this. Works!

 <a class="btn btn-orange btn-lg pull-right" href="/abantecart/index.php?rt=checkout/guest_step_1">Checkout</a>



Title: Re: Set Guest Checkout as default login on account/login page?
Post by: eCommerce Core on January 21, 2017, 12:34:08 PM
You can change this in the controller by setting default value to 'guest' instead of register:
public_html/storefront/controller/pages/account/login.php:152

Change
Code: [Select]
'value'   => (isset($this->session->data['account']) ? $this->session->data['account'] : 'register'),
To
Code: [Select]
'value'   => (isset($this->session->data['account']) ? $this->session->data['account'] : ''),

and

Code: [Select]
'value'   => ($this->session->data['account'] == 'guest' ? 'guest' : ''),
to
Code: [Select]
'value'   => ($this->session->data['account'] == 'guest' ? 'guest' : 'guest'),