Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
3 changes: 2 additions & 1 deletion packages/template-retail-react-app/app/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
52 changes: 47 additions & 5 deletions packages/template-retail-react-app/app/ssr.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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'
]
}
}
Expand Down
17 changes: 9 additions & 8 deletions packages/template-retail-react-app/config/default.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down Expand Up @@ -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'
}
]
Expand Down
18 changes: 18 additions & 0 deletions packages/template-retail-react-app/config/sites.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down
11 changes: 0 additions & 11 deletions packages/template-retail-react-app/package-lock.json

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

Loading