I have a category of products (defined by a product/order line property) which must never have a discount applied.
I'm aware that it is possible to configure a discounts to exclude these products when it is configured through the UI. However I'm hoping to find a client-proof way of achieving that, by implementing a hard coded rule.
Is there perhaps an adjuster that I could override to achieve this?
Just thinking, one thing you could try doing is creating your own Order Line Product Rule inheriting from the default and have that auto filter out products that must never be discounted.
I think you could then force the original discount rule to be removed by calling
Hi
I realise this is an old question but I'm wanting to do the exact same thing - always exclude certain 'products', in my case donations, from any discount calculations without relying on having to configure something in the user interface.
I didn't fully understand the solution above - although I managed to create an override for the OrderLineProductDiscountRuleProvider which filtered out certain 'products', it would still require an end-user to use it in every discount configuration?
Are there any examples of how to do this? Or maybe an easier method in the later versions of vendr?
Any help on this would be much appreciated!
Thanks,
Sue
Preventing discounts on some products
I have a category of products (defined by a product/order line property) which must never have a discount applied.
I'm aware that it is possible to configure a discounts to exclude these products when it is configured through the UI. However I'm hoping to find a client-proof way of achieving that, by implementing a hard coded rule.
Is there perhaps an adjuster that I could override to achieve this?
Thank you in advance.
I may have found my answer in CalculateOrderAdjustedPricesPipeline? I'll investigate that at my next opportunity.
Hmm,
Just thinking, one thing you could try doing is creating your own Order Line Product Rule inheriting from the default and have that auto filter out products that must never be discounted.
I think you could then force the original discount rule to be removed by calling
I've never tried this, but could be worth a shot.
Matt
Hi I realise this is an old question but I'm wanting to do the exact same thing - always exclude certain 'products', in my case donations, from any discount calculations without relying on having to configure something in the user interface.
I didn't fully understand the solution above - although I managed to create an override for the OrderLineProductDiscountRuleProvider which filtered out certain 'products', it would still require an end-user to use it in every discount configuration?
Are there any examples of how to do this? Or maybe an easier method in the later versions of vendr? Any help on this would be much appreciated! Thanks, Sue
This did work, but I needed to remove some additional rules/rewards to prevent their use.
is working on a reply...