Is there any way to show in the front end, how many coupons from a specific coupon we have available?
Hey community, I have a coupon with an usage limit of 30, and I would like to dynamically show on the homepage, X coupons available. Is this possible? Have anyone done this yet?
Yes, itβs possible. Have I done it yet? No.
The coupons are stored in the database under fct coupons. If you have usage limits set, itβs there under the conditions. Two rows down is the use count.
You could easily capture both, do a calc, and output the quantity remaining. Since you want to display it on the homepage, you could do a shortcode or small php snippet to echo the result.
I will try to look into this shortly.
Jeff BrigmanΒ thanks, I've managed to do it. Awesome! Here's a blog post on my personal website whith a step by step tutorial: https://pv21design.pt/dynamically-show-fluent-cart-coupons-count-on-the-frontend/
JoΓ£o VieiraΒ looks good and my version would have been very basic but I like the sold out and unlimited you added to it, and the shortcode options.
Jeff BrigmanΒ Thank you!