Auto Apply Coupons
M
Michael Walker
Could we please "auto apply" discount codes based on a URL parameter please?
It'd be great to automatically apply a 100% off coupon so that when someone loads the page, they can see the discount applied, but they don't need to manually input the code.
This would be simple – you could use the same logic you use for the "query key" Custom Field forms, and the URL could look something like:
Thank you.
G
Geoffrey Nguyen
yes please !
T
Todd Heitner
I agree this would be very helpful. I was going to request this as a feature and saw it had already been requested.
D
Daniel Forgo
Yes, please add it! It would be super useful to have!!
B
Brent Attaway
We are still waiting on this feature update too.
H
Hicham Bouzcri
I managed to make it work, but the customer would still need to press the "apply" button. this needs some Javascript that the developers need to add to the Check out process. Kajabi does it very well. should be a simple enough fix.
A
Anthony Llanos
Hicham Bouzcri: Can you share the code with us?
H
Hicham Bouzcri
Anthony Llanos: It's just paramettres being passed in the URL. for coupon it's "?coupon_code=#####" where ##### is your coupon.
In this case we used WEBINAR50. Customer still has to click on "Apply" but it's prefilled.
Note: it only works on "1 STEP Order"
A
Anthony Llanos
Hicham Bouzcri: I found a way to auto apply the coupon but is not bullet proof, if the page doesn't load fast, it might not apply.
Here is the code:
<script>
document.addEventListener("DOMContentLoaded", function () {
if (window.location.href.includes("https://pro.novarise.com/ticket-summit?SEMINARIO")) {
var couponInput = document.querySelector('input[name="coupon_code"]');
// Wait for the coupon input field to be ready
var waitForCouponInput = setInterval(function () {
if (couponInput) {
couponInput.value = "SEMINARIO";
// Trigger the 'input' event to simulate user input
var inputEvent = new Event('input', { bubbles: true });
couponInput.dispatchEvent(inputEvent);
// Check if a class indicating readiness is present on the coupon input
if (couponInput.classList.contains('ready-to-apply')) {
clearInterval(waitForCouponInput); // Stop waiting
}
}
}, 100); // Adjust the interval as needed
// You can manually trigger the apply button after a delay
setTimeout(function () {
var applyCouponButton = document.querySelector('.apply-coupon-btn');
if (applyCouponButton) {
}
}, 2000); // Adjust the delay as needed
}
});
</script>
Just tell Chat GPT to change it for you link, parameters and coupon code and that's it.
M
Mariah | FG Funnels Support Team
This would be helpful to eliminate support request from people who forgot to enter the coupon code at checkout
J
Jon Cohen
I can use this feature as well. I had used it extensively in Kajabi
J
Joe Johnston
This would be extremely useful. For some of our funnels, we have users who are not tech savvy and often forget to enter the coupon code. This seems like an easy feature to implement and would help a lot!