Skip to content

Unable to add configurable product to cart on any non-default store view (French store). #31660

Closed
@magento-engcom-team

Description

@magento-engcom-team

Note: Simple Products work across website/store code, this bug is specific to configurable products

PWA Repro:

URL - <https://integration-5ojmyuq-jnz3dtiuj77ca.us-4.magentosite.cloud/montana-wind-jacket.html]

Steps - 

  1. Go to above URL.

  2. 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:

  1. Using a backend on 2.4.2-beta3, create a cart
  2. 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
  }
} ```

Metadata

Metadata

Assignees

Labels

PAPPartners acceleration programPriority: P1Once P0 defects have been fixed, a defect having this priority is the next candidate for fixing.Progress: doneProject: GraphQLSeverity: S1Affects critical data or functionality and forces users to employ a workaround.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions