I need to get the product Ids, matching to the cart rule, in my cron job.

I looked on some posts in stackoverflow, but in those answers, product is loaded for each rule.

I don't want to load each product again and again.

Somebody suggest a good way to do it.


I would suggest you use SKU as it is the best way as sometimes products can get deleted and re-added and hence in the future there could be issue

Also using SKU is default

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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