shop:signup CMS action
Defined in |
/modules/shop/classes/shop_actions.php, lines 812-816 |
Author |
LemonStand eCommerce Inc. |
Base action for the Customer Signup page.
The action processes the signup form data, creates a customer account and sends an email notification to the customer.
Field |
Type |
Description |
first_name |
string |
specifies the customer first name. Required. |
last_name |
string |
specifies the customer last name. Required. |
email |
string |
specifies the customer email. Required. |
signup |
string |
a name of the SUBMIT button element for the POST (non AJAX) form submit method. |
company |
string |
specifies the customer's company name. |
phone |
string |
specifies the phone number. |
billing_state_id |
integer |
an identifier of the customer billing state. |
billing_country_id |
integer |
an identifier of the customer billing country. |
billing_street_addr |
string |
specifies the billing street address. |
billing_city |
string |
specifies the billing city name. |
billing_zip |
string |
specifies the billing ZIP/Postal code. |
redirect |
string |
an optional URL to redirect the visitor's browser after the signup. |
flash |
string |
a message to display on the target redirection page. |
Handler |
Description |
shop:on_signup |
Processes the customer signup form. |
Supported form field details
¶
first_name form field
Specifies the customer first name. Required.
¶
last_name form field
Specifies the customer last name. Required.
¶
email form field
Specifies the customer email. Required.
¶
signup form field
A name of the SUBMIT button element for the POST (non AJAX) form submit method.
The submit button should have name signup if you are implementing a regular POST form.
Alternatively you can create an AJAX form with shop:on_signup handler.
¶
company form field
Specifies the customer's company name.
¶
phone form field
Specifies the phone number.
¶
billing_state_id form field
An identifier of the customer billing state.
¶
billing_country_id form field
An identifier of the customer billing country.
¶
billing_street_addr form field
Specifies the billing street address.
¶
billing_city form field
Specifies the billing city name.
¶
billing_zip form field
Specifies the billing ZIP/Postal code.
¶
redirect form field
An optional URL to redirect the visitor's browser after the signup.
Note that if your copy of LemonStand is installed in a subdirectory, you need to use the root_url() function
in the redirect field value.
¶
flash form field
A message to display on the target redirection page.
Use the flash_message() function on the target page to display the message.
Built-in AJAX handlers details
¶
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>
|