Hello everybody,
I have a requirement on a project I'm working on whereby pricing information for products can be pulled in one of two ways:
- Via a list price configured in EPi itself
- Via a "special" price that is specific to the currently logged in user of the site, the product sku, and the quantity requested aswell.
- So there is a use whereby if a user has an item in their cart, with a quantity of 2, they may see a different unit price if they changed their quantity.
The special price in this case is one we have to query via an external service, as the combinations of pricing tiers using the above criteria is so large, that this is not something we can manage via EPiServer itself.
The idea is that as an authenticated user browses the site they always see the cheapest price from one of the above.
This above scenario works fine, until we try to accomodate the next requirement
"When a special price is used for a particular line item, no promotions can be applied to that line item".
This is what I'm having issues with - I've tried the following:
- Excluding the items from promotions - https://world.episerver.com/documentation/developer-guides/commerce/marketing/exclude-products-from-promotions/
- I tried to exclude products by testing if a products cheapest price is the "special" price - this worked fine but then i realised that i needed to cater for quantity requested. So this won't work!
- Creating a custom promotion
- The promotion would enable me to apply the "special" pricing as a discount across the line items that qualify for it as a fixed price
- Line items that qualify for it would have a custom property added to each of them containing the special price for each
- The problem I had with this is that the evaluate method in the promotion processor only returns one RewardDescription and the fixed price for each line item would be different in my case - so this won't work either.
Does anyone else have any options for me?
I've gone down a few different avenues as you can see, but I'm still no closer to a solution for this.
Thanks very much!
Paul