Developer forum

Forum » Ecommerce - Standard features » Aggregated discount

Aggregated discount

Adrian Ursu
Reply

Hi guys,

I am using the option to apply always the Highest discount available if there are several discounts overlapping.

The rules applies successfully to most of the discount types but it's not applying correctly for the "Product price-field discount" discount type.

In this case the discount is applied to the already discounted price.

To clarify, here is an example:

1. Product 1 has a regular price of 12 RON.

2. I have set up a Product Price-field discount that is using the filed "OnlinePrice" for the final price

3. I have set Online Price=10 RON

4. The site now shows Regular price=12 RON; Online Price = 10 RON. If you add the product to cart, 10 RON is the price displayed

5. I have set an "Product total price order field discount" discount that is using the tdefault voucher code field for applying a 30% discount to products from a specific category.

6. I have set the Agreggated method to be "Highest" meaning that the highest discount value should apply in case there are 2 or more overlapping discounts.

7. In the cart, after using the voucher code, the discount applied is 3 RON (10 RON * 30%) to the base of 10 RON instead of 3.6 RON (12 RON * 30 %) fron 12 RON.

This means that the cart is cumulating the discounts. Instead of having a total of 8.40 RON (12 RON - 3.6 RON)  the total is 7 RON (10 RON - 3 RON).

How do I accomplish having OnlinePrice discount together with other discount types without overlapping them?

I am using version 8.8.0.6

Thank you,

Adrian

 

 


Replies

 
Nicolai Høeg Pedersen
Reply

You cannot fix that with the current DW implementation. The price thingie is a orderline discount and the other a order discount that is related to the total of the order. With our implementation we get a kind of a hen and egg situation.

 
Adrian Ursu
Reply

Understood.

Will this change in the next versions?

I am asking because I need to know if it worth investing time in an alternate solution.

Thanks,

Adrian

 
Nicolai Høeg Pedersen
Reply

It is not planned and probably requires a total different way of calculating discounts. A huge change that you will not see any time soon.

 
Adrian Ursu
Reply

Good to know.

Thanks,

Adrian

 
Adrian Ursu
Reply

Hi Nicolai,

I have come to another potential solution.

I have set up Product discounts in the following combination:

1. 3% discount for a selected list of products

2. 5% for the products in Category 1 and Category 2

3. 10% for the products in Category 3 and Category 4

I have set the Sales Discount to use the Highest discount applied and include Product Discounts (I have used the Sales Discount module)

Some products from Categories 1-4 are also in the selected list of products.

What I want to get si the following:

1. If a product is only in the selected list, it should get a 3% discount

2. If a products is in selected list and also Category 1 or Category 2, it should get a 5% discount

3. If a product is in selected list and also in Category 3 or Category 4 it should get a 10% discount.

4. Product that are only in Category 1 or Category 3 should get a 5% discount

5. Products that are only in Category 3 or Category 4 should get a 10% discount

I believe the above asumptions should be logically correct and not custom scenarios.

What actually happens is this:

No matter what combination of products I have in cart, the highest discount available is applied.

If I have a product from the selected list that is not in any of the Categories 1-4 and I also have one product from any of the Categories 1-4, the discount applied for all is the highest discount.

Any ideea? My feeling is this is a bug either buy construction or by coding.

How should I be able to accomplish this scenario?

Thanks,

Adrian

 

 

 
Nicolai Høeg Pedersen
Reply

You have probably created the discounts as order discount - you should use an orderline discount.

If you choose an order discount it means, that the order will get 10% if any products in the cart is part of that discount. The discount is applied on the order.

See dumps and 2 different calculations.

Capture.PNG Capture1.PNG Capture2.PNG Capture3.PNG
 
Adrian Ursu
Reply

I have used the Sales Discount module and they are Product Discount.
See dump.

The reason for using Sales Discount is that the other modules don't have the Product Field discount option and we used that for List Price/Online Price

Screen_Shot_08-12-16_at_06.00_PM.PNG

 

You must be logged in to post in the forum