My customer wants to apply the discount on a custom property of the product called "Vejledende pris" (indicative price), if the property is filled.
If not, the discount should be applied to the unitprice.
I'm pretty sure you can do that with maybe two different marketing campaigns. Each of them should handle one of your scenarios and apply the discount in different ways.
Recalculate orderline discount
Hi,
I need to recalculate the discount per orderline from a custom property on the product, if the custom property is present (has a value).
I've tried to make an Order Line Calculator, as suggested in another thread, but this "just" updates the products price, which is not what I need.
Would the right step be to hook into the NotificationCenter.Order.OrderLinesAdding/Added and change the discount on the specific orderline?
--
Best regards
Kurt Moskjaer Andersen
Hi Kurt,
Have you tried using the Marketing module, which can do just that?
/Rune
Hi Rune,
Yes, but my task is a little special :)
My customer wants to apply the discount on a custom property of the product called "Vejledende pris" (indicative price), if the property is filled. If not, the discount should be applied to the unitprice.
/Kurt
I'm pretty sure you can do that with maybe two different marketing campaigns. Each of them should handle one of your scenarios and apply the discount in different ways.
Otherwise the correct procedure would be to make a custom rule and/or a custom award. How the default rules and awards is set up can be seen here: https://github.com/TeaCommerce/Tea-Commerce-for-Umbraco/tree/master/Source/TeaCommerce.Umbraco.Configuration/Marketing/Models https://github.com/TeaCommerce/Tea-Commerce-for-Umbraco/tree/master/Source/TeaCommerce.Umbraco.Application/Marketing
/Rune
Could you perhaps elaborate how you would do this with different builtin marketing campaigns?
I think using a rule group with a property rule inside?
/Kurt
is working on a reply...