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

Can create a submitted order with total not matching items associated with order. #201

Open
TWarszawski opened this issue Aug 17, 2016 · 0 comments

Comments

@TWarszawski
Copy link

TWarszawski commented Aug 17, 2016

When a customer check out and adds a product to the cart concurrently, the order total may not accurately reflect the products in the order.

Steps to reproduce:

  1. Start demo site, create a customer, create/pick test product.
  2. Have the customer add the product to the cart and go through checkout up until the submit order step.
  3. In a separate tab or window, log in again as the customer go to the cart page.
  4. Update the quantity in the cart and finish checkout (click the Submit Order button) as close to the same time as possible.

We have reproduced this behavior on a single machine. Because this bug depends on concurrent execution, it may be helpful to introduce additional delay between the server and database. If connecting to the database using unix sockets, the following script can act as a proxy that delays packets:
https://gist.github.com/TWarszawski/a0d8dd8aea9eb5b774d64c9f826de6db

Expected Result:
The order total matches the sum of the totals for each item in the cart.

Actual Result:
The order total reflects the total of the original items in the cart, but when examining the order page the updated items are shown to be associated with the order.

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

No branches or pull requests

1 participant