SITE: Adding a Coupon Code 1.0

PLEASE USE THIS NEW COUPON OPTION WHICH IS NOW NATIVELY ADDED TO THE PLATFORMCLICK HERE

We've added this natively into the system now, check the link above, but if you wish to use the old way for a specific need you can still do that below. This advanced add on to code up a Coupon Code to give a discount on your plans and insert a coupon code element to the page. You cannot use this method and the new native method as it will show 2 coupon fields on the page.

If you were using the old method below and want to switch, please ensure you delete the CODE BLOCK that is inserted on the /settings SITE tab. Contact us on the support email to get a hand if you need it.

What You Will Need:

Step 1:

Create a new PLAN that will be your discounted version of an existing plan

Step 2:

Go to your /admin/settings and access the SITE tab here: https://prnt.sc/t4qt9r

Step 3:

Go to the CUSTOM FOOTER CODE section and hit the little {} icon here: https://prnt.sc/t4qtug

Step 4:

Drop the code here into this section: https://prnt.sc/t4qu5e

Step 5:

Update the PROMO product id and MAIN product id in here: https://prnt.sc/t4quh2

Step 6: 

Change the PROMO CODE to something you want, must be uppercase: https://prnt.sc/t4qupy

Hit save and you can go to an incognito window and test it out on your /register page

Here's a quick 2 min overview: 

https://www.loom.com/share/9e1694bb5c704c5a8de4b354f881451b

The Code:

<script>
var mainProd = 'PRODUCTID1';
var promoProd = 'PRODUCTID2';
var promoCodes = ['PROMO']; //this should always be uppercase
//var head = '<div class="uk-heading-small" id="headline-72651" style="margin-top: 20px; cursor: pointer; outline: none; display: block;"><div class="uk-heading-small" style="text-align: left;"><b>Have a Promo Code?</b></div></div>';
var head = '';
var field = '<input type=\'text\' id=\'promo_code\' name=\'promo_code\' placeholder=\'Enter promo code...\' class=\'uk-input\' />';
$(document).ready(function () {
	//$('.payment-form-elements').after(head + field);
        $(head + field).insertAfter('#plans');
	$('[data-plan='+promoProd+']').hide();
	$('#promo_code').on('keyup', function (ev) {
		if ($.inArray($('#promo_code').val().toUpperCase(),promoCodes) > -1) {
			$('[data-plan='+promoProd+']').click();
			$('[data-plan='+mainProd+']').hide();
			$('[data-plan='+promoProd+']').show();
		} else {
			$('[data-plan='+mainProd+']').click();
			$('[data-plan='+promoProd+']').hide();
			$('[data-plan='+mainProd+']').show();
		}
	});
});
</script>

Still need help? Contact Us Contact Us