Skip to Content
author's profile photo Former Member
Former Member

Promotions applying multiple times error in hybris 5.5.1.4

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

alt text alt text

3908-issue1.png (31.1 kB)
3909-issue2.png (45.1 kB)
Add a comment
10|10000 characters needed characters exceeded

Related questions

6 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Oct 16, 2015 at 11:38 AM

    any update with this?

    regards

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 12, 2015 at 06:07 AM

    Is there any update about this issue?

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 09, 2015 at 09:26 PM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      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

  • Posted on Sep 10, 2015 at 09:39 AM

    Hi Diego,

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

    Thanks, Charles

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 10, 2015 at 01:55 PM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 11, 2015 at 10:01 AM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.