I was looking in to core module for sales rule but was unable to find the logic where it actually apply the filtration of current date and date added in rule that is From and To.

If i have created 3 rule and all are applicable on fronted also set different from and to date for each rule which date will be in priority.

I am curious to someone can please guide me where this logic is applied.

1 Answer 1


If I don't misunderstand your question, you're asking about Price Rules in Marketing. If this is the case when at the same rules Magento will rely on the prosity field to apply the rules you created. You can see the attached picture: https://prnt.sc/11r113w

  • No i have created one custom module in which i have added these two field startdate and enddate so i would like to validate these date based on current date when getting collection Apr 22, 2021 at 14:10
  • Yes. You can completely create a custom module to be able to perform the necessary functions according to your needs Apr 24, 2021 at 2:27
  • But how??? that's the question Apr 26, 2021 at 7:46

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.