Shopmost icon indicating copy to clipboard operation
Shopmost copied to clipboard

[BUG] Discount coupons with more than 100% discount of entire order value

Open wojtek777 opened this issue 2 years ago • 0 comments

Describe the bug When adding coupons in admin panel, it is possible to insert and enable the coupon that has more than 100% discount of whole order value, resulting in shop 'paying the customer for their purchase'.

To Reproduce Steps to reproduce the behavior:

  1. Go to 'admin' panel
  2. Click on 'coupons' under 'promotion'
  3. Click on the green 'New coupon' button
  4. In the window that appears, insert more than 100 units value in the 'Discount amount' box
  5. In the 'Discount Type' selective menu, select 'percentage discount to entire order'
  6. Coupon is added and active to use

Expected behavior When selecting 'percentage discount to entire order', a limit on the page should be set to deny adding coupons with more then 100% discount percentage rate

Screenshots higher1 higher2

Background (please complete the following information):

  • NodeJS 20.10.0
  • Postgres 13.12
  • ShopMost 1.0.1
  • OS: Fedora
  • Browser: Mozilla Firefox

wojtek777 avatar Jan 25 '24 23:01 wojtek777