Skip to content
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

Trailing Whitespace not Trimmed from couponCode on Discount save #894

Closed
sbossarte opened this issue Jun 6, 2019 · 2 comments
Closed

Trailing Whitespace not Trimmed from couponCode on Discount save #894

sbossarte opened this issue Jun 6, 2019 · 2 comments
Labels
bug ℹ️ status: need more info When waiting for user to supply database or more information.

Comments

@sbossarte
Copy link

sbossarte commented Jun 6, 2019

Description

If a discount has a coupon code that is entered with trailing whitespace, it can still be added to a cart, but the discount doesn't apply.

Steps to reproduce

  1. Create discount with the coupon code ABCD , note the space at the end
  2. Attach coupon abcd to the cart
  3. Cart says coupon is applied, but not the discount
  4. Change coupon code to ABCD
  5. Attach coupon abcd to the cart
  6. Coupon is applied as well as the discount

Additional info

  • Craft version: Craft Pro 3.1.29
  • PHP version: 7.2.18
  • Database driver & version: MySQL 5.7.19
  • Plugins & versions: 2.1.6.1 pro
@lukeholder
Copy link
Member

@sbossarte can you confirm in step 5 you meant to type bcd?

@lukeholder lukeholder added the ℹ️ status: need more info When waiting for user to supply database or more information. label Jun 19, 2019
@sbossarte
Copy link
Author

It was meant to be abcd.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug ℹ️ status: need more info When waiting for user to supply database or more information.
Projects
None yet
Development

No branches or pull requests

2 participants