Skip to content

Commit

Permalink
Update API url of search as you type widget
Browse files Browse the repository at this point in the history
  • Loading branch information
herzog31 committed Oct 7, 2024
1 parent a6c6133 commit 19d6785
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 44 deletions.
3 changes: 2 additions & 1 deletion blocks/header/searchbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@ import { loadScript } from '../../scripts/aem.js';
import { getConfigValue } from '../../scripts/configs.js';

(async () => {
const widgetProd = '/scripts/widgets/LiveSearchAutocomplete.js';
const widgetProd = '/scripts/widgets/SearchAsYouType.js';
await loadScript(widgetProd);

const storeDetails = {
environmentId: await getConfigValue('commerce-environment-id'),
environmentType: (await getConfigValue('commerce-endpoint')).includes('sandbox') ? 'testing' : '',
apiKey: await getConfigValue('commerce-x-api-key'),
apiUrl: await getConfigValue('commerce-endpoint'),
websiteCode: await getConfigValue('commerce-website-code'),
storeCode: await getConfigValue('commerce-store-code'),
storeViewCode: await getConfigValue('commerce-store-view-code'),
Expand Down
43 changes: 0 additions & 43 deletions scripts/widgets/LiveSearchAutocomplete.js

This file was deleted.

43 changes: 43 additions & 0 deletions scripts/widgets/SearchAsYouType.js

Large diffs are not rendered by default.

0 comments on commit 19d6785

Please sign in to comment.