You should not need
Have you tried debugging and put a break point in your code to see if it's called ?
Thanks for the input, yeah I have put in breaks points to see if it is getting hit however it never gets there.
I was thinking it is then something to do with how the promotion engine works, which I am still to dig into.
I have dropped the code into a quicksilver site also and it doesn't fire.
That class should only hit if one or more of your promotions have ExcludedCatalogItems set to something
Ah, that would be the problem then.
What I am looking for is more a global setting to exclude over a 1000 products.
It will apply to 99% of promotions all except 1% of promotions.
Do you mean those 1000 products will be excluded in 99% of promotions, and will be included in 1% of promotions?
That would be tricky then. If you instead only want to exclude 1000 products for all promotions it'll be easier. You can add a property (flag) to your entry, and set it to true if you want to exclude it (in case your products share same characteristics like same content type it'll even be easier). Then you can use EntryFilterSettings.AddFilter for those.
Add Co2 compensation fee in checkout | Optimizely Developer Comm
Thanks for the info, I will have to re-think my approach to this one.
I have been looking at customizing how we handle Promotion Exclusions.
To do this I have implemented a basic custom romotion service' that implements 'IPromotionExcludedCatalogItemService' and have registered this in a initialization module.
However when I am testing out the implementation the code is never getting executed.
Below is the code I have written to get just the basic structure in place to ensure the code is firing:
Maybe I am just having a bad day, however I can see that the implementation is registered in the IOC container using 'DeveloperTools'.
Anyone any ideas?