Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .node-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
18.17.1
2,396 changes: 2,396 additions & 0 deletions CHANGELOG.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "checkout-js",
"version": "1.462.0",
"version": "1.462.1-prerelease.1712003569971",
"authors": [
"BigCommerce"
],
Expand Down
2 changes: 1 addition & 1 deletion dist/375-00cce737.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/608-6573dede.js.map

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion dist/auto-loader-1.462.0.js.map

This file was deleted.

6 changes: 3 additions & 3 deletions dist/auto-loader-1.462.0.js → dist/auto-loader-1.462.1.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions dist/auto-loader-1.462.1.js.map

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions dist/auto-loader.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions dist/loader-1.462.0.js → dist/loader-1.462.1.js

Large diffs are not rendered by default.

File renamed without changes.
2 changes: 1 addition & 1 deletion dist/loader-1.462.0.js.map → dist/loader-1.462.1.js.map

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions dist/loader.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"version": 2,
"appVersion": "1.462.0",
"appVersion": "1.462.1",
"dynamicChunks": {
"js": [
"134-c1a148e5.js",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions package-lock.json

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

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"name": "@bigcommerce/checkout",
"version": "1.462.0",
"version": "1.462.1-prerelease.1712003569971",
"private": true,
"description": "Browser-based application providing a seamless UI for BigCommerce shoppers to complete their checkout.",
"license": "MIT",
"engines": {
"node": "18",
"node": "18.17.1",
"npm": "9"
},
"scripts": {
Expand Down
11 changes: 10 additions & 1 deletion packages/core/src/app/auto-loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,23 @@ function isCustomCheckoutWindow(window: Window): window is CustomCheckoutWindow
}

(async function autoLoad() {
alert('custom confirm code has loaded')
if (!isCustomCheckoutWindow(window)) {
throw new Error('Checkout config is missing.');
}

const { renderOrderConfirmation, renderCheckout } = await loadFiles();

const { orderId, checkoutId, ...appProps } = window.checkoutConfig;
const getCookieValue = (name: string) => {
const regex = new RegExp(`(^| )${name}=([^;]+)`)
const match = document.cookie.match(regex)
if (match) return match[2];
return '000';
}

const { checkoutId, ...appProps } = window.checkoutConfig;
const orderId = Number(getCookieValue('orderId'));
console.log('orderId....', orderId)
if (orderId) {
renderOrderConfirmation({ ...appProps, orderId });
} else if (checkoutId) {
Expand Down