Author Topic: Set Guest Checkout as default login on account/login page?  (Read 4420 times)

Offline masalachai

  • Newbie
  • *
  • Posts: 28
  • Karma: +4/-0
    • View Profile
Set Guest Checkout as default login on account/login page?
« 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>



« Last Edit: January 18, 2017, 05:15:36 PM by masalachai »

Offline eCommerce Core

  • Administrator
  • Hero Member
  • *****
  • Posts: 1602
  • Karma: +93/-1
    • View Profile
Re: Set Guest Checkout as default login on account/login page?
« Reply #1 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'),
“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

 

Powered by SMFPacks Social Login Mod