From 6d367d2a33b20e2a70a894347a8994f49f4af572 Mon Sep 17 00:00:00 2001 From: Yash Maheshwari Date: Thu, 7 Oct 2021 18:09:30 +0530 Subject: [PATCH 1/2] Fixed the code to display the unique images and media_gallery on the product page(#404) --- core/modules/catalog/helpers/getProductGallery.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/modules/catalog/helpers/getProductGallery.ts b/core/modules/catalog/helpers/getProductGallery.ts index 87709f7f2..e5ba9bfab 100644 --- a/core/modules/catalog/helpers/getProductGallery.ts +++ b/core/modules/catalog/helpers/getProductGallery.ts @@ -10,7 +10,10 @@ import Product from '@vue-storefront/core/modules/catalog/types/Product'; export default function getProductGallery (product: Product) { if (product.type_id === 'configurable' && product.hasOwnProperty('configurable_children')) { if (!config.products.gallery.mergeConfigurableChildren && product.is_configured) { - return attributeImages(product) + return uniqBy([ + ...attributeImages(product), + ...getMediaGallery(product) + ], 'src') } } From 591b096112a264bc5329e0a1f9e767f676f9ffa8 Mon Sep 17 00:00:00 2001 From: Yash Maheshwari Date: Thu, 7 Oct 2021 18:16:29 +0530 Subject: [PATCH 2/2] Added: changelog entry file(#404) --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f281423cf..00861ff6a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -52,6 +52,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Added `beforeBuildCacheKey` server hook (#5297) - Fixed some typo in docs (#5071) - Fix product deletion from cart on logout->login on "out of stock" error - @SergeyDarnopykh ([#5974](https://github.com/vuestorefront/vue-storefront/issues/5974)) +- Fixed the code to display the unique images when setting the mergeConfigurableChildren to false - @ymaheshwari1 ([#404](https://github.com/vuestorefront/vue-storefront-1/issues/404)) ### Changed / Improved