Closed
Description
We're trying to add the same simple product into the cart, but with custom options through the api. The expected result would be to have 2 items in the cart with different custom options. Actual result is the first item is in cart with qty of 2.
Preconditions
Magento Version 2.4.2
Steps to reproduce
You might want to check the video attached below
Capto_Capture.2021-02-26_01-44-29_PM.mp4
.
- Create a cart via rest call: POST | {{ base_url }}guest-carts
- Receive the cart to make sure no items are in the cart: GET | {{ base_url }}guest-carts/cartId
- Add a simple product with custom options to the cart: POST | {{ base_url }}guest-carts/cartId/items
Example Payload:
{
"cartItem": {
"sku": "THE-SKU-OF-YOUR-SIMPLE-PRODUCT",
"qty": 1,
"product_option": {
"extension_attributes": {
"custom_options": [
{
"option_id": "1",
"option_value": "abc"
},
{
"option_id": "2",
"option_value": "abc"
}
]
}
},
"quoteId": "YOUR-QUOTE-ID"
}
}
- (optional) Re-do step 2 to validate that the product was added to the cart.
- Re-do step 3 but change the custom option values in the payload.
- Re-do step 2 to again to see that two different products got merged into one but the qty was increased.
Expected result (*)
Actual result (*)
The cart should contain two items, each one with the custom options that were selected.
Please provide Severity assessment for the Issue as Reporter. This information will help during Confirmation and Issue triage processes.
- 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
Use with concrete module component label E.g. "Component: Api" + "Catalog"Cannot reproduce the issue on the latest `2.4-develop` branchAdditional information is require, waiting for responseOnce P0 defects have been fixed, a defect having this priority is the next candidate for fixing.Indicates original Magento version for the Issue report.
Type
Projects
Status
Done