Skip to content

Fix: Allow the discount to be applied if no condition coupon exists regardless of the coupon code on the cart#2300

Merged
glennjacobs merged 3 commits intolunarphp:1.xfrom
xahmedtaha:fix/fix-coupon-code-disables-other-discounts-with-no-coupon-codes
Nov 11, 2025
Merged

Fix: Allow the discount to be applied if no condition coupon exists regardless of the coupon code on the cart#2300
glennjacobs merged 3 commits intolunarphp:1.xfrom
xahmedtaha:fix/fix-coupon-code-disables-other-discounts-with-no-coupon-codes

Conversation

@xahmedtaha
Copy link
Contributor

@xahmedtaha xahmedtaha commented Sep 25, 2025

Allow the discounts to be applied if no condition coupon exists regardless of cart coupon. This way discounts that doesn't have a coupon requirement can be added and not be removed because of another coupon discount that is applied.

Current behaviour:
if a discount that has a coupon requirement is applied. and other discounts that doesn't have a coupon requirements are applied as well. the coupon code discount causes the other discounts not to apply to the cart at all because of a wrong $validCoupon comparison logic.

Expected behaviour:
discounts should be applied if there is no coupon code requirement regardless of the coupon code set on the cart. this way coupon discounts doesn't simply override all other discounts.

…less of cart coupon

Allow the discounts to be applied if no condition coupon exists regardless of cart coupon. This way discounts that doesn't have a coupon requirement can be added and not be removed because of another coupon discount that is applied.
@glennjacobs
Copy link
Contributor

@ryanmitchell do you see any issues here?

@ryanmitchell
Copy link
Contributor

Nope, seems ok to me.

@github-project-automation github-project-automation bot moved this to Todo in Roadmap Nov 11, 2025
@lunarphp lunarphp deleted a comment from vercel bot Nov 11, 2025
@glennjacobs glennjacobs merged commit 5888ca9 into lunarphp:1.x Nov 11, 2025
44 checks passed
@github-project-automation github-project-automation bot moved this from Todo to Done in Roadmap Nov 11, 2025
@glennjacobs
Copy link
Contributor

Thanks @xahmedtaha

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants