Bug in tier pricing with dates

Posted: October 06, 2017 at 11:20 AM Quote #194288
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();
This post/answer is useful
1
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
Posted: October 07, 2017 at 6:48 AM Quote #194317
Hi Miek,

Thanks a lot! We'll fix it soon - https://github.com/nopSolutions/nopCommerce/issues/2625
This post/answer is useful
0
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
Interested in the dedicated Premium support services provided by core developers? Please visit http://www.nopcommerce.com/supportservices.aspx

Regards,
Andrei Mazulnitsyn
Posted: October 10, 2017 at 5:01 AM Quote #194433
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.
This post/answer is useful
1
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
Posted: October 10, 2017 at 5:51 AM Quote #194435
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 post/answer is useful
1
This post/answer is not useful

Please login or register
to vote for this post.

(click on this box to dismiss)
Premium support services
  • Dedicated premium support services provided by core developers are intended for persons who run mission critical websites, work on projects with tight deadlines, or want to get dedicated support.
Professional services
  • Want to open a new store? Want to take your store to the next level? Need a custom extension? We can customize nopCommerce to fit your store perfectly. Request a quote to get started.