Closed
Description
Note: Simple Products work across website/store code, this bug is specific to configurable products
PWA Repro:
Steps -
-
Go to above URL.
-
Switch to French Store and try adding configurable to to cart.
Expected - Product should get added.
Actual - User gets error "Could not add item to cart. Please check required options and try again."
GQL Repro:
- Using a backend on 2.4.2-beta3, create a cart
- Attempt to add a configurable item to the "french" store:
// Query
mutation addConfigurableProductToCart(
$cartId: String!
$quantity: Float!
$sku: String!
$parentSku: String!
) {
addConfigurableProductsToCart(
input: {
cart_id: $cartId
cart_items: [
{ data: { quantity: $quantity, sku: $sku }, parent_sku: $parentSku }
]
}
) {
cart {
id
total_quantity
}
}
}
{code}
{code:java}
// Query Variables
{
"cartId":"9cfw1jBRxnyyic8jVoBLXELkDOZtobJ4",
"quantity": 1,
"sku": "WT09-XL-Yellow",
"parentSku": "WT09"
} {code}
{code:java}
// Header
{
"store": "fr"
}{code}
Expected:
{code:java}
{
"data": {
"addConfigurableProductsToCart": {
"cart": {
"id": "9cfw1jBRxnyyic8jVoBLXELkDOZtobJ4",
"total_quantity": 4
}
}
}
}{code}
Actual:
{code:java}
{
"errors": [
{
"message": "Could not add the product with SKU WT09 to the shopping cart: The website with id 2 that was requested wasn't found. Verify the website and try again.",
"extensions": {
"category": "graphql-input"
},
"locations": [
{
"line": 2,
"column": 3
}
],
"path": [
"addConfigurableProductsToCart"
]
}
>,
"data": {
"addConfigurableProductsToCart": null
}
} ```