Ajax Login
The Ajax Login collection of methods allows you to log in to Aurora by RPC.
This article describes what methods are available in this group and how to use them.
getLoginForm
Permission Required: None
Method Call: /ajax/Ajax_Login/getLoginForm
Aurora Demo Example URL: https://demo.auroracommerce.com/checkout
Aurora Demo Example JavaScript:
- templates/example.com/_js/generic.js
Method Description
Request Parameters
There are no request parameters for this AJAX interface.
Response Variables
Array Index | Values | Description |
---|---|---|
loginForm | String | The rendered AJAX login form template i.e. generic/login-form.tpl.html |
submitLoginForm
Please ensure that only POST data is submitted to this endpoint in order to avoid security and PCI compliance issues.
Permission Required: None
Method Call: /ajax/Ajax_Login/submitLoginForm
Aurora Demo Example URL: https://demo.auroracommerce.com/checkout
Aurora Demo Example JavaScript:
- templates/example.com/_js/generic.js
Method Description
Request Parameters
Parameter | Values | Description | Required |
---|---|---|---|
login_email_address | String | The email address to use during account creation. | Yes |
login_password | String | The password to use during account creation. | Yes |
Response Variables
Array Index | Values | Description |
---|---|---|
0 | Boolean | Was the login successful? |
1 | String | The error/success message relating to the request. |
Login Form Redirect
This allows you to redirect the customer to a specific URL on a successful login attempt.
If you are using the Aurora Multi-lingual system, then you should use this method to ensure the customer is redirected to the correct location on login.
Simply create a hidden HTML element containing the URL you would like the customer to be sent to, with the class "template_popup_login_form_redirect" applied to it, and Aurora's default JavaScript will redirect the customer as specified if they login successfully.
It is important to note that this is a default behaviour provided by Aurora's example Front-end Templates. Your site may not be using this JavaScript and if it does not work, you should check that the JavaScript in the example script referenced above is in fact in place to have it working.
<style>
.template_popup_login_form_redirect { display: none; }
</style>
<div class="template_popup_login_form_redirect">{getUrlPath url="/checkout"}</div>
submitRegisterForm
Permission Required: None
Method Call: /ajax/Ajax_Login/submitRegisterForm
Aurora Demo Example JavaScript:
- templates/example.com/_js/generic.js
This method allows you to create an account for a customer, but only currently supports the provision of the Email Address and Password. No other details are currently supported.
For a more comprehensive registration form, please see the Members: Login/Sign Up support article.
Method Description
Request Parameters
Parameter | Values | Description | Required |
---|---|---|---|
register_email_address | String | The email address to use during account creation. The email address is also used to generate the first name for the User's Account in Aurora. This is done by taking everything before the "@" symbol and using this for the user's first name, e.g. "[email protected]" would result in the first name of "test" for the customer's account. | Yes |
register_password | String | The password to use during account creation. | Yes |
Response Variables
Array Index | Values | Description |
---|---|---|
0 | Boolean | Was the request successful? |
1 | String | The error/success message relating to the request. |
Updated over 2 years ago