forked from adobe/aem-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of github.com:hlxsites/aem-boilerplate-commerce i…
…nto recommendations
- Loading branch information
Showing
36 changed files
with
10,057 additions
and
19,587 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,5 @@ helix-importer-ui | |
scripts/preact.js | ||
scripts/htm.js | ||
scripts/acdl | ||
tools/picker | ||
tools/picker | ||
scripts/widgets |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
name: Build | ||
on: [push] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Use Node.js 20 | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
- run: npm ci | ||
- run: npm run lint |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
import { loadScript } from '../../scripts/aem.js'; | ||
import { getConfigValue } from '../../scripts/configs.js'; | ||
|
||
(async () => { | ||
const widgetProd = '/scripts/widgets/LiveSearchAutocomplete.js'; | ||
await loadScript(widgetProd); | ||
|
||
const storeDetails = { | ||
environmentId: await getConfigValue('commerce-environment-id'), | ||
environmentType: (await getConfigValue('commerce-environment-id')).includes('sandbox') ? 'testing' : '', | ||
apiKey: await getConfigValue('commerce-x-api-key'), | ||
websiteCode: await getConfigValue('commerce-website-code'), | ||
storeCode: await getConfigValue('commerce-store-code'), | ||
storeViewCode: await getConfigValue('commerce-store-view-code'), | ||
config: { | ||
pageSize: 8, | ||
perPageConfig: { | ||
pageSizeOptions: '12,24,36', | ||
defaultPageSizeOption: '24', | ||
}, | ||
minQueryLength: '2', | ||
currencySymbol: '$', | ||
currencyRate: '1', | ||
displayOutOfStock: true, | ||
allowAllProducts: false, | ||
}, | ||
context: { | ||
customerGroup: await getConfigValue('commerce-customer-group'), | ||
}, | ||
route: ({ sku }) => `/products/missing-url-key/${sku}`, // TODO: We need urlKey as parameter as well! | ||
searchRoute: { | ||
route: '/search', | ||
query: 'q', | ||
}, | ||
}; | ||
|
||
await new Promise((resolve) => { | ||
const interval = setInterval(() => { | ||
if (window.LiveSearchAutocomplete) { | ||
clearInterval(interval); | ||
resolve(); | ||
} | ||
}, 200); | ||
}); | ||
|
||
// eslint-disable-next-line no-new | ||
new window.LiveSearchAutocomplete(storeDetails); | ||
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
Oops, something went wrong.