Gift vouchers
Gift vouchers can be issued to your customers or purchased by them online via the shopping cart.
WebinOne gives you control to manually create or override gift vouchers as needed and send out via email to any recipient, along with a customised message.
Managing Gift Vouchers
Found under ‘eCommerce’ > ‘Gift vouchers’, here you’ll find a list of all gift vouchers either manually created (via the admin) or purchased via your shopping cart.
Clicking the pencil icon () to the right of each item will allow editing of that gift voucher. Clicking the trash can icon () will delete the gift voucher.
To manually create a new gift voucher, click the “ADD NEW VOUCHER” button above the item list.
Adding / Editing
When setting up a new gift voucher you’ll be able to configure the details, and after saving, set the recipient information and send out the voucher.
Below are further details for the fields available.
Details
For shop created vouchers,a link will be available here to the related customers Order)
Recipient
This field supports Liquid!
Purchasing
Gift vouchers are generated via the online shopping cart when a customer purchases a Product that has been configured as a Gift Voucher. See the ‘System Properties’ for a Products settings here.
When a gift voucher product is part of a shopping cart order, three additional fields will be presented to the customer in the checkout form. These allow the customer to enter the recipient's name, email address and, optionally, a personalised message that can be included in the gift voucher email sent to the recipient.
By default, these recipient fields are added to the checkout form layout using a Liquid conditional statement when the shopping_cart object property of hasGiftVoucherProducts
is true.
{% if shoppingCartData.hasGiftVoucherProducts == true %}
<input type="text" name="Payment_GiftVoucher_ReceiverName" value="" required />
<input type="text" name="Payment_GiftVoucher_ReceiverEmail" value="" required />
<textarea name="Payment_GiftVoucher_ReceiverMessage" required></textarea>
{% endif %}
All recipient fields are required during checkout.
Gift vouchers, as a Product, can be configured to require shipping (perhaps you want to use a physical voucher mailed out to the customer), include a downloadable component, be discounted with discount codes, or even be purchased with other gift vouchers.
Redeeming
Customers can redeem gift vouchers against products they are purchasing during the shopping cart stage. The gift voucher code is entered into a system input field and will update the cart details automatically after the customer has entered the code and moved focus from the field.
Gift voucher codes are not case sensitive so do not need to match the case of the gift voucher name entered in the admin.
The predefined gift voucher input field can be rendered onto your shopping cart system page using Liquid via the giftVoucherHtml
property stored in the shopping cart Liquid object (which should already be present on your shopping cart page).
So, assuming you have the shopping_cart
component added like this:
{% component type:"shopping_cart", layout: "", collectionVariable:"shoppingCartData" %}
You could then render the gift voucher input code like this:
{{shoppingCartData.giftVoucherHtml}}
And in conjunction, you could also render the applied gift voucher value like this:
{{shoppingCartData.giftVoucherPriceHtml}}
The gift voucher balance will be applied to the order total in full if the order total is equal to or greater than the voucher balance, or up to the value of the order if it’s lower. Leaving any difference as a remaining balance on the gift voucher to be available for subsequent orders.
If the gift voucher reduces the order total to 0
then you may want to conditionally switch your checkout payment method to ‘Free Payment’, otherwise you may still be asking the customer for credit card details (or whichever payment method you normally have in place).
One way to achieve this might be to add the select
attribute to the payment method dropdown option (if you are using this element), like so:
<select id="Payment_Type" name="Payment_Type">
<option value="CreditCard">Credit Card</option>
<option value="Free" {% if shoppingCartData.totalPrice == 0 %}selected{% endif %}>Free Payment</option>
<option value="Offline">Offline Payment</option>
</select>
Or, if you have implemented a hidden input to define the payment method, you could do something like this:
<input type="hidden" value="{% if shoppingCartData.totalPrice == 0 %}Free{% else %}CreditCard{% endif %}" id="Payment_Type" name="Payment_Type">
Recipient Email
When gift vouchers are purchased via the online shop, the recipient of the voucher will receive a system email which can be used to notify them of the details of their voucher and the sender.
Likewise, for admin created gift vouchers, the system email can be optionally sent to the admin’s email address and/or the assigned recipient.
This email can be found under ‘Email Notifications’ > ‘System Emails’ > “GiftVoucher”.
Within this email, the Liquid this
object outputs the voucher order details, as per the following example data:
{
"Message": "Here’s a gift for you!",
"SiteUrl": "https://www.example.com",
"GiftVoucher": {
"Name": "MYCODE01",
"Amount": 30.0000,
"AmountHtml": "$30.00",
"Balance": 30.0000,
"Type": "Manual / Via Shop",
"Currency": "$",
"Enabled": true,
"RecipientName": "Alex Smith",
"RecipientEmail": "asmith@example.com",
"RecipientMessage": "Here’s a gift for you!"
},
"RecipientName": "Alex Smith",
"PurchaserName": "Joe Smith",
"PurchaserEmail": "jsmith@example.com",
"GiftVoucherAmount": "30.0000",
"GiftVoucherCode": "MYCODE01",
"GiftVoucherCurrency": {
"Id": "12527484287403950087",
"Code": "AUD",
"Symbol": "$",
"DigitalCode": "36",
"Name": "Australian Dollar"
}
}
For more information on the system email fields see here.
Your site instance should come with a default layout including the key pieces of information for this email. However, you can always reset this layout to default if it’s not currently included or has been modified. Simply click the “RESTORE TO DEFAULT” button at the top of the system email page.