I've created a custom rule in my extension using this

Now I want to add my custom conditions in a rule like order attribute, order billing address attribute and order shipping address attribute...Using that link I've got this result enter image description here

But I want to add something like this :

enter image description here

I've tried this link also to do this task HERE

But it is for sales rule so it also adds an extra link in sales rule also! I'm working with condition rule very first time so I also don't exactly know it's flow. Does anyone have any idea? Please Let me know!

1 Answer 1


After researching on this topic I've found the solution! I focused on Magento's default rule in that, analyse the code of vendor\magento\module-sales-rule\Model\Rule\Condition\Combine.php

then follow same like the default and modify where needed!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.