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

Removing items from cart in offer mode bug #124

Open
NickolayCh opened this issue Sep 21, 2020 · 1 comment · May be fixed by #163
Open

Removing items from cart in offer mode bug #124

NickolayCh opened this issue Sep 21, 2020 · 1 comment · May be fixed by #163
Labels

Comments

@NickolayCh
Copy link
Contributor

Seems like there is an issue when using Cart::onRemove component method in offer type mode. Here are the steps to reproduce:

  1. Add offer to the cart
  2. Remove it
  3. Add the same offer to the cart using offer type mode (
  4. Remove it
    Expected behavoir: it is removed
    Actual behavoir: it is not

It is happening due to the first removed CartPosition record in lovata_orders_shopaholic_cart_positions table have been marked as soft-deleted. But in AbstractCartPositionProcessor::findPosition method CartPositions are queried with withTrashed scope, so if the first record selected happens to be trashed we will be deleting it instead of the active one all the time.

Possible solutons: remove withTrashed scope in query

@igor-tv
Copy link
Contributor

igor-tv commented Dec 12, 2020

I have the same issue.

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.

5 participants