Skip to content
This repository was archived by the owner on Jan 26, 2024. It is now read-only.
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
5 changes: 4 additions & 1 deletion core/modules/catalog/helpers/getProductGallery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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')
}
}

Expand Down