Developer forum

Forum » Ecommerce - Standard features » Capping a discount to the max order value

Capping a discount to the max order value

Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

Hi there,

I have an order with 138 euro worth of products. The order also has a discount of 200 euro attached to it. In the backend, the order ends up like this:

Shouldn't the 200 euro for the discount be capped at the maximum order value of 138?

This current setup causes issues when sending the order to BC. We send 138 euro as goods and then the full amount of 200 euro as the discount. BC then rejects the order as the maximum allowed discount value on the order is 138 but we're sending 200.

Any suggestions on how to prevent / solve this?

Imar


Replies

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

Hi Imar

The discounts them selves are not capped - only the order total, if that setting is enabled (that orders cannot be negative).

The simple solution is to not set invalid discounts.

So if you set a fixed discount of 200, do not allow it for orders under 200. Or change the discount to a percentage of 100% until eur 200:

Yet another alternative is to create a discount extender that works the magic you need.

It is not just a simple change as there can be many discounts, and you could end up with stacks of discounts saying "Very cheap discount: €0" which would also be an issue.

BR Nicolai

 

 

You must be logged in to post in the forum