Skip to content

Commit

Permalink
Merge pull request #10 from hlxsites/checkout-alpha18
Browse files Browse the repository at this point in the history
bumped checkout drop-in version to 0.1.0-alpha18
  • Loading branch information
keoko authored Feb 19, 2024
2 parents e0661c5 + 2c7d1f5 commit 271646d
Show file tree
Hide file tree
Showing 42 changed files with 42 additions and 43 deletions.
5 changes: 3 additions & 2 deletions blocks/commerce-checkout/commerce-checkout.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,18 @@ import Checkout from '@dropins/storefront-checkout/containers/Checkout.js';
export default async function decorate(block) {
// If cartId is cached in session storage, use
// otherwise, checkout drop-in will look for one in the event-bus
const cartId = sessionStorage.getItem('DROPINS_CART_ID');
const cartId = sessionStorage.getItem('DROPINS_CART_ID') || '';

// Initialize Drop-ins
initializers.register(checkout.initialize, { cartId });
initializers.register(checkout.initialize, {});

// Listen for order confirmation and redirect to order confirmation page
events.on('checkout/order', (data) => {
window.location.replace(`/order-confirmation?orderRef=${data.masked_order_id}`);
});

return provider.render(Checkout, {
cartId,
routeHome: () => '/',
routeCart: () => '/cart',
slots: {
Expand Down
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"dependencies": {
"@dropins/elsie": "latest",
"@dropins/storefront-cart": "~0.1.0-alpha7",
"@dropins/storefront-checkout": "~0.1.0-alpha17",
"@dropins/storefront-checkout": "~0.1.0-alpha18",
"@dropins/storefront-order-confirmation": "~0.1.0-alpha9",
"@dropins/storefront-pdp": "~0.2.1-alpha2"
}
Expand Down
2 changes: 2 additions & 0 deletions scripts/__dropins__/storefront-checkout/124.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion scripts/__dropins__/storefront-checkout/184.js

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion scripts/__dropins__/storefront-checkout/212.js

This file was deleted.

2 changes: 2 additions & 0 deletions scripts/__dropins__/storefront-checkout/256.js

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions scripts/__dropins__/storefront-checkout/28.js

This file was deleted.

2 changes: 1 addition & 1 deletion scripts/__dropins__/storefront-checkout/280.js

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions scripts/__dropins__/storefront-checkout/288.js

This file was deleted.

2 changes: 0 additions & 2 deletions scripts/__dropins__/storefront-checkout/304.js

This file was deleted.

2 changes: 1 addition & 1 deletion scripts/__dropins__/storefront-checkout/364.js

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions scripts/__dropins__/storefront-checkout/460.js

Large diffs are not rendered by default.

Loading

0 comments on commit 271646d

Please sign in to comment.