Coupons codes and discount percentages
1. Coupon Code
A coupon code can be defined per product inside the merchant account (Upclick v4) in the product definition section. Currently, you have to choose the discount percentage from a proposed list and the coupon expiration date. If you need custom discount percentages just let us know and we will add them. In the near future ( beginning of next year) we will allow the user to input his own percentage. A coupon code can be defined only once per product. Though, the same coupon code can be registered for multiple products.
2. Join Designer and Coupon Availability
A coupon is sent to the cart, similar with step3, by passing the parameter “cp”, which will contain the coupon code value ( eg. cp=TX34DG2) . Depending on your model, the “cp” can be simply “hardcoded” in the cart settings (cart clones with hardcoded coupons) or sent in the parameter to the same cart URL, but with different coupons codes. The coupon code will be validated against the main products in the cart and if valid (matches the product and is not expired) it will apply the defined discount to the product prices. In order to make the coupons available in the join designer and assure the consistency between join and checkout (same coupons), you will have to perform the “Coupons import” each time a new coupon has been entered in the platform ( in Upclick v4). The new option is available in the home page for all users with “Price model” permissions. The procedure will expose you at the end the list of available/imported coupons, so it’s also an inventory tool.
3. Product Price Discount and Dynamic Tags
Once a coupon is passed to the product selection page, the product dynamic tags will adjust their values in consequence:
[price1] - product price as entered in the pricing model, but discounted with the percentage related to the coupon
[oldprice1] – product price as entered in pricing model, not altered.
We introduced new tags which will give more flexibility in terms of displaying the discount:
[rebate_perc] – the coupon discount percentage ( eg. 10%)
[rebate_flat] – the discount in flat amount with 2 decimals (in the currency of the country) ( eg. CA$9.99)
[cuponexpdate] - the coupon’s expiration date - empty if coupon was not found
[cupondays] - how many days left until the coupon will expire - empty if coupon was not found
I let your imagination envision different cart and promotion possibilities by using the tags above. I remind you also that in a cart with no coupons the tags will have different values and formulas:
[price1] - product price as entered in the pricing model
[oldprice1] – old product price as entered in pricing model ( simulate the discount)
[rebate_perc] - ((oldprice- price)/oldprice)*100 - with 2 decimals
[rebate_flat] - (oldprice- price) in the currency of the country - with 2 decimals
[cuponexpdate] - empty
[cupondays] - empty
I remind you that the tags can be used in content as well in the product description from pricing model (ST cart templates).
4. Discount Bubble
Currently, in your carts you have hardcoded images for the discount percentage.
With the new dynamic tags and the assumption that you want to use the same base cart with coupons or without coupons, it will be important for you to redo the bubble part in a more dynamic fashion, using the discount tag instead of the hardcoded image. I assume that this can be done step by step on the carts where you will test this functionality, so there is nothing critical here...
We have created also a javascript that you can use in the content in order to display a discount bubble and where you can define the following:
- which tag to display in the bubble : percentage or flat
- control the text under the discount ( eg. Rabatt)
- choose the color of the bubble; we created for now 3 options: "green", " greenDark" or "orange”
The font size is controlled dynamically. If the output is bigger/longer the script will automatically adjust the font size. The script will also take care to not display the bubble when there is no discount.
Here is the script:
<script type="text/javascript">
var rebate='[rebate_perc1]';
var seccondline = 'Rabatt';
var color = 'orange';
var fontsize = '24';
switch(rebate.replace('&'+'euro;', 'X').replace('&'+'pound;','X').length){
case 2:
fontsize = '24';
break;
case 3:
fontsize = '24';
break;
case 4:
fontsize = '24';
break;
case 5:
fontsize = '21';
break;
case 6:
fontsize = '17';
break;
case 7:
fontsize = '15';
break;
case 8:
fontsize = '14';
break;
case 9:
fontsize = '13';
break;
default :
rebate = '';break;};
if((typeof templatename==='undefined')&&(rebate != "")){document.write('<div class="stickerSave"><div class=" + color + "><em style="font-size:' + fontsize + 'px;">'+rebate+'</em>'+seccondline+'</div></div>')};
</script>
6. Sample
Here is a sample cart that we prepared for you as a model. The discount bubbles are generated dynamically, with coupons or without:
Back to Join Extension Designer