Post By:user_19386 | Reply
I have created a new AJAX module for customers to request a coupon code. You can view it at http://ts1.abconlinepharmacy.com
Everything works great except that I need a way to progmatically get the current active coupon code. When someone enters their email address I want to automatically send them an email containing the coupon code. I have searched Google and tried a couple of different things but nothing seemed to work.
I have checked my coupon code and made sure it is active and is set for the current time frame, but it is not returning a value.
If worst comes to worst I can hard code the “coupon code” directly in the IndexController.php file, then change it every month and update the coupon code being sent. However, I REALLY do not want to do this.
If anyone knows how I can progmatically get the current active coupon code I would be forever grateful if you share your wisdome… Thanks