on 09-09-2015 8:39 PM
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
Is there any update about this issue?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
any update with this?
regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Diego,
This has already been identified as a critical bug, we are in the process of fixing it.
Thanks, Charles
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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
User | Count |
---|---|
5 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.