how to create a discount field on cart page

Hi everyone,

I’m looking to create a mandatory discount field & checkbox with “i dont have discount code” field on the cart page of my Shopify store. Currently, my cart page doesn’t have a discount field at all.

Could someone guide me on how to implement this? Are there any specific steps or code snippets that can help achieve this functionality?

You mean the “discount code” field? It’s only display in the checkout page rather than in the cart page.

If you want to add some field and checkbox to the cart page,

customise your theme,switch to edit code, edit the file “sections/main-cart-footer.liquid”,

find the code


and add below code after it

i dont have discount code

Hi, Praja! If you still need help with this one, I’ve had a hand in developing this newly released app that let’s you add a discount field almost anywhere you’d like in your theme! We currently don’t have the functionality of making in mandatory, but that is something we could add if there’s enough interest. Please give it a try and feel free to send me any feedback!

Discount Codes Anywhere!

DField can do it DField: Discount Input Field - Discount Code Input Field Before Checkout | Shopify App Store