Showing discount on product page when using discount link

Highlighted
Excursionist
13 1 1

Hi all, we use discount codes with shareable links to track affiliate sales. The problem is even if the customer uses the shareable link (which applies the discount automatically at checkout) they only see this discount during checkout. I want to show the discount that applies to them while they're shopping. Ideally on the product pages as well as on the collection pages. So if a customer uses a shareable link that includes a 20% discount, I want all product prices to show the discounted price (20% off) while still showing the normal price as the compare at price (strike-through). Upon checkout, the 20% discount should of course be applied to the normal price (compare at price), not to the discounted price. So for example - let's say the normal product price is $100. Customer uses a link that gives them 20% discount. On collection page and on product page it needs to show the new product price as $80 ($100) - a 20% discount applies to you. In the cart, it needs to show $100 - 20% discount = $80 payable.

To make it more complicated, we use Dynamic Product Options and our product options add relative pricing to the price of the base variants (we sell fine art prints, and the price differs depending on the sizes). So the discount calculation needs to apply to the base variant before any options are chosen, but also needs to apply to the final product price once options/sizes have been chosen. I know I could add something like "?flag_discount=true" at the end of discount url which will allow me to create script code that might help to achieve what I want to achieve. But the coding involved here is beyond my abilities. I know basic html but I'm not a coder. However I like to tweak things myself as much as possible so if there is a simple way to do this, I'm happy to try it. TIA for any help you can offer.

Perhaps a simpler alternative is to add a bar that pops up only if a discount code applies, to notify the customer that a 20% discount applies to their order and will be deducted at checkout. But then they will still see the normal product price.

0 Likes
Highlighted
Excursionist
13 1 1

Nobody with any ideas or advice?

0 Likes
Highlighted
Excursionist
13 1 1

Could I not add ?flag_discount=true to my discount links, and somehow use that set up a script that generates conditional pricing such as this:
{{ product.price | times: 0.8 | money }} since all my affiliate discount codes are 20% off?

I'm sure there must be a simple way to do this.

0 Likes
Highlighted
Excursionist
13 1 1

Okay, one week later, no solution yet. I posted this question in a couple of places. Also reached out to Shopify theme support and posted a couple of jobs to hire a Shopify expert. Not one response. Should I assume that this is not possible?

To recap, if a customer accesses my store with a discount link, which places a cookie that is used during checkout to apply the discount, how can I show that discount on the product page already?

Would appreciate any help.

0 Likes