diff --git a/CHANGELOG.md b/CHANGELOG.md index e20ca55e59..d192a47ce1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,13 +8,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [1.11.0-rc.1] - UNRELEASED ### Added -- +- ### Fixed -- +- Fixed product link in wishlist and microcart - @michasik (#2987) ### Changed / Improved -- +- ## [1.10.0-rc.1] - 2019.06.19 diff --git a/core/lib/multistore.ts b/core/lib/multistore.ts index adf88e6a7e..5a0e7d44ed 100644 --- a/core/lib/multistore.ts +++ b/core/lib/multistore.ts @@ -11,7 +11,7 @@ export interface LocalizedRoute { path?: string, name?: string, hash?: string, - params?: object, + params?: { [key: string]: unknown }, fullPath?: string, host?: string } @@ -160,9 +160,8 @@ export function localizedDispatcherRoute (routeObj: LocalizedRoute | string, sto export function localizedRoute (routeObj: LocalizedRoute | string | RouteConfig | RawLocation, storeCode: string): any { if (routeObj && (routeObj as LocalizedRoute).fullPath && config.seo.useUrlDispatcher) { - return localizedDispatcherRoute(Object.assign({}, routeObj, { params: null }) as LocalizedRoute, storeCode) + return localizedDispatcherRoute(Object.assign({}, routeObj) as LocalizedRoute, storeCode) } - if (storeCode && routeObj && config.defaultStoreCode !== storeCode && config.storeViews[storeCode].appendStoreCode) { if (typeof routeObj === 'object') { if (routeObj.name) { diff --git a/core/modules/url/helpers/index.ts b/core/modules/url/helpers/index.ts index 9bc8438246..3f2094c2b5 100644 --- a/core/modules/url/helpers/index.ts +++ b/core/modules/url/helpers/index.ts @@ -63,13 +63,14 @@ export function formatProductLink ( url_path?: string, type_id: string, slug: string, - configurable_children: [] + options?: [], + configurable_children?: [] }, storeCode ): string | LocalizedRoute { if (config.seo.useUrlDispatcher && product.url_path) { let routeData: LocalizedRoute; - if (product.configurable_children && product.configurable_children.length > 0) { + if ((product.options && product.options.length > 0) || (product.configurable_children && product.configurable_children.length > 0)) { routeData = { fullPath: product.url_path, params: { childSku: product.sku } diff --git a/src/themes/default/components/core/blocks/Microcart/Product.vue b/src/themes/default/components/core/blocks/Microcart/Product.vue index cdd3def2b7..696fc0f429 100644 --- a/src/themes/default/components/core/blocks/Microcart/Product.vue +++ b/src/themes/default/components/core/blocks/Microcart/Product.vue @@ -9,14 +9,7 @@
@@ -93,6 +86,8 @@