We've been asked to add an (Apply) Discount Code text input to the client's side cart. I've done some discovery and found a couple apps what say they support this. On the other hand, we naturally want to be thorough and see if we can do it ourselves.
I created a discount and used apply via link.
When I get to the actual checkout page, the discount shows up (as it should).
Then I added a get cart (via AJAX) to the side cart (prior to checkout):
And dump that via console.log() and the cart object returned doesn't show anything about a discount. No code. Nuttin'.
Yet, if I continue on to checkout, the discount shows up again / still.
Based on some additional research, evidently there's no way to apply a coupon code via AJAX. The last discussion I found was about a year old. Is there still no relatively easy way to apply a discount via Ajax?
All that being said, if there are no other options, we'll go the app route. Does anyone have any suggestions for such apps?