Custom discounts for B2B

Il y a 1 mois
Hello everyone, I have a huge case where custom discount rules has to be implemented.
I have tried to manage those via customer roles rule, but my store has 20k discounts and each of those has discount requirement rule for customer role.  
Here all the fun begins, every time I click on the product, nopcommerce checks requirement rules (checked that on SQL profiler), because of that product loads about 2-4 seconds, sometimes longer.
The question is: are there any possibilities to manage discounts without rules for this quantity of discounts.
Maybe you had a similar issue and found a solution? Or do I need to implement absolutely custom discount management in nopcommerce?
Open for any suggestions.
Il y a 1 mois
RE: "... tried to manage those via customer roles rule"

Have you considered Tier Pricing?
Il y a 1 mois
I though about those, but I am not sure If it would help because there two types of price levels: Contracts and Tier prices, both has discount by percentage or fixed amount.
Il y a 1 mois
Would you provide some examples?
Il y a 1 mois
We have several b2b business type client.
Where we are managing customer or customer role wise product prices and discounts.
I think custom implementation will help you most.
// Rashed
Il y a 1 mois
It seems, that I found a solution, but have one more problem. Maybe you guys know.

I have price tier and have discount.
It is possible to not apply the discount if product has price tier?
Il y a 1 mois
Yes, you can ignore the discounts applied to products (assigned to products, assigned to categories, assigned to manufacturer) if the tier price is applied. You need to customize the GetFinalPriceAsync method from the PriceCalculationService.cs and not compute the discount if the tier price record is found.
It should be something like this
 if (includeDiscounts && tierPrice!=null)
{
}

Note: The discount applied to subtotal and total will still be applied
Il y a 1 mois
thank you a lot for the response
Il y a 1 mois
You can also create discount rule plugin to only apply discount if tier price is not applied.

We can think about creating plugin for you and release on marketplace. Please contact us if you’re interested.

Best Regards,
Faiz