Skip to content

Coupon Usage Works Even When Set to Zero #10850

@dheerajqa-webkul

Description

@dheerajqa-webkul

Terms

  • Before you openning this issue, i have checked if the issue has already been reported.

Bagisto Version(s) affected

2.3

Issue Description

When the "Uses Per Coupon" or "Uses Per Customer" value is set to 0, the coupon should not be usable by any customer. However, the system still allows the coupon to be applied during checkout.

Preconditions

Admin user is logged in.

At least one product is available in the catalog.

A cart rule (coupon) is created with:

Uses Per Coupon = 0 or

Uses Per Customer = 0

The coupon is active and has a valid date range.

Steps to reproduce

  • Go to the admin panel and create or edit a cart rule (coupon).

  • Set:

    Uses Per Coupon = 0
    or
    
    Uses Per Customer = 0
    
  • Save the rule and ensure the coupon is active.

  • On the storefront, log in as a customer.

  • Add a product to the cart and proceed to checkout.

  • Apply the coupon code.

Expected Result

The coupon should not be accepted and an error message should be shown.

Actual Result

The coupon is successfully applied, even though the usage limit is set to zero.

Screenshots

Screencast.from.30-07-25.03.40.17.PM.IST.webm

Additional context

No response

Metadata

Metadata

Labels

BugSomething isn't working.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions