Checkout
Possibly the most important page of the entire site, the checkout offers the ability for the customer to complete their purchase.
This article describes in brief detail a little about what is supported by the checkout and what variables are available to the Aurora Front-end Templates.
Submitting to checkout
Aurora expects the following values to exist for a submission to take place:
Variable | Description | Mandatory | Example |
---|---|---|---|
submit_order | User to confirm the checkout page is being submitted | Y | submit_order=true |
payment_type | The payment type used to place the order | Y | payment_type=credit_card |
delivery_option | The selected delivery option | Y | delivery_option=1 |
store_id | The ID of the store, if the delivery option is a store collection | N | store_id=1 |
Aurora Newsletter/Mailing-list Sign-up
Due to GDPR regulations, all customers who place an order must give explicit authorisation to be added to the newsletter using "checkout_mailing_list_opt_in".
Variable | Description | Mandatory | Example |
---|---|---|---|
checkout_mailing_list_opt_in | This dictates to Aurora whether the customer wishes to sign-up to the Aurora Newsletter. Default: 0 (i.e. by default, customers are not added to the newsletter mailing list) | N | 1 |
Debugging
If you are experiencing errors, you should checkout Store -> Failed Orders in Aurora for more in depth information. Due to potential fraud reasons, we will not always return the full explanation as to why the card failed, but an abbreviated version instead. In Failed Orders you will be able to see both.
You can put this code onto your checkout page to see what is being submitted when you place an order:
{$smarty.post|@print_r}
Aurora currently supports the following Payment Providers.
Features
-
Shipping
- Ability to change delivery options, depending on what country is selected
- Collect+
- Deliver to store
- Pick what day you want the item delivered
- Accurate estimates on when the items will arrive
-
Mini basket
-
Additional payment options:
- Gift cards
- Loyalty points
- Credit notes
- Multi-payment, e.g. 30% on gift card, 70% on card
-
Address
- Ability to login and choose an existing delivery address
- Postcode look-up
-
Error handling
- In line validation
- Storing any failed orders under Orders -> Failed Orders
- Customers can be emailed to lure them back onto the site
- Aurora also stores if someone leaves the page, even if they do not submit the form. This helps us to work out at what stage they left
-
Saving previously used cards, so you do not need to re-enter them again
Template Variables
Variable Name | Type | Description |
---|---|---|
$accepted_payment_types | Array | This contains an associative array of payment providers that are enabled for validation using the "Accepted Payment Types" configuration in the Aurora Back-end. |
$checkout_requires_user_account | Boolean | This variable describes whether the current basket will require a user account to be created during the checkout process. |
$basketReference | String | This is the Basket Reference assigned to the current sessions basket. |
$all_available_delivery_dates | Array [ String ] | This contains a list of possible delivery dates for the currently configured checkout session. |
$insufficient_stock | Boolean | This variable will indicate whether the basket is permitted to proceed to payment or not based on its current stock and shipping settings. |
$page | Container | Contains an array of all previously submitted checkout data (if there is any). |
$errors | Array [ String ] | An array of errors with keys describing their relevance. |
$shipChecked | String | Denotes whether the customer has opted to ship to their Shipping address. This will contain 'checked="checked"' when the shipping address is in use. |
$billChecked | String | Denotes whether the customer has opted to ship to their Billing address. This will contain 'checked="checked"' when the billing address is in use. |
$discount | Float | The total discount being applied to the current basket. |
$available_credit | Float | The total amount of Store Credit available to the current user. If the User is not logged in, then this will be 0 (Zero). |
$applied_credit | Float | The total amount of Store Credit being applied to the current basket. |
$currency_pre_text | String | This is the pre-text configured to be placed before any currency values to be displayed, e.g. £. These values are often not needed but are helpful for the JavaScript processes that are often needed on the checkout. |
$currency_post_text | String | This is the post-text configured to be placed after any currency values be displayed. These values are often not needed but are helpful for the JavaScript processes that are often needed on the checkout. |
$mini_basket | Array [ $basket_item ] | This is an array containing the $basket_item elements. |
$user_titles | Array [ String ] | This is a list of the Customer Titles configured in Aurora, e.g. Mr, Mrs, etc. |
$delivery_options | Array [ ] | A Container holding all available delivery/shipping options for the current session. |
$deliveryOption | Integer | This Internal ID used by Aurora to identify the currently selected delivery/shipping option under the current checkout session. |
$delivery_estimate | String | This value describes the estimated delivery date based on the currently configured checkout session. |
$card_types | Array [ String ] | This is a list of the Card Types currently configured in Aurora. |
$shipping_country_data | Array [ ] | This contains all details regarding the currently selected shipping country. |
$vat_amount | Float | The total amount of Tax (referred to as VAT in the UK) payable on the current basket. |
$stores | Array [ ] | An array of the Stores configured in Aurora. |
$order_additional_fields | Array [ String ] | This is a list of the available Order Additional Fields configured in Aurora for collection during checkout (if desired). |
$delivery_address | Array [ ] | An array of the customer's delivery addresses, ordered by the most recent address first. Only available when the customer is signed in. |
$invoice_address | Array [ ] | An array of the customer's invoice addresses, ordered by the most recent address first. Only available when the customer is signed in. |
Additional Fields data capture
The $order_additional_fields
variable will provide a list of additional field names that are available in Aurora. You can use these field names to provide input options for customers to complete on the checkout page. Aurora will then save this information against the new order once submitted.
For example, the expected format of the post parameters for additional fields shipping_tax_code
and ebay_buyer_id
:
'additional_fields' => Array [
'shipping_tax_code' => 'B00',
'ebay_buyer_id' => '1000055678'
]
Please note that should you provide a field "name" input option which is not configured in Aurora, the value will not be saved
Using Additional Fields with Express Checkouts
You can also submit additional fields when using express checkouts on the PDP and basket.
Please see the Aurora Demo template for examples of how to submit additional fields when using the PayPal Express/Credit and Adyen payment methods.
The following files include details on how to initialise and submit additional fields:
- Add order fields to your page:
- example.com/_js/order-fields.js
- Submit order fields using PayPal Express or Credit:
- example.com/_js/basket-paypal-express.js
- example.com/_js/basket-paypal-credit.js
- Submit order fields using Adyen payment methods:
- example.com/_js/aapc.js
Required User Accounts (for Subscriptions and Other User Account features)
Some products in Aurora may force the customer to create a User Account during checkout, one example of which are the Subscription Products. When this is so, Aurora will require that the customer creates an account during checkout and so will require a password to be provided.
There are two options to accommodate this password requirement:
- Force the Customer to provide a password during checkout.
- Allow Aurora to auto-generate a password.
If you do not wish to have the customer forced to create a password, then you can simply add the following hidden field to your checkout form and Aurora will avoid validating the password and instead just generate one for the customer:
<input type="hidden" name="auto_generate_password" value="1" />
Updated about 2 months ago