diff --git a/.changeset/odd-balloons-sleep.md b/.changeset/odd-balloons-sleep.md new file mode 100644 index 0000000000..0dd59bd2fd --- /dev/null +++ b/.changeset/odd-balloons-sleep.md @@ -0,0 +1,5 @@ +--- +'@graphcommerce/magento-product': patch +--- + +Fixed a bug which caused the default values of the productAddToCartForm to be overwritten if the selected configurable option of a product contained a visible simple product. Before the fix you could not add the same product twice without reloading the page. diff --git a/packages/magento-product/components/AddProductsToCart/AddProductsToCartForm.tsx b/packages/magento-product/components/AddProductsToCart/AddProductsToCartForm.tsx index c8be97baf4..64f99377ff 100644 --- a/packages/magento-product/components/AddProductsToCart/AddProductsToCartForm.tsx +++ b/packages/magento-product/components/AddProductsToCart/AddProductsToCartForm.tsx @@ -79,6 +79,7 @@ export function AddProductsToCartForm(props: AddProductsToCartFormProps) { AddProductsToCartDocument, { ...formProps, + experimental_useV2: true, // We're stripping out incomplete entered options. onBeforeSubmit: async (variables) => { const variables2 = (await formProps.onBeforeSubmit?.(variables)) ?? variables