Sharing Baskets

Aurora allows an Administrator to share a basket via email using the share icon on the New Order page:

📘

The "Share Basket" icon will only display after you have completed some mandatory setup steps detailed within this document.

Clicking the Share Basket icon within the New Order page will display a prompt asking for a valid Email Address.

Upon clicking the "Share" button, an email will be sent to that address with a link that allows that user to load a basket with the same contents.

Expiry

The link sent to the customer will expire 7 days after it is issued, a variable is made available to the template with the expiry time.

If the link is clicked after expiry, a message will be displayed to the user explaining that the link expired.

In addition to the above, if the basket is taken through checkout, the link will no longer allow them to load that basket.

The expiry length can be changed in the Aurora Backend in Store > Settings. Within the Aurora tab there is an Basket section with a Basket Share Link Expiry setting. The default value is 7 days but can be set between 1 and 365 days.

Any change to the expiry length will only affect new emails, any previous emails will have the expiry length at the time of sending.

Modifications

Modifications made to the administrator basket by the administrator after having shared a basket with a customer will not be reflected in the basket loaded by the customer. The share link sent will initially load a basket as it was at the time the link was sent.

Modifications made to the customer basket by the customer will be persisted, including if they reload that basket on a different device.

Email

There are a few options for authoring the Email that is sent as a result of sharing a basket.

Please Note that until one of these options is implemented, no "Share Basket Icon" will show in the Aurora New Order Page.

Create an email template file

You may create a custom template for this functionality at the following path: {template directory}/emails/share-basket-email.tpl.html. An example implementation of this is available within the AuroraDemo templates accessible via FTP.

Create an Order Email record

You may create a new Order Email record within the Aurora Backend as Orders > Email by setting the "Use" field to "Share Basket" from the dropdown list.

If you have already created an email template as defined above then the contents of this email record will be made available to that template via the variable $emailContent otherwise the contents will be injected into the emails/standard.tpl.html template.

Variables

No matter which method above you use to template the email, the following variables will be made available.

VariableExample ValueNotes
$basket_url/load-basket?tok=some.secret.tokenThis is the path part of the full URI. To format a full link for the customer you should build a string with the global email variables. For example https://{$http_host|default:$smarty.server.HTTP_HOST}{$basket_url}

The tok query parameter on the url could potentially be quite long. You should test your email templates to ensure this formats ok or hide it within an <a> tag.
$basket_url_expiry1704716100The timestamp that the URL above expires at. This can be formatted with the Smarty date_format modifier.
$basketArrayAs per the generic email variables detailed on this page