Hi,
We would like to report a bug that we have noticed with the discounts in nopCommerce 2.4.
To reproduce it:
1. Create a Discount that is Assigned to Categories.
2. Assign the discount to a category.
3. Go back and edit the Discount and change its type to be Assigned to Product Variants and save it.
4. Go back to the category, which was previously assigned the discount and click the Discount tab. It would say that there are not Discounts that could be assigned to a category.
5. Open your nopCommerce 2.4 database and go to the Discount_AppliedToCategories table and you will see that despite the fact that the discount type was changed and it should have removed the mapping to the category the record that maps the discount to the category still exists.
This is a problem when calculating the final price for products in this category as the record that remains in the database will make nopCommerce consider the discount applied to the category while in reality it is not.
On a separate issued, there are no entities for the Discount_AppliedToCategories and Discount_AppliedToProductVariants tables and thus we are not able to write more complex linq queries that involve joins to these tables. Would be possible to add entities for these tables in the default object context?
Many Thanks