cancel
Showing results for 
Search instead for 
Did you mean: 

How to create custom condition for promotion?

Former Member
0 Kudos

Hi,

I need to create custom condition for AbstractOrderEntry. Requirement is that when promotion is applied it should check qualifying Product AND unique code maintained at each orderentry, it is because as per our custom implementation same product can be at different cart entry based on the unique code.

Please help me know if there is any reference.

I am using Hybris 6.6

Thanks

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member560975
Participant
0 Kudos

Hi Manish,

You do not just write some java code to evaluate conditions.

You write a condition "translator" that generates the Drools rule condition, you also need to declare the condition type and its possible parameters (they also need to have their own translators) in Spring.

When you create a source rule with the respective condition and parameters, then the drools rule compiler will use your declared translator to generate the condition in drools language.

Following the rule engine trail as suggested above by Bartosz is really a good idea to start with.

BR, Cristi C.

Former Member
0 Kudos

Hi Manish,

This requirement is not available OOTB however it can be implemented within a custom extension.

Take a look at the Promotion Engine Trail for version 6.6 for details.

Best regards,

Former Member
0 Kudos

Thanks Bartosz.

Ok, so I will try to create new condition for the same. I am sorry I am asking very easy ques. but could you tell me the class or any reference where eventually logic execute if all conditions meet so that I can put my java checks based on value stored in cart order entry.

Thanks in advance.