Developer forum

Forum » Ecommerce - Standard features » Discount gets "forgotten" somehow ...

Discount gets "forgotten" somehow ...

Peter Leleulya
Reply

Our customer Warmgarant has entered a discount for a product.
On creation it worked fine and the product showed its discount values on the website.
Then after a while the discount didn't show anymore on the website, while the settings were still valid.
Going to the discount in the CMS and just press [save and close] fixed the problem.
But this issue re-occurred ...

At first I assumed the customer had made a mistake or something, because I could't come up with a logical explanation for this behavior.
But today I was able to reproduce this issue (on the production environment) and record it: https://we.tl/t0W81zKfoe

I can't figure out the logic on this ...
Do you guys have any idea what could cause this, and even better, how to prevent this from happening?

This application runs on DW core 9.4.4

Thanks in advance!


Replies

 
Adnan Catovic
Reply

I am experiencing the same issue. 
Now even the save-and-close doesn't fix the problem. It simply does't work.

 
Peter Leleulya
Reply

I'm sorry to say I never found a solution for this (in my opinion important) issue.
In another forum thread about discounts not working which might be related code wise (Getting discounts on product does not seem to work when using AP) Nicolai suggests not using salesdiscount, but the matrix.
This wasn't an option for me at the time, but perhaps it will work for you?

If you find a way to properly work with discounts, please let me know via this thread.
Thanks in advance.

 
Nicolai Pedersen
Reply

Hi Guys

We have no known issues - but will take a look at it.

What versions and what solutions are you experiencing this? Needs some information to look into it.

Salesdiscounts where "deprecated" as per 9.0 for the discount matrix (known as Discounts & Offers as of 9.6) but is still in Dynamicweb for compatibility reasons. They should work, so if you encounter a bug, let us know where and how you see the problem and we will look into it.

Thanks, Nicolai

 
Adnan Catovic
Reply

Ni Nikolai

Thanks a lot for getting back to us :).

The issue that we are experiencing is following:
We have Order Discount - Order Line Discount (exclusive) set for a specific product. It works nicely when a user is logged in admin in separate browser tab, but as annonymus user (incognito mode) it does not add the discount.
We tried to figure out through user assignment setup (on the discount definition) but we do not see how to set up annonymus user so the discount is available for all.

I will send you in an email link to the solution.

Thanks!

 
Nicolai Pedersen
Reply

Hi Adnan

ok - your issue seems to have nothing to do with this thread....

Anyways - you have a custom order field "Discount" that you try to save the voucher code to. That field seems to never be saved on the cart - probably because of an error in your template. (See dump #2)

Furthermore you have setup your discount to look at the default voucher code field (see dump #1) - and you try to save the discount code to the discount field. So you need to choose the discount field in that dropdown instead.

Alternatively, change the discount field to be called "EcomOrderVoucherCode" which is the field name for the voucher codes in DW.

BR Nicolai

 

Capture.PNG Capture1.PNG
 
Adnan Catovic
Reply

Hi Nikolai

Thanks a lot for looking into this. I agree - althought symptoms were the same - sometimes it worked sometimes it didn't - it was later when we figured that it works only if admin is logged in and there is authentication in the same browser session.

I tried both of your suggestions. Unfortunately, neither worked.

Our problem is that, with current setup, the voucher code gets applied in the cart if a user is logged in (into admin), and it does not for an anonymus user. Is there explanation for this behavior? 
We will upgrade the solution shortly.

 

You must be logged in to post in the forum