Bug in tier pricing with dates

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
6 years ago
NOP 3.90
Whenever tier pricing is used, tiers that have dates should take priority for tiers without dates
Assume the following scenario:
Item X has a price of 100

Has 2 tier prices for customer role Y:
1st tier price is for quantities starting at 0, price should be 80
2nd tier price is for quantities starting at 0, and start date 1/1/2017, price should be 75

My logic says that the customer should get 75 when he buys the item.
However, the price he will get is random, can get both 75 and 80 depending on the order of the tier prices. In this scenario, will get 80.

The problem is in ProductExtensions.cs - > GetPrefferedTierPrice line 32

The code should be replaced with:

   //get actual tier prices
            var actualTierPrices = product.TierPrices.OrderBy(price => price.Quantity).OrderBy(price => price.StartDateTimeUtc).ToList()
                .FilterByStore(storeId)
                .FilterForCustomer(customer)
                .FilterByDate();
//Removed   .RemoveDuplicatedQuantities();
6 years ago
Hi Miek,

Thanks a lot! We'll fix it soon - https://github.com/nopSolutions/nopCommerce/issues/2625
6 years ago
Hi.
All works correctly.
At the moment priority has more appropriate quantity, if there are several such tier prices, then the priority is for a lower price. You can see it here.
6 years ago
Yes, I realize this is the behaviour but it is not correct
I compare it to SAP Business One behaviour for instance, which is a leading ERP system with strctured tear pricing. The "more" restrictive pricing tiers take precedence over the less restrictive ones.
Currently, the system does not allow any overlaps in tiers, it does not make any sense.
I can give a dozen business scenarios where this is a problem..
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.