This is the API docs for LemonStand V1, which has been discontinued. LemonStand is now a cloud based platform, available at lemonstand.com.

LemonStand API

shop:login CMS action

Defined in /modules/shop/classes/shop_actions.php, lines 770-776
Author LemonStand eCommerce Inc.
Base action for the Login page. Also, the action allows to create combined pages with both the login and signup forms.

Supported form fields

Field Type Context Description
email string Login form specifies a customer email address. Required.
password string Login form specifies a customer password. Required.
login string Login form specifies a name of a submit button element for the POST (non AJAX) form submit method.
redirect string Login and Sign up forms an optional URL string for redirecting a visitor's browser after the successful logging in.
first_name string Sign up form specifies the customer first name. Required.
last_name string Sign up form specifies the customer last name.Required.
email string Sign up form specifies the customer email.Required.
password string Sign up form specifies the customer password. Optional.
password_confirm string Sign up form specifies the customer password confirmation.
signup string Sign up form specifies a name of a submit button element for the POST (non AJAX) form submit method.
flash string Sign up form specifies a message to display on the target redirection page.
customer_auto_login boolean Sign up form enables the automatic customer login feature.

Built-in AJAX handlers

Handler Description
shop:on_login Processes the customer login form.
shop:on_signup Processes the customer signup form.

Supported form field details

email form field

Context: Login form

Specifies a customer email address. Required.

password form field

Context: Login form

Specifies a customer password. Required.

login form field

Context: Login form

Specifies a name of a submit button element for the POST (non AJAX) form submit method.

redirect form field

Context: Login and Sign up forms

An optional URL string for redirecting a visitor's browser after the successful logging in. Use root_url() function if your copy of LemonStand is installed in a subdirectory. To redirect to the originally requested page you can use the Cms_Controller::redirect_url() method. Example:
<input type="hidden" value="<?= $this->redirect_url('/') ?>" name="redirect"/>

first_name form field

Context: Sign up form

Specifies the customer first name. Required.

last_name form field

Context: Sign up form

Specifies the customer last name.Required.

email form field

Context: Sign up form

Specifies the customer email.Required.

password form field

Context: Sign up form

Specifies the customer password. Optional.

password_confirm form field

Context: Sign up form

Specifies the customer password confirmation. This filed is required if the password field is presented on the form.

signup form field

Context: Sign up form

Specifies a name of a submit button element for the POST (non AJAX) form submit method.

flash form field

Context: Sign up form

Specifies a message to display on the target redirection page. Use the flash_message() function on the target page to display the message.

customer_auto_login form field

Context: Sign up form

Enables the automatic customer login feature. Accepted values are: 0, 1.

Built-in AJAX handlers details

shop:on_login AJAX handler

Processes the customer login form. Use this handler for creating the Login link or button on the Login form. Example:
<a href="#" onclick="return $(this).getForm().sendRequest('shop:on_login')">Login</a>

shop:on_signup AJAX handler

Processes the customer signup form. Use this handler for creating the Signup link or button on the Signup form. Example:
<a href="#" onclick="return $(this).getForm().sendRequest('shop:on_signup')">Signup</a>