cancel
Showing results for 
Search instead for 
Did you mean: 

Promotions applying multiple times error in hybris 5.5.1.4

Former Member
0 Kudos

Hello everybody,

We are experimenting an issue with the promotions calculation in the B2C accelerartor. In this concrete example, we have created 3 different promotions:

  • 10 euros for spending 50 euros

  • Got a free voucher for spending over 45 euros

  • Spent 45 euros to qualify for enhanced shipping

When we try to add a item to the cart, clicking very fast or with a script, the promotions are being calculated wrong and the result is a cart with the same promotions applied multiple times.

So this issue is happening adding to the cart or updating quantities. I would like to know how to fix this because we have been trying to syncronize the calculation service and the promotions calculation but that did not work. I attach 2 screenshots of the hybris cart with the error.

Thanks for all, regards

Accepted Solutions (0)

Answers (6)

Answers (6)

Former Member
0 Kudos

Is there any update about this issue?

Former Member
0 Kudos

any update with this?

regards

Former Member
0 Kudos

Hi, Thats something we have considered but is anot a definitive solution, because at the end someone with firebug or inspecting is able to avoid that validation.

Former Member
0 Kudos

Just fyi: a collegue just had the same issue and hack-fixed it by adding a "loading" flag for the Ajax roundtrip of the cart on the client / browser side. I.e. the "+" button action is not executed before the cart has been Ajax updated. Now the promotion seems to behave in a stable way in our scenario.

former_member357259
Active Contributor
0 Kudos

Hi Diego,

This has already been identified as a critical bug, we are in the process of fixing it.

Thanks, Charles

Former Member
0 Kudos

Thanks for your quick answer. That fix will be a patch or will be in the next release? Because we are currently preparing a go live and I think we cannot go live with this issue..

Regards

former_member357259
Active Contributor
0 Kudos

I can update once the fix is available.

Former Member
0 Kudos

The fix is the new promotion engine?

former_member357259
Active Contributor
0 Kudos

No, fix will a patch for the existing promotions.

Former Member
0 Kudos

Hello, i would ike to know if there is any advance is this issue. Thanks for all, regards

Former Member
0 Kudos

Hi Charles,

Can you please give us the hybris Jira issue so that we can follow the resolution progress?

Many thanks,

Sahbi

Former Member
0 Kudos

was this issue fixed? if it is fixed in which version? thanks

0 Kudos

We are facing the same issue in Hybris 6.5.0.15

Any update on the patch fix, or any suggested approach by anyone please ?

Former Member
0 Kudos

I'd have the idea to override the evaluate method of PromotionManager or of each applicable promotion and add a restriction that a promotion of a certain type/instance is only evaluated once for an order. Ideally this can be done in PromotionManager. It looks like the restrictions do not work for this as they base on products, but I might be wrong, only had a very quick look at this. Eventually the above mentioned check could be synchronized and after deciding positive (the promo will be evaluated) to add a token to the order marking it, even before the promotion gets added. This probably duplicated to checking for the promotion itself, but in case the processing / instanciation of the promotion takes longer or happens later it is a way to enforce the restriction.

Former Member
0 Kudos

Hi, thanks for the response. Its seems it can be a posibility and maybe it works, although at the end We should do somehting to make all the algorithm transactional or sinchronized. Anyway, this issue is happening in an standard accelerator instalation, so i also expect hybris to have a patch solution for this, because at the end is a very dangerous bug.

Thanks for all, regards

Former Member
0 Kudos

The promotions mechanism is unchanged for years. If Hybris had a patch it would long be part of the release... I doubt there is something.

Former Member
0 Kudos

Yes i agree, but i think that the real problem is not in the promotions evaluation: I think that the cart calculation should be prepared to work in a multi thread context, in a transactional way and syncronized using each cart instance. And the cart calculation strategy is not too old.... Anyway, lets see, Thanks