Developer forum

Forum » Development » GiftCard stopped working

GiftCard stopped working

Dimitrij Jazel
Reply

Hi Guys,

Today customer contacted, and reported an issue with giftcards.

They worked perfectly before, but now then stopped completely. Am running out of ideas on what can be wrong?

Codes are valid and where not used (checked that). I am trying to use them in same currency as they where purchased.

 

We are doing Post request to this url:

https://www.myshop.com/Default.aspx?ID=6&EcomOrderGiftCardCode=853fa33ec4cb

But this does not seam to work anymore, but was working.

 

When someone trying to use them, just refreshes the page, obviously.

Anything else I can check in order to make sure that it works?

 

I also include a Post header file

 

/Dmitrij


Replies

 
Dimitrij Jazel
Reply

Exact same site copy on Staging server is working. So I don't think that this issue is related with code.

 
Nicolai Pedersen
Reply

Hi Dmitrij

What is on page with ID=6?

Why are you making a POST, but have the value in the querystring?

I can see that this is a javascript post - the response is json. Are you sure the call has a session ?

And what do you mean when you "Does not work anymore"? What happens, what used to happen, what happens now?

Could it be that this json request does not return a value or the value/result of this call is not rendered correctly? What does your javascript console tell you?

Which template and js file has the latest edited timestamp - and what does it contain?

BR NP

 
Dimitrij Jazel
Reply

Hi Nicolai,

Thanks for reply. And for the ideas to check. Checked Json response and it turns out it worked.

 

It turns out that the problem is with displaying the OrderLine. We are using Json to return the content of the cart.

Then asking KO.js to go through Json result, and display the content.

So the problem is somewhere in the KO.js or one of it's methods.

 

As my collegue told me, that was the reason we chose KO, since you could load Json into it, and it would render cart nicely. Even if content changes, get all of the content.

But that does not seem to be the case right now.

 

But appreciate allot for pitching with the idea.

 
Dimitrij Jazel
Reply

Ok some more news.

Got some help from our KO guy.

It appears that the problem is that DW is not keeping the discount of giftcard right after gift card was applied.

F.eks. if you post a GiftCard code - it will "stick" to the order as new OrderLine.

 

Upon Submitting a GiftCard code to the cart - during this submit response GiftCard is there.

But as soon as you refresh the page (or open the cart in another page) GiftCard is gone.

 

Tested the same with Default DW templates also, and same scenario happened.

 

Suggestions?

 
Dimitrij Jazel
Reply

Application update fixed the issue.

 

You must be logged in to post in the forum