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

Existing ShoppingCartItem Quantity Doubled After Calling "CreateOrder" #182

Open
pkmccaffrey opened this issue Jan 9, 2019 · 1 comment

Comments

@pkmccaffrey
Copy link

pkmccaffrey commented Jan 9, 2019

When calling OrdersController.CreateOrder(), the quantity for any already existing ShoppingCartItem object is doubled.

The issue is in OrdersController.AddOrderItemsToCart(). When calling _shoppingCartService.AddToCart(), Nop assumes that you want to increase the quantity of any pre-existing cart items by the specified amount. This code is called strictly from CreateOrder, so it can be assumed that the quantity submitted for a given OrderItemDto is the desired quantity (and any existing quantity on a ShoppingCartItem should be ignored).

@pkmccaffrey
Copy link
Author

A fix for this is included in PR #174 . Due to my own poor planning, this commit does not exist on its own, but in a branch with other enhancements.

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