Discount codes
Provide discount code functionality for your WebinOne shopping cart. Ideal for promotions, customer loyalty and conversions or to help move more stock.
Discount codes are a powerful sales tool when used wisely and WebinOne can help you control how you utilise these. Control release and expiry date of codes, the type of discount (fixed price, percentage, free shipping...) and even how many times a code can be used.
Managing Discount Codes
Found under ‘eCommerce’ > ‘Discount codes’, here you’ll find a list of all discount codes created for use in your shopping cart.
Clicking the pencil icon () to the right of each item will allow editing of that discount code Clicking the trash can icon () will delete the discount code.
To manually create a new discount code, click the “ADD NEW CODE” button above the item list.
Adding / Editing
Here you’ll be able to configure the details of your discount code and enable it for use within your shopping cart.
Below are further details for the fields available.
Fixed Amountallows the amount of the discount to be applied as a fixed value reduction of the total order price.
Percentage Of Orderallows the amount of the discount to be applied as a percentage reduction of the total order price.
Free Shippingallows the discount code to cancel out the cost of any shipping price applied to the order.
Redeeming
Customers can redeem discount codes against products they are purchasing during the shopping cart stage. The discount code 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.
Discount code codes are not case sensitive so do not need to match the case of the discount code entered in the admin.
The predefined discount code input field can be rendered onto your shopping cart system page using Liquid via the discountCodeHtml
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 discount code input code like this:
{{shoppingCartData.discountCodeHtml}}
And in conjunction, you could also render the applied discount code value like this:
{{shoppingCartData.discountPriceHtml}}
The discount code amount will be applied to the order total in full if the order total is equal to or greater than the discount amount, or up to the value of the order if it’s lower.
If the discount code 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">