Custom OrderDiscountSource along side Kentico order discounts

Stephen D'Olier asked on April 28, 2020 01:17

Hi,

I have implemented a custom order discount service that applies a custom discount to an order. I have overridden IOrderDiscountSource and it is working as intended.

Documented here: https://docs.kentico.com/k11/e-commerce-features/customizing-and-developing-your-store/customizing-discounts

However, overriding IOrderDiscountSource replaces the Kentico implementation and other order discounts configured in the CMS are no longer applied.

I would like both. Our custom order discount as well as other discounts configured in the CMS.

The problem is that the OrderDiscountSource is internal.

ProductDiscountSource is public and provides helper methods to apply the Kentico CMS configured discounts (AddCatalogDiscounts, AddVolumeDiscounts) and OrderDiscountSource does not. OrderDiscountSource could provide the same functionality.

   Please, sign in to be able to submit a new answer.