Laravel E-Commerce – Coupons & Discounts – Part 6


In this video, we add the ability to use coupons and coupon codes for discounts. We implement fixed value coupons and percent off coupons in our database. We then make sure that the appropriate discounts are being passed through correctly to Stripe.

5:13 – Note: I re-seeded the database so the price of the item in the cart changed, which may cause confusion in the rest of the video.

10:58 – You can see the item price and the Subtotal are not the same (they should be). This continues throughout the entire video. Sorry! I caught it after I finished recording. I should have cleared the cart contents after I re-seeded the database.

Pushing Polymorphism to the Database:

GitHub repo:

Polymorphic Relations:

Coupon Code in cart or checkout:

How to handle money in web apps:

My courses:
Sign up for my newsletter:
My website: