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.
We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024Thanks to everyone who participated in our AMA with 2H Media: Marketing Your Shopify St...
By Jacqui Sep 6, 2024The Hydrogen Visual Editor is now available to merchants in Shopify Editions | Summer '...
By JasonH Sep 2, 2024