Developer forum

Forum » Ecommerce - Standard features » Cascading discounts

Cascading discounts

Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi guys,

I have a situation where I have to apply the discounts in a cascading manner.

I have 2 Order discounts and the one should apply at the value before any discounts while the second one should apply to the resulting value after applying the first one (assuming the first one is triggered).

How do I configure this behavior? So far, it seems that both apply to the same reference value.

Thank you,

Adrian


Replies

 
Nicolai Pedersen
Reply

You have a priority field on the discount. use that to control the order of when the discounts are applied.

The first discount is type "order exclusive"

The second discount is type "order inclusive"

BR Nicolai

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Nicolai,

Thank you.
This is very useful.

Adrian

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Nicolai,

I have configured the discounts as instructed (see Screeshot 1).
They apply in the cart but the Inclusive ones still apply to the same value as the Exclusive one (See Screenshot 2).
What am I doing wrong?

I am using DW 9.9.2

Thank you,
Adrian

 

cascadingdiscounts-2.png cascading_discounts-1.png
 
Nicolai Pedersen
Reply

Priority 1 is applied first. Then 2. So you either have to switch your inclusiv/exclisive setting or swap priority.

Check this one out: https://doc.dynamicweb.com/documentation-9/ecommerce/payment-shipping/discounts-offers#8284

Also ensure that you aggregate discounts in order discount settings in settings.

BR Nicolai

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Nicolai,

The order is correct, the inclusive/exclusive settings are correct and I have the order discount setting set to "Aggregated"

The first discount to apply is "Discount pentru metoda de livrare". It is the discount for "Shipping option" it has priority 1 and it is set to "exclusive" and it is applied and calculated correctly: 3% applied to 1713 = 51.39.

The second one is the discount for the payment method and it is supposed to apply after the first one (priority =2) to the resulting amount after applying the first discount (inclusive): (1713-51.39) * 4% = 66.46.

But instead of the above calculation, the second discount is applied to the amount before the first discount: 1713*4%= 68.52.

I have tried switching the exclusive/inclusive and priority but the result is the same no matter how I play with the settings.

Adrian

 
Nicolai Pedersen
Reply

Ah, sorry.

I was off.

Reading the docs around this site, inclusive/exclusive is related to product discounts. So if a product/orderline already has a discount, the inclusive order discount uses the discounted orderline price, and the exclusive uses the non-discounted orderline price.

So it is not possible to cascade discounts applied to the entire order as you want.

BR Nicolai

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Nicolai,

This in not good news.

Apparently, I NEED to find a way to support this. The customer was very explicit about it.

What is your suggestion? Old discounts module? A discount extender provider?

Thank you,

Adrian

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Nicolai,

I have read again the UI and the descriptions and Product discount cannot be set as inclusive/exclusive. Only the Order discounts have the option for Inclusive/Exclusive which supports your first suggestion. Also, it makes a lot more sense to apply this inclusive exclusive to Order discounts instead of Product Discounts.

Could it be a bug in the 9.9.x branch? I have tried upgrading to the latest 9.9 version and the issue is still there.

Thank you,


Adrian

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Nicolai,

I have played a bit more with the discounts and I believe I understand now what you meant with the product discounts.

The inclusive/exclusive applies only to Order discounts but it does not apply when combining Order discounts.

It only matters if you have a Product discount that applies first.

I can probably try and convince the customer to use the first discount as a Product Discount.

In the meantime, do you think that it would worth supporting cascading discounts for Orders as well? It does not seem like a totally out-of-the-line feature.

What do you think?

Thank you,
Adrian

 

You must be logged in to post in the forum