I would suggest you to wait for Commerce 13 which is just a few weeks away https://world.episerver.com/blogs/Quan-Mai/Dates/2019/2/new-feature-in-commerce-13-exclude-catalog-items-per-promotion/
@Quan, thank you for the reply. But I dont think we have the bandwidth to upgrade the solution at this point in time. And also this is something more dynamic, there could be N number of items which will need to be filtered based on a metafield value for example. And not a manual step where I go in and exclude items manually for a promotion.
I am using commerce 12.15.0, I have a requirment to exclude certain items from all line item promotions. My approach is to override the GetLineItems method in the EntryPromotionProcessorBase abstract class. This way I can add my exclusion logic in one place, and since all entry promotions use this processor they should automatically filter the line items. But now I have a problem, EntryPromotionProcessorBase being an abstract class, I need to implement Evaluate and GetPromotionItems method. But if I do this in the processor it would apply to all line items promotions right? And then all the different types of promotions would not be of any use. Below is my code, I need help to create a generic processor which can be used by all entry promotions.