diff --git a/packages/template-retail-react-app/app/components/_app-config/index.jsx b/packages/template-retail-react-app/app/components/_app-config/index.jsx index 7880c28341..b1f7cb30a8 100644 --- a/packages/template-retail-react-app/app/components/_app-config/index.jsx +++ b/packages/template-retail-react-app/app/components/_app-config/index.jsx @@ -107,7 +107,7 @@ const AppConfig = ({children, locals = {}}) => { defaultDnt={DEFAULT_DNT_STATE} // Set 'enablePWAKitPrivateClient' to true to use SLAS private client login flows. // Make sure to also enable useSLASPrivateClient in ssr.js when enabling this setting. - enablePWAKitPrivateClient={false} + enablePWAKitPrivateClient={true} privateClientProxyEndpoint={slasPrivateClientProxyEndpoint} // Uncomment 'hybridAuthEnabled' if the current site has Hybrid Auth enabled. Do NOT set this flag for hybrid storefronts using Plugin SLAS. // hybridAuthEnabled={true} diff --git a/packages/template-retail-react-app/app/constants.js b/packages/template-retail-react-app/app/constants.js index 4765905116..1f6322ace4 100644 --- a/packages/template-retail-react-app/app/constants.js +++ b/packages/template-retail-react-app/app/constants.js @@ -164,7 +164,8 @@ export const EINSTEIN_RECOMMENDERS = { export const SHIPPING_COUNTRY_CODES = [ {value: 'CA', label: 'Canada'}, - {value: 'US', label: 'United States'} + {value: 'US', label: 'United States'}, + {value: 'FR', label: 'France'} ] // Constant to Enable Active Data diff --git a/packages/template-retail-react-app/app/ssr.js b/packages/template-retail-react-app/app/ssr.js index 98bb6b9aee..7222300295 100644 --- a/packages/template-retail-react-app/app/ssr.js +++ b/packages/template-retail-react-app/app/ssr.js @@ -51,7 +51,7 @@ const options = { // Set this to false if using a SLAS public client // When setting this to true, make sure to also set the PWA_KIT_SLAS_CLIENT_SECRET // environment variable as this endpoint will return HTTP 501 if it is not set - useSLASPrivateClient: false, + useSLASPrivateClient: true, // If you wish to use additional SLAS endpoints that require private clients, // customize this regex to include the additional endpoints the custom SLAS @@ -355,13 +355,31 @@ const {handler} = runtime.createHandler(options, (app) => { directives: { 'img-src': [ // Default source for product images - replace with your CDN - '*.commercecloud.salesforce.com' + '*.commercecloud.salesforce.com', + 'checkoutshopper-test.adyen.com', + // Allow Google Pay specific images + 'https://www.gstatic.com/', + '*.demandware.net', + '*.sfcc-store-internal.net', + 's3.amazonaws.com', + 'https://*.exp-delivery.com', + 'https://*.exp-delivery-soak.com', + '*.cc.salesforce.com' ], 'script-src': [ // Used by the service worker in /worker/main.js 'storage.googleapis.com', 'maps.googleapis.com', - 'places.googleapis.com' + 'places.googleapis.com', + '*.adyen.com', + 'https://checkoutshopper-test.adyen.com', + 'https://pay.google.com/gp/p/js/pay.js', + '*.site.com', + '*.commercecloud.com', + '*.test1.my.pc-rnd.site.com', + '*.test2.my.pc-rnd.site.com', + 'https://*.exp-delivery.com', + 'https://*.exp-delivery-soak.com' ], 'connect-src': [ // Connect to Einstein APIs @@ -371,11 +389,35 @@ const {handler} = runtime.createHandler(options, (app) => { 'maps.googleapis.com', 'places.googleapis.com', // Connect to SCRT2 URLs - '*.salesforce-scrt.com' + '*.salesforce-scrt.com', + '*.site.com', + 'checkoutshopper-test.adyen.com', + '*.pc-rnd.site.com', + '*.test1.my.pc-rnd.salesforce-scrt.com', + '*.test2.my.pc-rnd.salesforce-scrt.com', + '*.test2.my.pc-rnd.site.com', + 'https://*.exp-delivery.com', + '*.test1.my.pc-rn.site.com', + 'https://*.exp-delivery-soak.com', + 'https://pay.google.com' ], 'frame-src': [ // Allow frames from Salesforce site.com (Needed for MIAW) - '*.site.com' + '*.site.com', + 'checkoutshopper-test.adyen.com', + // Allow Google Pay Specific frames + 'https://pay.google.com' + ], + 'frame-ancestors': [ + 'self', + 'https://*.test1.my.pc-rnd.site.com', + 'https://*.test2.my.pc-rnd.site.com', + 'https://*.mobify-storefront.com', + 'https://runtime.commercecloud.com', + 'https://*.exp-delivery.com', + 'https://*.exp-delivery-soak.com', + 'https://*.force.com', + 'https://*.lightning.force.com' ] } } diff --git a/packages/template-retail-react-app/config/default.js b/packages/template-retail-react-app/config/default.js index 758c258cb7..44cf18726b 100644 --- a/packages/template-retail-react-app/config/default.js +++ b/packages/template-retail-react-app/config/default.js @@ -48,19 +48,20 @@ module.exports = { landingPath: '/reset-password-landing' } }, - defaultSite: 'RefArchGlobal', + defaultSite: 'NTOManaged', siteAliases: { RefArch: 'us', - RefArchGlobal: 'global' + RefArchGlobal: 'global', + NTOManaged: 'managed' }, sites, commerceAPI: { proxyPath: `/mobify/proxy/api`, parameters: { - clientId: 'c9c45bfd-0ed3-4aa2-9971-40f88962b836', - organizationId: 'f_ecom_zzrf_001', - shortCode: '8o7m175y', - siteId: 'RefArchGlobal' + clientId: 'a82b11ac-12a9-4347-8b86-2afd388634f1', + organizationId: 'f_ecom_zaac_001', + shortCode: 'sandbox-001', + siteId: 'NTOManaged' } }, einsteinAPI: { @@ -108,11 +109,11 @@ module.exports = { ssrFunctionNodeVersion: '24.x', proxyConfigs: [ { - host: 'kv7kzm78.api.commercecloud.salesforce.com', + host: 'sandbox-001.api.commercecloud.salesforce.com', path: 'api' }, { - host: 'zzrf-001.dx.commercecloud.salesforce.com', + host: 'zaac-001.dx.commercecloud.salesforce.com', path: 'ocapi' } ] diff --git a/packages/template-retail-react-app/config/sites.js b/packages/template-retail-react-app/config/sites.js index 95365f9e1c..fe207c7091 100644 --- a/packages/template-retail-react-app/config/sites.js +++ b/packages/template-retail-react-app/config/sites.js @@ -25,6 +25,24 @@ module.exports = [ ] } }, + { + id: 'NTOManaged', + l10n: { + supportedCurrencies: ['USD'], + defaultCurrency: 'USD', + defaultLocale: 'en-US', + supportedLocales: [ + { + id: 'en-US', + preferredCurrency: 'USD' + }, + { + id: 'en-CA', + preferredCurrency: 'USD' + } + ] + } + }, { id: 'RefArchGlobal', l10n: { diff --git a/packages/template-retail-react-app/package-lock.json b/packages/template-retail-react-app/package-lock.json index 44bbcb46fb..cc96d09bdf 100644 --- a/packages/template-retail-react-app/package-lock.json +++ b/packages/template-retail-react-app/package-lock.json @@ -818,7 +818,6 @@ "resolved": "https://registry.npmjs.org/@chakra-ui/react/-/react-2.7.0.tgz", "integrity": "sha512-+FcUFQMsPfhWuM9Iu7uqufwwhmHN2IX6FWsBixYGOalO86dpgETsILMZP9PuWfgj7GpWiy2Dum6HXekh0Tk2Mg==", "license": "MIT", - "peer": true, "dependencies": { "@chakra-ui/accordion": "2.2.0", "@chakra-ui/alert": "2.1.0", @@ -1239,7 +1238,6 @@ "resolved": "https://registry.npmjs.org/@chakra-ui/styled-system/-/styled-system-2.9.1.tgz", "integrity": "sha512-jhYKBLxwOPi9/bQt9kqV3ELa/4CjmNNruTyXlPp5M0v0+pDMUngPp48mVLoskm9RKZGE0h1qpvj/jZ3K7c7t8w==", "license": "MIT", - "peer": true, "dependencies": { "@chakra-ui/shared-utils": "2.0.5", "csstype": "^3.0.11", @@ -1266,7 +1264,6 @@ "resolved": "https://registry.npmjs.org/@chakra-ui/system/-/system-2.5.8.tgz", "integrity": "sha512-Vy8UUaCxikOzOGE54IP8tKouvU38rEYU1HCSquU9+oe7Jd70HaiLa4vmUKvHyMUmxkOzDHIkgZLbVQCubSnN5w==", "license": "MIT", - "peer": true, "dependencies": { "@chakra-ui/color-mode": "2.1.12", "@chakra-ui/object-utils": "2.1.0", @@ -1523,7 +1520,6 @@ "resolved": "https://registry.npmjs.org/@emotion/react/-/react-11.14.0.tgz", "integrity": "sha512-O000MLDBDdk/EohJPFUqvnp4qnHeYkVP5B0xEG0D/L7cOKP9kefu2DXn8dj74cQfsEzUqh+sr1RzFqiL1o+PpA==", "license": "MIT", - "peer": true, "dependencies": { "@babel/runtime": "^7.18.3", "@emotion/babel-plugin": "^11.13.5", @@ -1567,7 +1563,6 @@ "resolved": "https://registry.npmjs.org/@emotion/styled/-/styled-11.14.1.tgz", "integrity": "sha512-qEEJt42DuToa3gurlH4Qqc1kVpNq8wO8cJtDzU46TjlzWjDlsVyevtYCRijVq3SrHsROS+gVQ8Fnea108GnKzw==", "license": "MIT", - "peer": true, "dependencies": { "@babel/runtime": "^7.18.3", "@emotion/babel-plugin": "^11.13.5", @@ -2252,7 +2247,6 @@ "resolved": "https://registry.npmjs.org/@tanstack/react-query/-/react-query-4.42.0.tgz", "integrity": "sha512-j0tiofkzE3CSrYKmVRaKuwGgvCE+P2OOEDlhmfjeZf5ufcuFHwYwwgw3j08n4WYPVZ+OpsHblcFYezhKA3jDwg==", "license": "MIT", - "peer": true, "dependencies": { "@tanstack/query-core": "4.41.0", "use-sync-external-store": "^1.2.0" @@ -2300,7 +2294,6 @@ "resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-9.3.4.tgz", "integrity": "sha512-FlS4ZWlp97iiNWig0Muq8p+3rVDjRiYE+YKGbAqXOu9nwJFFOdL00kFpz42M+4huzYi86vAK1sOOfyOG45muIQ==", "license": "MIT", - "peer": true, "dependencies": { "@babel/code-frame": "^7.10.4", "@babel/runtime": "^7.12.5", @@ -2539,7 +2532,6 @@ "resolved": "https://registry.npmjs.org/@types/react/-/react-18.3.27.tgz", "integrity": "sha512-cisd7gxkzjBKU2GgdYrTdtQx1SORymWyaAFhaxQPK9bYO9ot3Y5OikQRvY0VYQtvwjeQnizCINJAenh/V7MK2w==", "license": "MIT", - "peer": true, "dependencies": { "@types/prop-types": "*", "csstype": "^3.2.2" @@ -4338,7 +4330,6 @@ "resolved": "https://registry.npmjs.org/framer-motion/-/framer-motion-10.18.0.tgz", "integrity": "sha512-oGlDh1Q1XqYPksuTD/usb0I70hq95OUzmL9+6Zd+Hs4XV0oaISBa/UUMSjYiq6m8EUF32132mOJ8xVZS+I0S6w==", "license": "MIT", - "peer": true, "dependencies": { "tslib": "^2.4.0" }, @@ -7573,7 +7564,6 @@ "resolved": "https://registry.npmjs.org/react/-/react-18.3.1.tgz", "integrity": "sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==", "license": "MIT", - "peer": true, "dependencies": { "loose-envify": "^1.1.0" }, @@ -7598,7 +7588,6 @@ "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz", "integrity": "sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==", "license": "MIT", - "peer": true, "dependencies": { "loose-envify": "^1.1.0", "scheduler": "^0.23.2"