-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Open
Labels
Area: Cart & CheckoutComponent: GraphQLGraphQLGraphQLIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedPriority: P2A defect with this priority could have functionality issues which are not to expectations.A defect with this priority could have functionality issues which are not to expectations.Reported on 2.4.7-p5Indicates original Magento version for the Issue report.Indicates original Magento version for the Issue report.Reproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branchThe issue has been reproduced on latest 2.4-develop branch
Description
Preconditions and environment
- Magento: 2.4.7-p5
-PHP 8.3 - Backorder configuration enabled (Allow Qty Below 0)
- Simple / virtual product with 0 qty and Backorder flag set as (Use config settings)
Steps to reproduce
Admin -
- Enable Backorders (Allow Qty Below 0)
- Set Qty for product as 0
Frontend / Graphql-
- Login as customer (mutation generateCustomerToken)
- Create / Get Customer cart (customerCart query)
- Add product with 2 qty
- logout
- Create empty guest cart (mutation createEmptyCart)
- Add same product with 3 qty in guest cart.
- Merge Guest cart to customer cart (mutation MergeCarts)
- Fetch cart details (cart query)
Expected result
Customer Cart should have product with 5 qty.
Actual result
Customer cart have product with only 2 qty (guest qty is not merged)
Additional information
- Merge Cart mutation calls Magento\QuoteGraphQl\Model\Cart\MergeCarts\CartQuantityValidatorInterface::validateFinalCartQuantities
- In this, products current stock validates with customer cart qty + guest cart qty.
- it deletes product from guest cart if product stock condition is not satisfied
if ($stockCurrentQty < $guestCartItem->getQty() + $customerCartItem->getQty()) {
$this->cartItemRepository->deleteById($guestCart->getId(), $guestCartItem->getItemId());
$modified = true;
}
Release note
No response
Triage and priority
- Severity: S0 - Affects critical data or functionality and leaves users without workaround.
- Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
- Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
- Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
- Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.
Metadata
Metadata
Assignees
Labels
Area: Cart & CheckoutComponent: GraphQLGraphQLGraphQLIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedPriority: P2A defect with this priority could have functionality issues which are not to expectations.A defect with this priority could have functionality issues which are not to expectations.Reported on 2.4.7-p5Indicates original Magento version for the Issue report.Indicates original Magento version for the Issue report.Reproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branchThe issue has been reproduced on latest 2.4-develop branch
Type
Projects
Status
Ready for Development