Skip to content

Commit

Permalink
Fix url in search-product-click event
Browse files Browse the repository at this point in the history
  • Loading branch information
herzog31 committed Jul 17, 2024
1 parent ed8d0ca commit 851dcc8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion blocks/product-list-page/product-list-page.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,11 @@ export default async function decorate(block) {
context: {
customerGroup: await getConfigValue('commerce-customer-group'),
},
route: ({ sku, urlKey }) => `/products/${urlKey}/${sku}`,
route: ({ sku, urlKey }) => {
const a = new URL(window.location.origin);
a.pathname = `/products/${urlKey}/${sku}`;
return a.toString();
},
};

if (type !== 'search') {
Expand Down
2 changes: 1 addition & 1 deletion scripts/widgets/search.js

Large diffs are not rendered by default.

0 comments on commit 851dcc8

Please sign in to comment.