Roles and Discounts

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
Il y a 14 ans
I have setup
Discount1 and Discount2 both "Assigned to Product Variant SKU" and "Must be assigned to customer role" but differnet % amounts.

I then created 2 users accounts User 1 and User2
I then created 2 Roles Trade1 and Trade2, and assigned 1 user to each role.
In a product Category I then set "Discounts applied to Category" and checked both Role Trade1 & Trade2

I expected the when one user logged in they would see one discount rate and when the other user logged in they see a different discount rate, but when either user logs I they both see the higher discount rate.
Am I missing something?

I see the code uses GetPreferedDiscount...
I don't understand what I am doing wrong.

Thanks
Nick

Ah just found that if you set the Discount on the Product directy it works as I expected. I had applied the discount to the category which has the effect as described above!

Is this different by design?

Nick
Il y a 14 ans
It's the bug.

Please follow the next steps to fix it:
1. Open PriceHelper.cs file
2. Find GetAllowedDiscounts() method
3. Go to line 110
4. Add the following statement:
if (_discount.CheckCustomerRoleRequirement(customerID))
Il y a 14 ans
Excellent, thank you!

Are there a list of bug that I can look at?
Can I help with any?

Nick
Il y a 14 ans
You could take a look at nopcommerce.codeplex.com
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.