I tend to agree with everyone else, as this should be standard feature and would like to bump.
should be a standard feature to show at least a discount code is available for the product on the page as that is compliant with most M.A.P policies
hey,
possible for you to share the details of the solution provided by JC Penny like you mentioned?
Best,
Jannat
Hey Jannett,
it is pretty easy to build a if statement to show text based on the tag.
{% if product.tag is āXYZā %} do this {% else %} something else {% endif %}
the problem it is isnāt quite easy to pull this info and code parameters with some some middleware type system, which ideally would be in shopify. The coupon code functionality isnāt really exposed to the theme frontend either.
cheers
chris
Came across this while trying to figure out how to show discounts on products pages. As someone just getting started with Shopify it does make me question rather this is a platform to stay with. When such a basic feature is not included in the price we already pay and the suggestion is to use another app that costs an extra $20 a month to use. I can see this is a very common problem with the Shopify platform. Missing many standard features and being told to buy an app.
To me this is not cool at all. This sort of ānickle and dimeā stuff will kill small businesses just trying to get started.
If I had bought all of the apps that have been suggested by Shopify staff for things that should be built in features. I would easily be up to paying over $100/month just in apps.
I hope these concerns actually get addressed by someone as this thread is now 2 years strong.
I also agree that this should definitely be a built-in feature. I spent 30 minutes looking for the option assuming it would be an obvious built-in feature.
That being said I did find an easy work-around that works just as well. I just went to edit my homepage and found that there was an option to add an āannouncement barā. From there I was able to add my discount code to be used at checkout.
Let me know what you guys think!
I second this⦠or 100th this. This is a huge problem for my site. Someone even told me that they couldnāt find the discount code field at all. Itās so buried in the checkout page. Iām almost definitely losing conversions since coupon codes are commonly shared when I do email marketing to my loyal customers. The only thing close was the app called dCode which allows people to enter their discount codes on the cart page. Pretty good. But not good enough.
Iām getting custom code to do it on the product page from a developer. Shopify please add this.
Hey there,
here is a FREE app that applies discount codes on product pages (and collections) - Automatic Discount Code Links.
- product page coupon widget;
- storefront applied discounts before checkout;
- discount code infobar.
Hope it will help!
Well this is exactly what I was looking for!!! I see there are no reviews but the company appears to be legit from looking at their site. Iām going to go for it. Hopefully it works without unintended side effects⦠Thanks for your help!!! Saved me tons of $$$.
@gtanner57 thank you for the feedback!!
Iām from the team behind this app, so let me (or our support) know if you need any assistance.
As for the reviews, there are none because the app was released yesterday. But if you find it useful - be the first to rate it ![]()
It looks like this only works with discount codes that are percentage based
and apply to all products. Iām installing it, because it could still be
useful, but it would be great if in the future it is able to
accommodate discount codes for specific single or groups of products rather
than the entire store. Also nice would be if it could accommodate set
dollar discounts, although being able to single out specific products would
be more important.
May I ask name of this app, please?
@khanhlumpy itās Automatic Discount Code Links
- product page coupon widget;
- storefront applied discounts before checkout;
- discount code infobar.
Itās free. Hope it helps.
@joshrau thank you for the feedback! Weāll add these features in future releases.
good day, can we apply different discount codes for different products separately?
Hey, right now you can apply discount codes to all products. Different discount codes can be created - but one and the same customer cannot apply two discount codes at once.
hi!
Did you ever get a solution for this? I am looking for the same thing.
thanks!
no solutions whatsoever, still looking
Obviously it would be super great to have a built-in checkbox in the product page admin to hide / show the discount code on product pages.
The below solution is some-what involved, but once everything is set up, youāll be smooth sailing with dynamic discount codes on product pages and no app required.
Hereās what I did:
Step 1: Create Discount Code
Take note of the name, you will use it in step 2. For this example, we will call the discount code COOL5 and it will offer 5% off a collection. Pause.. Open a new tab and lets create a collection
Step 2: Create a Collection
The title of your collection is going to be very very important. The title of my collection for the discount I just created will be: DISCOUNT-COOL5-5%.
The structure of this title is: DISCOUNT-{discount_name}-{discount_amount} where discount_name and discount_amount should match the discount youāre creating.
Save this collection as a manual collection, and then add any products you want (our Discount Code in step 1 will apply to these). Also, this tripped me up for a hot second, but make sure this collection is available in at least the Store Sales Channel. I know, it sucks - this solution isnāt perfect. If you donāt do this the code we add in step 3 wonāt work since I guess collections have to be on a sales channel to appear in the collections liquid object.
Anyway, Go back to the Discount Code you were just creating in step 1 and select āSpecific collectionsā in the āApplies Toā section and select this collection you just created.
Step 3: Edit the code
This is something you only do once and it is well worth it.
Navigate to product-template.liquid by going to Online Store > Actions > Edit Code. On the left hand side search for āproduct-templateā.
Paste the below code where ever youād like your discount code to appear on your product page and save:
{% for collection in product.collections %}
{% if collection.title contains "DISCOUNT" %}
{% assign parts = collection.title | split: "-" %}
{% capture discount_name %}{{ parts[1] }}{% endcapture %}
{% capture discount_amount %}{{ parts[2] }}{% endcapture %}
{% endif %}
{% endfor %}
{% if discount_name != blank and discount_amount != blank %}
Use code {{ discount_name }} for an instant {{ discount_amount }} off!
{% endif %}
For those interested, all this code does is loop over the productās associated collections, finds the collection where DISCOUNT is in the title and then stashes the name / amount in a variable, which you can do whatever you want with. And now you can tell why the naming is incredibly important.
Once this code is added, now your job is to just create Discount Codes and Collections as you normally would, with just a bit more attention to how things are named.
Hereās a visual of the end result. I chose to place mine right under the price. The discount values you see here can all be changed by simply editing collection / discount titles.

Again, would way rather have a checkbox on the product page admin that toggled all this stuff - itād be way cleaner, but this will do for me just fine. hit me up if you got questions.
Hi everyone,
Thanks for being informative and adding constructive feedback in this thread. While this is currently not something that can be done in the theme directly, it might be possible with the Storefront API (which is what Apps use). But it means you would have to build an app.
Another possible workaround is when you click on the code and it adds you. Which technically is possible in code, you can create a cart URL with the discount code. But youād have to manually do that for each product, which is the pain point.
In saying all this, there is a feature request for this, where I have added all the feedback from this thread to it but currently there is no update and I am unable to give any timelines for it.
