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

Unable to place order after canceled order #1116

Closed
drwilliams opened this issue Jul 16, 2020 · 1 comment · Fixed by #1117
Closed

Unable to place order after canceled order #1116

drwilliams opened this issue Jul 16, 2020 · 1 comment · Fixed by #1117
Labels

Comments

@drwilliams
Copy link
Contributor

There is an error when placing an order when using a promo code that has been used on a canceled order. This is because when you cancel an order the times_used in salesrule_coupon_usage becomes zero and it tries to insert a new entry into the database.

Preconditions (*)

  1. Using OpenMage 19.4.5

Steps to reproduce (*)

  1. Log in to a customer account
  2. Place an order and use a promo code
  3. Cancel the order
  4. Try to place another order with the same promo code and you will get an error when submitting the order

Expected result (*)

  1. Order placed successfully

Actual result (*)

  1. Integrity constraint violation: 1062 Duplicate entry '10961-661' for key 'PRIMARY', query was: INSERT INTO salesrule_coupon_usage (coupon_id, customer_id, times_used) VALUES (?, ?, ?) in /cache/lib/Zend/Db/Statement/Pdo.php:235
@VincentMarmiesse
Copy link
Contributor

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants