New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Discount requirement #7178
Comments
@mhmd7776 What exactly discount requirement are you testing? It works fine on our demo website - https://admin-demo.nopcommerce.com/ |
@AndreiMaz when i select discount requirement type on (Must be assigned to customer role) and choose vendors option, it say (Discount requirement saved) and every thing must be fine but the selected requirement is empty and actually not saved. |
@AndreiMaz |
Do you have prices cached in Catalog Settings? I can confirm that having this enabled with Customer Role based discount rules that the prices become inaccurate. As stated in the hint - "Check to cache product prices. It can significantly improve performance. But you not should enable it if you use some complex discounts, discount requirement rules, or coupon codes." @AndreiMaz (this text should probably be rewritten as it contains typos.) maybe to "Check to cache product prices. It can significantly improve performance, but you should not enable it if you use some complex discounts, discount requirement rules, or coupon codes." I personally live with the occasionally wrong prices because my site becomes really slow with it disabled and then have my Cache clearing task set to run hourly to try and mitigate it better. I started refactoring the Pricing cache service so that the cache key included any applied discounts ids, and if someone has a coupon applied to their cart then just ignore the cache and load prices fresh, but never finished the work. |
Hi @mhmd7776. By default, the discount edit page does not apply any caching to requirements. I can't reproduce the problem either locally or on the demo site. Perhaps you have some kind of plugin that changes the caching behavior or have made some custom edits to the code |
nopCommerce version: 4.70
Steps to reproduce the problem:
Discount requirement does not save and display correctly.
The text was updated successfully, but these errors were encountered: