Skip to content

Commit c49fd4d

Browse files
sirughherzog31OscarMerinodevpatil7KostiantynFandeliuk
authored
🛒 Commerce Dropins 🛒 (#95)
* [chore] create develop branch from dropin fork (#94) * Remove .d.ts files from deployment (#98) * USF-876: tests events (#96) * adds check for staging to host Signed-off-by: Stephen Rugh <rugh@adobe.com> * Upgrade Checkout and Order confirmation dropins to latest versions (#99) * Upgrade checkout to alpha49 (#100) * Remove copyright from checkout block files * Lint fix * fix flaky cypress (#112) * EDS-406 Auth | Fix auth modal (or point to issue) (#107) * eds-406 fixed problem connect with dialog * eds-406 fixed Lint --------- Co-authored-by: Abrasimov Yaroslav <y.abrasimov@atwix.com> * [chore]: fixing cypress (#116) * Integrate storefront-account and storefront-order dropins (#101) * Move PR to new repo https://github.com/hlxsites/boilerplate-commerce-dropins/pull/108 * Move order initializer logic to dropins.js * eds-400 test new implemetation orderRenderer * eds-400 updated 1 * eds-400 updated template and fixed bugs * eds-300 updated OrderSearch component * eds-400 loop in web version * eds-400 test update error function * eds-400 updated backend path * eds-400 updated backend path * eds-400 updated backend 3 * eds-400 updated backend 4 * eds-400 updated link * updated * updated 2 * updated 3 * updated 4 * FIXED LINT * eds-400 reveted work version * updated 6 * Work variant * eds-400 updated OrderSearch component * eds-400 updated OrderSearch dropin * Minor styling fix * Minor styling fix * Minor styling fix * Fixed bug with render signIn * Added concole.log * updated props * test redirect to account * test commit * test errors event * remove old code * remove old code * updated dropin js * updated * updated * updated Dropin * updated * updated * revert old code * updated form * Updated dropin * updated Dropin * updated dropin * updated dropin * updated * updated * updated * updated * updated * updated * updated * updated * Fixed lint * updated * updated * updated * updated * updated * updated * updated * updated * updated * updated * updated * updated * updated * Fix Lint * updated * updated * updated * updated * updated * updated * updated * updated * Fixed Lint * Adjustments for headers * Rollback needless changes * Refactor dropins.js * Fix lint errors * Update versions * Minor adjustment * Update storefront-order build * Update tools version * Update storefront-order version * Minor adjustments after CR * Experiment * Rollback experiment * Adjust order/error handling, remove outdated condition * Testing fix for CustomerDetails * Rollback * Test CustomerDetails update * Test CustomerDetails update 2 * Fix sidebar styling * Drop updated CustomerDetails build * eds-259 updated after CR * eds-259 updated eslint * eds-259 updated dropin js * eds-259 modify functionality dropin js * eds-259 revert default functionality * eds-259 updated dropin js * eds-259 updated dropin js * eds-259 updated order dropin * eds-259 updated order dropin * eds-259 updated order dropin * eds-259 updated order dropin events.on('order/error') * eds-259 updated dropin js * eds-259 updated dropin js redirect * eds-259 updated dropin js redirect added isAccountPage validation * eds-259 updated dropin js redirect * eds-259 removed old code * eds-259 fixed urls - updated order version * Replace URLs with variables * Comment cypress test, leave TODO comment * Change cypress environment * Add cypress placeholders and TODO's * Bump versions * Update storefront-account version * Fix order-header * Refactor routing * Refactor routing 2 * Refactor routing 3 * Adjust header structure * Fix typo * Bump version --------- Co-authored-by: Konstantin Fandelyuk <k.fandeliuk@atwix.com> * fix cypress (#127) * fix cypress * update * chore: fix cypress for ls changed classname (#133) Signed-off-by: Stephen Rugh <rugh@adobe.com> * Fix issue with incorrect order token param (#129) * Fix issue with incorrect order token param * fix cypress --------- Co-authored-by: Devagouda Patil <depatil@adobe.com> Co-authored-by: Devagouda <40405790+dpatil-magento@users.noreply.github.com> * Update Cart to 0.7.0 (#136) * Update cart beta * Use exact sdk version * revert sdk * Update cart to 0.7.0 * Dropin Build Tools (GraphQl Operations Extensibility) (#106) * build-tools * updated alpha package * latest alpha * nump * Update auth, order and account dropins (#132) * Update auth dropin * eds-416 fixed error date * eds-405 updated auth dropin and fixed bug connect with date * eds-405 updated auth dropin * eds-405 updated auth dropin 3 * eds-405 updated auth dropin 4 * eds-405 updated auth dropin 5 * eds-405 updated auth dropin * eds-405 updated auth dropin * Update auth dropin * Update order dropin * Update account dropin * eds-416 added new account update * eds-416 revert checnges * updates cypress tests to use camelCase as per auth dropin changes Signed-off-by: Stephen Rugh <rugh@adobe.com> * Update auth and account dropins --------- Signed-off-by: Stephen Rugh <rugh@adobe.com> Co-authored-by: Konstantin Fandelyuk <k.fandeliuk@atwix.com> Co-authored-by: Stephen Rugh <rugh@adobe.com> * Moved appending the .appear class to the body until after the LCP is finished to prevent a checkout error from occuring (#140) Co-authored-by: Preston Choate <pchoate@adobe.com> * Franklin -> EDS (#139) Signed-off-by: Stephen Rugh <rugh@adobe.com> * improve product recommendations events (#141) * Cart Container (#142) * refactored to single Block Cart * Update commerce-cart.css * Update commerce-cart.js * wrap in promise all * fixed loading issue * fixed cypress tests * npm audit fixes Signed-off-by: Stephen Rugh <rugh@adobe.com> * fixed layout (#145) * fix merge Signed-off-by: Stephen Rugh <rugh@adobe.com> * Dropins Initializer (#149) * wip initializer poc * initialize cart globally * initialize globally * fixed loop redirect * pdp initializer * await * mountImmediately * bump * fixed lint issues * clean up * bump * Update Cart to 0.8.0 (#151) * Update cart beta * Update use betatwo * update cart to 0.8.0 * Fix 404.html not loading (#156) * sets shopperContext on page load based on user token presence (#153) * adds security scan domain verification tag for boilerplate environment Signed-off-by: Stephen Rugh <rugh@adobe.com> * fix missed merge property not properly updated Signed-off-by: Stephen Rugh <rugh@adobe.com> * fix: set body to display:none initially (#160) Co-authored-by: Stephen <sirugh@users.noreply.github.com> * Integrate Order Cancellation: storefront-order/v0.1.0-alpha15 (#154) * placeholders integration (#166) * placeholders integration * log error * preload and cache placeholders * Update head.html * only initialize event collection when not prerendering (#168) * overloaded adding state caused a2c button to change when wishlist button clicked (#170) * add custom label (#169) * Update Cart to 0.9.0 (#171) * Update cart beta1 * Update to cart 0.9.0 * Update order and account dropins integration (#161) * Update order and account dropins integration * Fix lint issues * Adjust TODO comments * Integrate placeholders approach for static text * Logout redirect fix * Bump storefront-order version * Return details (#163) Implement return-details page * Bump storefront-order version * Update placeholders, remove debug code * Adjust placeholders approach * Adjust placeholders approach (once again) * await initializers (#173) * Placeholder metadata (#175) * Merge PREX bugfix from main into develop (#179) * fixed placeholders (#172) * Fix PRex on cart page (#178) * Fix linting issue --------- Co-authored-by: Carlos A. Cabrera <316104+fnhipster@users.noreply.github.com> Co-authored-by: Mark J. Becker <herzog31@users.noreply.github.com> * fixed PREX (width) layout (#182) * updating experiment plugin (#188) * Checkout drop in version to 0.1.0-alpha53 (#165) * Enable tracking (#190) * Manually update order and account builds * Add tracking support * Update packages * Update package.lock * Experimentation Plugin must load before Drop-ins initialization (#193) * experimentation must load before dropins initialization * Update scripts.js * Remove checkout experimentation block (#200) * Cart Dropin Version 0.10.0 (#201) * Create return page (#204) * Integrate CreateReturn container * Add order build (manually) * Update dependencies * Manually add alpha20 build (test) * Manually add alpha20 build (test) * Install latest version of storefront-order dropin * Install latest order dropin version --------- Co-authored-by: Konstantin Fandelyuk <k.fandeliuk@atwix.com> * USF 1629 - Add coupon container in cart (#162) * Add coupon container in cart * fix lint * Add coupon slot to checkout * Fix lint --------- Co-authored-by: Eric Oeur <31492142+ericeoeur@users.noreply.github.com> * update packages to 0.36.0 (#208) * Checkout drop in version to 0.1.0-alpha57 (#206) * [PDP] add Magento metadata as query parameters instead of headers (#198) * add query parameters instead of headers * add Magento metadata as query parameters instead of headers * fix formating * refactor code as in comments * remove unused import * Build picker --------- Co-authored-by: Mark J. Becker <herzog31@users.noreply.github.com> * Bump storefront-order v0.1.0-alpha23 (#209) * Bump storefront-order v0.1.0-alpha23 * Order initializer adjustment * Order initializer adjustment * Order initializer adjustment * Order initializer adjustment * Order initializer adjustment * Bump storefront-order v0.1.0-alpha23 * Order initializer adjustment * Order initializer adjustment * Order initializer adjustment * Order initializer adjustment * Order initializer adjustment * rm unnecessary file --------- Co-authored-by: Sergii Ivashchenko <sivashch@adobe.com> * Extend order initializer logic (#212) * Bump storefront-order v0.1.0-alpha23 * Order initializer adjustment * Order initializer adjustment * Order initializer adjustment * Order initializer adjustment * Order initializer adjustment * Extend order initializer logic * Fix routing bug * Update storefront-order * Fix auth bug --------- Co-authored-by: Elisea Cornejo <ecornejo@adobe.com> Co-authored-by: Sergii Ivashchenko <sivashch@adobe.com> * Bump Checkout drop in version to 0.1.0-alpha58 (#213) * update checkout order handling to include order number in URL (#214) * PDP Containers (#135) * PDP containers * merge * fix * fixed height in overlay * bump * layout * promsie all * fixes * Promise.all * testin w/o promise all * Revert "testin w/o promise all" This reverts commit b3d8faa21a6c2d22f812704e8546eb32922fe827. * update * Update scripts.js * Update product-details.js * test: disable placeholders * Update scripts.js * Update product-details.js * placeholders * moved to variable * settings needs to be set once * Update head.html * extra berak line * promtoe jsonldp * fixed linting issues * initialDat * initialization * set jsonld on lcp * fixes * fix lint * fixed selections * moved initializer * reverting * removed spaces * clean up * optionsUIDs * getOptionsUIDsFromUrl * promise * prefetch placeholders * preload * render concurrently * wip initializer poc * initialize cart globally * initialize globally * fixed loop redirect * pdp initializer * await * mountImmediately * bump * fixed lint issues * clean up * fix lint errors * fixed cypress tests * preloads * preloads * Update product-details.js * valid * Update package.json * updated PDP drop-in version * bug fixes * removed custom pdp * bump * load css first * pre-initialize pdp * preload product image * Update pdp.js * Update pdp.js * Update pdp.js --------- Co-authored-by: Daniela Neagu <danielan@adobe.com> * Preloaders (#218) * Disable bfcache * Update head.html * test w/o recaptcha * moved recaptcha post lcp * Update head.html * Fix import safari (#219) * Disable bfcache * Update scripts.js * Bump Checkout drop in version to 0.1.0-alpha60 (#220) * Redirect to home from order confirmation when signing out and improve checkout layout (#221) * refactor checkAndRedirect function to handle multiple redirections and handle /order-details path * move place order button to main column --------- Co-authored-by: OscarMerino <merino@adobe.com> * Accessibility Fixes (#226) * Disable bfcache * removed uncessary logs * fixed accesibility error * fixed accessibility issues * prex label * Bump order-dropin alpha26 release (#228) * Bump Checkout drop in version to 0.1.0-alpha61 (#225) * USF-1783 - Disable viewport auto-zoom (#230) * Auth VoiceOver (#231) * Auth dropdown WCAG adjustments --------- Co-authored-by: Abrasimov Yaroslav <y.abrasimov@atwix.com> * Fixes non-existing product 404 (#234) * Fix 404 styles (#236) * Add cypress test for cart event - part of USF 1654 (#227) * Add add-to-cart event test * update * Add all required context * chore: recs test against /gear not product (#239) Signed-off-by: Stephen Rugh <rugh@adobe.com> * Auth / Order / Account - 1.0.0 (#242) * Install 1.0.0 version of account dropin * Install 1.0.0 version of order dropin * Install 1.0.0 version of auth dropin * Update cart to v1.0.0-beta1 (#243) * update cart to one beta * [Bugfix]: Shopping Cart View event published too often (#241) * Add manual API call to trigger publishing shopping cart view event * Fix linting issues * Cart version bump * Update cart to beta2 * Bugfix: Update product routing logic to use top level sku --------- Co-authored-by: James Calcaben <jcalcaben@users.noreply.github.com> * Checkout v1.0.0 beta1 and Order v1.0.0 beta4 (#235) * Checkout v1.0.0 beta3 (#245) * eds-517 fix bug auth combine modal (#246) Co-authored-by: Yaroslav Abrasimov <y.abrasimov@atwix.com> * Update order, account and auth dropins (#247) * Update order, account and auth dropins * Added Cypress test to check the ACDL place-order event (#249) * Upgrade Checkout and Order dropins to latest versions (#250) * update packages to 0.38.0 (#251) * update auth dropdown navigation (#253) * update auth dropdown navigation * update auth dropdown navigation spec * Package and readme changes for 1.0.0 * bump dropins to 1.0.0* (#261) * bump dropins to 1.0.0 Signed-off-by: Stephen Rugh <rugh@adobe.com> * cart to 1.0.1 Signed-off-by: Stephen Rugh <rugh@adobe.com> --------- Signed-off-by: Stephen Rugh <rugh@adobe.com> --------- Signed-off-by: Stephen Rugh <rugh@adobe.com> Co-authored-by: Mark J. Becker <herzog31@users.noreply.github.com> Co-authored-by: OscarMerino <merino@adobe.com> Co-authored-by: Devagouda <40405790+dpatil-magento@users.noreply.github.com> Co-authored-by: KostiantynFandeliuk <85105163+KostiantynFandeliuk@users.noreply.github.com> Co-authored-by: Abrasimov Yaroslav <y.abrasimov@atwix.com> Co-authored-by: Konstantin Fandelyuk <k.fandeliuk@atwix.com> Co-authored-by: Daniela Neagu <danielan@adobe.com> Co-authored-by: Devagouda Patil <depatil@adobe.com> Co-authored-by: Chuting (Christina) Yan <59424839+cctina516@users.noreply.github.com> Co-authored-by: Carlos A. Cabrera <316104+fnhipster@users.noreply.github.com> Co-authored-by: Preston Choate <pchoate@adobe.com> Co-authored-by: Dirk Rudolph <drudolph@adobe.com> Co-authored-by: Marc Ginesta <loginesta@gmail.com> Co-authored-by: James Calcaben <jcalcaben@users.noreply.github.com> Co-authored-by: Sergii Ivashchenko <serg.ivashchenko@gmail.com> Co-authored-by: Eric Oeur <31492142+ericeoeur@users.noreply.github.com> Co-authored-by: Anthoula Wojczak <anthoula@users.noreply.github.com> Co-authored-by: Cristian <mitre.cristian@gmail.com> Co-authored-by: eliseacornejo <ecornejo@adobe.com> Co-authored-by: Sergii Ivashchenko <sivashch@adobe.com> Co-authored-by: Emi Pallarès <100593045+emipallares@users.noreply.github.com> Co-authored-by: Natxo Cabré <natxo.cabre@gmail.com> Co-authored-by: Mike <mcocachan@gmail.com>
1 parent d9a744d commit c49fd4d

1,315 files changed

Lines changed: 41227 additions & 4898 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.eslintignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ scripts/htm.js
33
scripts/acdl
44
tools/picker
55
tools/pdp-metadata
6-
scripts/dropins
76
scripts/__dropins__
87
scripts/commerce-events-collector.js
98
scripts/commerce-events-sdk.js
109
scripts/widgets
1110
plugins/
11+
cypress/

.eslintrc.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,13 @@ module.exports = {
1414
'import/extensions': ['error', { js: 'always' }], // require js file extensions in imports
1515
'linebreak-style': ['error', 'unix'], // enforce unix linebreaks
1616
'no-param-reassign': [2, { props: false }], // allow modifying properties of param
17+
'no-use-before-define': [2, { functions: false }],
18+
'no-console': [
19+
'error',
20+
{
21+
allow: ['warn', 'error', 'info', 'debug'],
22+
},
23+
],
24+
'no-unused-vars': ['error', { argsIgnorePattern: '^_', varsIgnorePattern: '^_' }],
1725
},
1826
};
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Cypress E2E Tests
2+
on: push
3+
jobs:
4+
cypress-run:
5+
runs-on: ubuntu-latest
6+
steps:
7+
- uses: actions/checkout@v4
8+
- name: Install root dependencies
9+
run: npm ci
10+
- name: Start server in the background
11+
run: npm start &
12+
13+
- name: Install Cypress and run tests
14+
uses: cypress-io/github-action@v6
15+
with:
16+
working-directory: cypress
17+
browser: chrome
18+
wait-on: 'http://localhost:3000'
19+
config: baseUrl=http://localhost:3000
20+
- uses: actions/upload-artifact@v4
21+
if: failure()
22+
with:
23+
name: cypress-screenshots
24+
path: cypress/screenshots
25+
if-no-files-found: ignore

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ helix-importer-ui
99
*.bak
1010
.idea
1111
# Ignore .map files in scripts/__dropins__/ directory and all its subdirectories
12-
scripts/__dropins__/**/*.map
12+
scripts/__dropins__/**/*.map

.hlxignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
.*
22
*.md
3+
*.d.ts
34
karma.config.js
45
LICENSE
56
package.json
67
package-lock.json
78
test/*
89
postinstall.js
10+
build.mjs
911
tools/picker/src/*
12+
cypress/
1013
tools/pdp-metadata/*

.npmrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
; force @adobe namespaced packages to be installed from npmjs.org
2+
@adobe:registry=https://registry.npmjs.org

404.html

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
{
88
"imports": {
99
"@dropins/tools/": "/scripts/__dropins__/tools/",
10-
"@dropins/storefront-pdp/": "/scripts/__dropins__/storefront-pdp/"
10+
"@dropins/storefront-cart/": "/scripts/__dropins__/storefront-cart/",
11+
"@dropins/storefront-auth/": "/scripts/__dropins__/storefront-auth/"
1112
}
1213
}
1314
</script>
@@ -41,9 +42,13 @@
4142
<link rel="stylesheet" href="/styles/styles.css">
4243
<style>
4344
main.error {
44-
min-height: calc(100vh - var(--nav-height));
45-
display: flex;
4645
align-items: center;
46+
display: flex;
47+
margin: 0 auto;
48+
max-width: 1264px;
49+
min-height: calc(100vh - var(--nav-height));
50+
padding: 0 32px;
51+
width: 100%;
4752
}
4853

4954
main.error .error-number {

README.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,21 @@ https://experienceleague.adobe.com/developer/commerce/storefront/
88
- Preview: https://main--{repo}--{owner}.aem.page/
99
- Live: https://main--{repo}--{owner}.aem.live/
1010

11+
## Pre-requisites
12+
13+
Out of the box, this project template uses a pre-configured Adobe Commerce environment. If you want to use your own Adobe Commerce environment, you'll need to update the `configs.xlsx` file in your content repository to have values that match your environment.
14+
15+
Additionally, you need to have the following modules and customizations installed on your environment:
16+
17+
1. magento/magento-extra-graphql: Commerce module required for Cart and Checkout Drop-Ins.
18+
1. magento/module-data-services-graphql: Commerce module with functionality necessary for adding context to events.
19+
1. magento/module-page-builder-product-recommendations: Commerce module required for PRex Widget
20+
1. magento/module-visual-product-recommendations: Commerce module required for PRex Widget
21+
<!-- 1. TODO: Add further prereqs. -->
22+
1123
## Documentation
1224

13-
Before using the aem-boilerplate, we recommand you to go through the documentation on https://www.aem.live/docs/ and more specifically:
25+
Before using the boilerplate, we recommand you to go through the documentation on https://www.aem.live/docs/ and more specifically:
1426
1. [Developer Tutorial](https://www.aem.live/developer/tutorial)
1527
2. [The Anatomy of a Project](https://www.aem.live/developer/anatomy-of-a-project)
1628
3. [Web Performance](https://www.aem.live/developer/keeping-it-100)
@@ -30,7 +42,7 @@ npm run lint
3042

3143
## Local development
3244

33-
1. Create a new repository based on the `aem-boilerplate` template and add a mountpoint in the `fstab.yaml`
45+
1. Create a new repository based on the `aem-boilerplate-commerce` template and add a mountpoint in the `fstab.yaml`
3446
1. Add the [AEM Code Sync GitHub App](https://github.com/apps/aem-code-sync) to the repository
3547
1. Add your Adobe Commerce SaaS configuration in the `configs.xlsx` sheet in your content repository.
3648
1. Install all dependencies using `npm i`.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
body.columns main > .section > div.commerce-account-header-wrapper {
2+
margin-bottom: 0;
3+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/* eslint-disable import/no-unresolved */
2+
/* eslint-disable import/no-extraneous-dependencies */
3+
import { Header, provider as uiProvider } from '@dropins/tools/components.js';
4+
import { readBlockConfig } from '../../scripts/aem.js';
5+
6+
export default function decorate(block) {
7+
const {
8+
title = 'My account',
9+
} = readBlockConfig(block);
10+
11+
block.innerHTML = '';
12+
13+
return uiProvider.render(Header, { title })(block);
14+
}

0 commit comments

Comments
 (0)