Applying discount codes in the cart (prior to checkout)

It’s an interesting find! But I don’t get why his solution is so… convoluted I’d say. I actually shared my own solution on the gist feed (I believe much simpler and more efficient), could be interesting to compare the pros & cons.