You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Seems like there is an issue when using Cart::onRemove component method in offer type mode. Here are the steps to reproduce:
Add offer to the cart
Remove it
Add the same offer to the cart using offer type mode (
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
The text was updated successfully, but these errors were encountered:
Seems like there is an issue when using Cart::onRemove component method in offer type mode. Here are the steps to reproduce:
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
The text was updated successfully, but these errors were encountered: