From 452ae5f63ed5c3d47b2beccdc1da4b9794187631 Mon Sep 17 00:00:00 2001 From: DuvCharles Date: Sat, 11 Nov 2023 18:20:54 +0100 Subject: [PATCH] :sparkles: available normalisation --- lib/sylius/normalizer/product-normalizer.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/sylius/normalizer/product-normalizer.ts b/lib/sylius/normalizer/product-normalizer.ts index fbf0e112f8..e58e52bff5 100644 --- a/lib/sylius/normalizer/product-normalizer.ts +++ b/lib/sylius/normalizer/product-normalizer.ts @@ -15,7 +15,7 @@ export const normalizeProduct = (product: SyliusProduct): Product => ({ images: product.images.map((image) => normalizeProductImage(image)), id: product.id.toString(), handle: product.slug, - availableForSale: product.enabled, + availableForSale: product.variants.some((variant) => variant.inStock), title: product.name, description: product.shortDescription, descriptionHtml: product.description,