Skip to content

Commit c10d0a5

Browse files
fix: update url with properly child sku
1 parent b635c0d commit c10d0a5

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
4444
- Error with unknown theme/index.js alias - @Fifciuu (https://github.com/vuestorefront/vue-storefront/pull/5813)
4545
- ESLint warnings caused by the double import - @lukaszjedrasik
4646
- Fix Order History Pagination - @AishwaryShrivastav / @lukaszjedrasik ([#4599](https://github.com/vuestorefront/vue-storefront/issues/4599))
47+
- Fix for URL is updated with properly child SKU when filters are changed - @lukaszjedrasik ([#5981](https://github.com/vuestorefront/vue-storefront/issues/5981))
4748

4849
### Changed / Improved
4950

core/modules/catalog/events.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@ export const filterChangedProduct = async (filterOption, store, router) => {
5353
)
5454
await store.dispatch('product/setCurrent', newProductConfiguration)
5555
EventBus.$emit('product-after-configure', { product: newProductConfiguration, configuration: configuration, selectedVariant: selectedVariant })
56+
if (config.seo.useUrlDispatcher && router?.currentRoute?.query?.childSku) {
57+
router.push({ 'query': { childSku: selectedVariant.sku } })
58+
}
5659
return selectedVariant
5760
} else {
5861
store.dispatch('notification/spawnNotification', {

0 commit comments

Comments
 (0)