Articles on: ShopCart

How to add a discount code field to the cart

How to add a discount code field to the cart


In this article:


The discount code field lets customers apply a code right in the cart drawer and see the new total before they go to checkout.


Turn on the discount code field


  1. Open ShopCart and click Edit in the Cart Drawer card.
  2. Turn on the Discount code toggle on the left.
  3. Click Save at the top of the editor.


The field works with the discount codes you create in Discounts in your Shopify admin. You don't need to set up codes in ShopCart.


Change the texts


Click Discount code and open the section you need:


  • Title: the title of the field, "Discount code" by default.
  • Discount field: the Placeholder inside the field and the Error message for a wrong code.
  • Button: the text of the Apply button.




To change the colors of the field, the button and the applied code, open the Styles tab. Click Save when you're done.


What customers see


  1. The customer clicks Discount code in the cart, enters the code and clicks Apply.
  2. If the code works, it's shown as a tag and the Checkout button shows the new total with the old one crossed out. If the code is wrong, the customer sees your error message.
  3. To remove the code, the customer clicks × on the tag.




The applied code is carried over to checkout, so the customer doesn't need to enter it again.


✔️ Next step


Check our articles to learn more about the app's functionality:


Updated on: 20/10/2026

Was this article helpful?

Share your feedback

Cancel

Thank you!