Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Re: Valid discount code passed as a query parameter to checkout isn't being added to order

Valid discount code passed as a query parameter to checkout isn't being added to order

Conversion_Bear
Shopify Partner
56 0 31

Hey we're seeing a strange result in one of our merchants stores: "edilyo-shop.myshopify.com".

 

When we append a valid discount code to checkout using the discount query parameter e.g. SHOP.myshopify.com/checkout?discount=CODE  it isn't being consistently added to the order. 

When we follow the network requests it seems as the backend gets the correct request but then redirects to the checkout page without the relevant discount code.

 

2 notes:

- This happens only on this store afaik

- it's not consistent so it might work in some attempts

- We noticed that when this isn't working properly there's a cookie that is present on the domain: "checkout_one_experiment" and that the checkout url structure is different and includes a "/c/" directory in it. e.g. https://www.edilyo.com/checkouts/c/993cd596c5d8abcb09ad8bd0cac07135/information vs.

https://www.edilyo.com/59341111471/checkouts/1cc88f943b94d848a4c28f68e4357f80?discount=BUNDLE-%5BY5S...

 

Would appreciate the team help here.

 

Cheers,

 

Replies 40 (40)

Conversion_Bear
Shopify Partner
56 0 31

Is there a chance someone from the Shopify team can have a look at this?

Conversion_Bear
Shopify Partner
56 0 31

Hey we just received an additional complaint from another merchant about this issue.


Forwarding a discount code using the discount query parameter e.g. https://heystylin.myshopify.com/checkout?discount=TENOFF works on the first checkout attempt. In case the customer removes the discount, get back to the cart page and checks out again the discount isn't being applied. Can someone from the Shopify team please check this? 

Thanks guys,

Conversion_Bear
Shopify Partner
56 0 31

Following up on this issue. I can say that we're seeing a large number of these cases coming from Australian/NZ stores which makes me suspect the checkout providers they use?

When we pass the discount_code as a query parameter to the checkout endpoint we get in the return headers a set-cookie header of discount_code with the value as expected but then when the page is redirected with a 302 status the designated checkout page sends a set-cookie header of discount_code=; which removes the discount.

Any advice will help here Shopify. Thanks

Groon
Shopify Partner
15 0 17

Thanks for reporting this @Conversion_Bear, I have also a Bundle app and SEVERAL customers have been complaining about this, I have already contacted Shopify Partner Support and they don't take a look. Right now I have about 5 customers complaining about this.

 

It's a very serious issue, the discount simply is not applying using /checkout?discount=XXX , I noticed that sometimes when I copy/paste the discount code in the discount box at the checkout page it applies correctly, but sometimes the discount not applies.

 

I had a customer that was having this problem for a week, and yesterday I have tested again his store and it simply started working again, but today I have 5 customers complaining.

 

The last one I've checked had this checkout URL:

 

checkouts/c/98be52ebe7c26d061124ff798a54f669/information

 

Please Shopify, take a look on this, it's REALLY urgent, it's a problem happening in several stores and I have been receiving report of this for about 2 weeks, the discount code is simply being erased without any reason.

 

It's happening more and more every day.

 

 

The-Kid-Zone
Visitor
1 0 4

This is a serious issue! Why can't we get hold of anyone at Shopify to get some charity?  My bundle app discounts are not firing at checkout and I now have very frustrated customers and huge amount of loss of sales:-(. @Conversion_Bear have you had any luck getting in contact with Shopify.  My store is a South African store and the issue started this past weekend.

Geertv11
Visitor
1 0 5

I do experience the same issue. A high drop in checkout rate. Hope it is getting solved very soon! 

 

dpodkrolewicz
Visitor
1 0 4

Hey! 

 

We are also experiencing serious issues – getting more and more complaints from clients on our store https://francisandhenry.pl 

 

We are using Bundle App and all the discounts work well in cart, the prices are correctly reduced, but later when going to checkout for some customers the discounts disappear and products go back to their original price.

 

For some customers with exactly the same configuration of products everything works well - this is really random but occurring more and more often now.

Would appreciate some help here with solving the issue!

 

Regards,
Daga

Art Director & Designer

TyChapman
Shopify Partner
14 0 8

We are getting the same issues with our app MonsterUpsells - Please check this out ASAP!!!!

5 stores today talking about it. 😅 Exactly the same issues @Conversion_Bear  Team Spoke about.  

Discount codes are intermittently failing. 😢
Everything has been working fine for years never had this problem until recently. 

banned

TyChapman
Shopify Partner
14 0 8

@Conversion_Bear and Anyone else experiencing this problem feel free to comment on this twitter post. I have had the devs team respond to me there saying no one else has reported the issue. 
https://twitter.com/TyChapman___/status/1582338867847659520

banned

jbe75
Shopify Partner
1 0 2

We are having this issue, too; Shopify has not responded to our support ticket. We are rapidly deploying draft orders to overcome it, as we cannot wait.

PeteOswald
Excursionist
42 0 2

We need this fixed ASAP as our bundle app does not work without it! Very bad timing for this issue!

www.littledifference.org
1 Card = 1 Tree

TyChapman
Shopify Partner
14 0 8

Here is your answer everyone! 

Shopify stuffed us all with a checkout update. 
You need to tell store owners to contact tech support and roll their checkout back to the classic version. 
Screen Shot 2022-10-18 at 11.28.01 pm.pngScreen Shot 2022-10-18 at 11.13.11 pm.png

banned

jam_chan
Shopify Partner
925 23 188

There are a few app users complaining the same issue. A user sends me a screen-cast but I cannot duplicate the issue even with the same browser. Don't know how to fix it.

BYOB - Build Your Own Bundles, SPO - SEO App to research keywords & edit social link preview

BrokenCompass
Visitor
1 0 1

Exact same problem with me this week.  It has now happened TWO times within a week.  My app designer is recommending that Shopify please try and correct this problem ASAP!  The app is so wonderful but is ruining the success it should be enjoying!

Conversion_Bear
Shopify Partner
56 0 31

Hey guys, 

 

To anyone following this ticket - we found an adequate solution until Shopify gets this resolved.

We manually set the discount_code cookie from the client side before customers go to checkout.

 

Seems to be doing the job so far:

function setCookie(name,value,days) {
    var expires = "";
    if (days) {
        var date = new Date();
        date.setTime(date.getTime() + (days_24_60_60_1000));
        expires = "; expires=" + date.toUTCString();
    }
    document.cookie = name + "=" + (value || "")  + expires + `; path=/; domain=${location.host}; SameSite=Lax`;
}
setCookie("discount_code", code);

 

It's not perfect b/c we can't seem to remove the the discount code from checkout when it applies with this method. Waiting for the Shopify team to help solve this asap 🙂

 

Cheers,

 

DEV-ONI
Shopify Partner
5 0 0

@Conversion_Bear This seems to work, but as you mentioned, removing the discount code does not seem to work. 
Did you managed to find a workaround for this?

Conversion_Bear
Shopify Partner
56 0 31

To anyone struggling with this issue we found a temporary fix. Before customers proceed to checkout we manually set the discount code cookie with:

function setCookie(name,value,days) {
    var expires = "";
    if (days) {
        var date = new Date();
        date.setTime(date.getTime() + (days_24_60_60_1000));
        expires = "; expires=" + date.toUTCString();
    }
    document.cookie = name + "=" + (value || "")  + expires + `; path=/; domain=${location.host}; SameSite=Lax`;
}
setCookie("discount_code", code);

 

Seems to be doing the job so far, the only drawback is that customers can't remove the discount from checkout for some reason when using this method.

 

Still waiting for the Shopify team to please help us resolve this issue.

 

Cheers,

denysoliveira
Visitor
1 0 0

Also having the same issue with my shop - these discounts are key to my business and I have noticed a reduction in checkout volumes / increase in abandoned carts recently

alexkh
Visitor
1 0 0

Our store is also having similar issues with a Bundle app we're using. Conversion rates have gone down and we have also noticed an increase in abandoned checkouts. Hope Shopify can provide a more permanent solution to this very soon.

Trevor
Shopify Staff (Retired)
3408 463 1003

Hey, everyone!

 

Thank you for taking the time to raise the issue you're seeing when using the discount query parameter.

 

We are always striving to improve the checkout process for our merchants. As we make adjustments some things may not work as intended.

 

Our developers are aware and are hard at work to resolve these issues quickly to minimize merchant impact.

 

In the meantime, @Conversion_Bear has provided details on a temporary fix while we work on resolving this.

Trevor | Community Moderator @ Shopify
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog

TyChapman
Shopify Partner
14 0 8

Hi Trevor, Thanks for the reply. Is there a better place we can stay on top of this issue as it is a MAJOR problem for clients. Are you going to inform us when it's fixed? Or can someone else??? 

Also Shopify support team doesn't seem to know what to do and are blaming apps for not doing updates when we ask them to revert back to checkout classic version as per Shopify support request. (See screenshots)
- PLEASE INFORM SUPPORT of this problem and how to fix it. 

Shopify Support conversation:

Screen Shot 2022-10-23 at 8.30.26 am.png


Conversation with one of our stores:
Screen Shot 2022-10-23 at 8.28.44 am.png

 

 

banned
OpheliaBell
Tourist
3 0 0

Hi there,

 

I am having the same issue with my store.

I have been using a bundle app for some time that auto-generates bundle discount codes. However on three separate occasions (only three so far, out of about two-dozen), when the buyer has proceeded to the payment screen to complete their bundle order, the discount code gets "lost" and the discount is no longer applied when they go to pay. It shows in the cart, but not in the payment screen. I tested and it happened to me as well, even though on past tests the discount was applied at checkout for me without issue. All of these issues occurred within the month of October 2022. Most customers don't have the issue, but I would very much like to resolve the problem and hope Shopify is working on a solution to it.

 

Thank you.

TyChapman
Shopify Partner
14 0 8

Hi trevor... kindly... This is getting pretty ridiculous!! 😅
We have had zero pro-active communication other than the one post you wrote back. 

Store owners are losing sales.. app support team is getting hit with tons of reports... and there is nothing we can do other than send them to Shopify Support to roll back to the previous classic checkout version. Every store that has tried to do this has said that support says there is no problem and they should contact us again as app owners. 

Cyber week is coming and still no communication. Please get us some information ASAP. I'm not sure how else to say the urgency of this matter for all apps that use discounts. 

banned
Trevor
Shopify Staff (Retired)
3408 463 1003

Thank you for your reply. 

 

We do not have a way for you to track the issue, however, our Checkout team is aware this is causing issues for both merchants and Partners. 


We encourage any merchant or Partner who is having issues with their checkout to contact Shopify Support so our teams can accurately assess the store and provide a suitable solution. 

 

I will update you as soon as there are further updates become available. 

 

Trevor | Community Moderator @ Shopify
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog

DEV-ONI
Shopify Partner
5 0 0

We would appreciate regular updates on this as this has become broken for several of the stores we manage. This is also quite a critical time for sales and there doesn't seem to be any visibility as to what is being done about the problem.

DEV-ONI
Shopify Partner
5 0 0

Hello Trevor, while the workaround from @Conversion_Bear seems to work, it has a problem wherein the discount code is not removeable. Could we please ask for an update from the developers on this? Thank you.

Tom739
Excursionist
24 0 12

We experienced and are still experiencing the same issue. There was a couple of weeks in November when the problem seemed to have disappeared (I assume a rollback to the previous checkout) and then again starting on November 23rd the problem has re-appeared, affecting most of our customers.

Shopify needs to communicate about this issue and provide a fix.

Chris523
Shopify Partner
3 0 1

We experienced the same issue starting from 1st December. Do you find any workaround?

Tom739
Excursionist
24 0 12

Shopify Support has just closed our ticket (without giving us any solution or explanation). I am baffled. The issue keeps happening every single day. 

Joann_S
New Member
9 0 0

Guys, Shopify is not considering this problem a glitch they need to fix.  When I spoke to support they did not have this issue logged as an active problem. They said the app needs to be modified to work with  Shopify's checkout changes that they implemented.  That is why there are no updates in the last 3 months from them.  

ZipifyApps
Shopify Partner
3 0 1

For several weeks our applications haven't had any reported issues that seem related to this thread. Hopefully, other applications are experiencing this as well! If your concern is Zipify Pages please @ me & I will investigate. 

Tom739
Excursionist
24 0 12

There was one new instance today with us. And Shopify has closed our support ticket.

I would be more than happy to implement any change needed to work with the checkout changes, but the question is, what are these changes? As far as i know they are not documented anywhere so there is no way to know what needs to change.

Tom739
Excursionist
24 0 12

After a week of wait, Shopify Support got back to us and say that everything is working fine. I am baffled by the level of incompetence and i am seriously thinking of moving away from Shopify as there does not seem to be any way to get Shopify to acknowledge issues with their system and get to work on a fix. This has been 4 months and dozens of orders for which we had to process refunds for.

Tom739
Excursionist
24 0 12

If you are still experiencing this issues, please post a reply. 

We are still seeing the issue from time to time. The frequency seems to be lower than before but the problem keeps happening.

Shopify again closed our support ticket, this time without even providing an answer or an explanation.

PeteOswald
Excursionist
42 0 2

Shopify needs to fix this now man.

www.littledifference.org
1 Card = 1 Tree
Joann_S
New Member
9 0 0

@Trevor Can you please keep us posted on this? It's November and Christmas traffic has really ramped up, this is a terrible time to have customers experience a checkout glitch!!!!

ZipifyApps
Shopify Partner
3 0 1

Hi Trevor! 

 

Thanks for posting. Do you have any updates from your developers on the discount query parameter issue? We're seeing discounts splitting products: https://www.screencast.com/t/nGlA9hT6Q9

 

I believe this is related and is persisting for stores. 

 

 

Thomas_Dev_Shop
Shopify Partner
5 0 0

Hi, 

 

I have the same problem with one of my client. 

 

@Conversion_Bear unfortunately your code doesn't work. 

 

@Tre3 Can you please keep us posted on this ?

 

Thank you. 

 

Thomas.

spswanepoel
Visitor
1 0 0

@Trevor it really is unacceptable that this breaks and Shopify doesn't do anything to a) notify us of the issue; b) provide a quick fix proactively; and c) keep us up to date with regular updates. This is a major issue, especially at this time of year, and Shopify absolutely knows this. 

xinghul
Shopify Partner
7 0 0

This is just ridiculous, does Shopify even realize how big of an issue this is?

Deep link is crucial for affiliate marketing,  `/discount/{code}` won't work with deep link, it has to be query param `?discount={code}`.

This issue basically killed using deep links with the Shopify stores, this is literally P0.