Skip to content
This repository was archived by the owner on Nov 14, 2023. It is now read-only.
This repository was archived by the owner on Nov 14, 2023. It is now read-only.

Configurable Products with Simple Products as configurations can't be added to cart #4

@mohan-nishit

Description

@mohan-nishit

Hi Michiel,

Running this on a M2.4.0 website, I was able to complete the entire order flow using only simple products. If I go to any Configurable product with the configuration as shown in the screengrab below, I get an error on adding the product to the cart.
image

Here is the product Detail Page. I'm able to see the configurations in the dropdown:
image

And here is the error I get on adding to cart:
image

FWIW, the SKU in the GraphQL request to add the product seems to be wrong. It seems the label is sent instead of the SKU.

The Magento 2.4 GraphQL docs have an example where the data for "Variants" can be fetched: https://devdocs.magento.com/guides/v2.4/graphql/interfaces/configurable-product.html#extended-example

I added the variants data to the App\GraphQL class, under PRODUCT_CONTENTS, and sure enough it returned the variant data as per my expectations:
image
Question is, how to go about modifying the checkout flow to accommodate for the variants?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions