Skip to Content

How to distinguish if a product level promotion applies on order entry or on the order itself?

HI all,

I have a problem regarding the refund of a multi buy promotion via the cs cockpit.

This multi buy promotion is a product promotion but the discount is directly added to the order and not to the corresponding order entry. So I need to distinguish whether a product promotion is applied on order or order entry.

Is this possible or how should I handle the refund of this kind of promotions?

Regards Daniel

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Jul 10, 2015 at 08:22 PM

    @Daniel You'd have to visit the PromotionOrderResults that every AbstractOrder has.

    It can be fetched from PromotionService. Unfortunately, PromotionOrderResults uses the JALO objects, and I would recommend converting the lists of PromotionResults into PromotionResultModel with your own converter.

    A PromotionResultModel represents the relation between the order and a promotion. The effect that the promotions engine applied to the model is in the set of promotion actions. There are at least 2 types of PromotionActions: PromotionOrderAdjustTotalAction and PromotionOrderEntryAdjustAction.

    So for your given promotion, you need to determine whether the PromotionResult succeeded, and then if it succeeded, which promotion action was applied to adjust the order.

    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.