All things Shopify and commerce
I'm trying to display discount codes that have been applied via the URL on the cart page in a Shopify theme prior to checkout.
Example URL would be store.com/discount/DISCOUNTCOUPON
I have verified the discount exists, and if I click on Checkout and proceed to Shopifys built in checkout process then I can see the automatic discount was in fact applied - it just will not display on the cart page. Discount type is a % that applies to entire cart.
I have tried the below snippet as per this guide: https://shopify.dev/themes/pricing-payments/discounts
I am using the Dawn theme also as per the guide. (And applying the code to a section within the cart object).
{% if cart.cart_level_discount_application.size > 0 %}
Discounts:
<ul>
{% for discount_application in cart.cart_level_discount_applications %}
<li>
{{ discount_application.title }}-{{ discount_application.total_allocated_amount | money }}
</li>
{% endfor %}
</ul>
{% endif %}
Nothing seems to work to display the discount.
Anybody come across this before and have any ideas why? Also for extra clarification I am not using Shopify Plus however I cant find anywhere that this is a requirement.
I tried to solve this problem by using one of the available discount apps, but it was harder than expected to actually find one that works. Of the 6 apps I tested, only one worked with stacked discounts and free shipping discounts. You can find my detailed review of all of them here: https://appreviewhq.com/shopify-discount-app-review-2024. TLDR: the one app that worked was https://apps.shopify.com/discount-before-checkout.
Hey Community 👋 Did you know that March 15th is National Everything You Think Is W...
By JasonH Apr 1, 2025Discover how to increase the efficiency of commerce operations with Shopify Academy's l...
By Jacqui Mar 26, 2025Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025