A Shopify developer is building a discount app but has encountered a limitation with Shopify’s discount extensions. The core issue: there’s no native way to create automatic discounts that display both the original price and sale price (compare-at pricing) without manual intervention.
Current workarounds observed:
Apps modify theme code directly
Apps use app blocks for discount display
Developers manually update compare-at prices in themes
The developer considers these approaches non-ideal and is seeking input from other Shopify developers who may have found better solutions to this product discount display challenge. The discussion remains open with no responses or solutions provided yet.
Summarized with AI on October 24.
AI used: claude-sonnet-4-5-20250929.
Hey everyone,
I’m a Shopify developer and have built several apps with great client feedback. Currently, I’m working on a new discount-related app but facing an issue with creating product discounts.
Shopify provides discount extensions, but there’s no proper way for developers to create automatic discounts that show both the original price and sale price (like a price comparison label).
I’ve checked many apps, and most of them either modify the theme code or use app blocks to display discounts — which isn’t an ideal approach. Apps that use Shopify’s discount functions can’t show the compare-at price unless developers manually update it in the theme.
If any Shopify developer has faced the same issue, I’d love to know how you solved it or if you found a better approach.
You’ve hit a key limitation. Shopify Functions apply discounts later in the process and don’t change the product’s compare_at_price, which themes use to show the original price crossed out.
The best and intended way to achieve this is by using the GraphQL Price Rules API. Instead of a Function, your app uses mutations like priceRuleCreate to create native Shopify automatic discounts. When these discounts are active, Shopify automatically handles the compare_at_price display on the storefront, making it look exactly like a manually created sale without needing theme edits or app blocks.
Had the same thing once - turned out the discount rule was fighting with an old automatic one I’d forgotten about. After removing the overlap and refreshing the cart, it started working fine. Sometimes Shopify just needs a clean slate to reapply discounts correctly.
@PieLab Thanks for the clarification! However, we couldn’t find a way to make the product discount (created using the Price Rules API) display on the homepage, product detail page, collection page, or even in the cart. The discounted price isn’t reflected there — it only applies at checkout.
I’ve read the Price Rules API documentation 2–3 times, but I couldn’t find anything mentioned about displaying the discounted price directly on the storefront or cart. It seems Shopify doesn’t handle that part automatically.
Is there any specific way to make the discounted price visible across the storefront without manually editing the theme?
@ElijahStownton
Yeah, I know about that, but my main issue is displaying the product discount as a sale price along with the compare_at_price and a label — basically showing it like a normal sale product on the storefront.
Hey! You seem quite active here, so maybe you can help me out
I’m trying to display product discounts as a sale price with a compare_at_price and label (just like normal sale products). The discount is created using the Price Rules API, but it only applies at checkout — it doesn’t reflect on the product, collection, or cart pages.
Have you found any workaround or method to show it directly on the storefront?