From 80cd634e94ff3ded117ae4219ecfa34048066d61 Mon Sep 17 00:00:00 2001
From: Ben Pearey <bpearey@amplience.com>
Date: Mon, 20 Jan 2025 14:33:40 +0000
Subject: [PATCH 1/7] fix: catch errors when customer group request is not
 implemented

---
 pages/api/index.ts | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/pages/api/index.ts b/pages/api/index.ts
index eed05882..9bbcb814 100644
--- a/pages/api/index.ts
+++ b/pages/api/index.ts
@@ -55,7 +55,12 @@ let commerceApi: CommerceAPI & { vendor: () => string } = {
         return await (await initCommerceAPI()).getCategoryTree(args);
     },
     getCustomerGroups: async function (args: CommonArgs): Promise<CustomerGroup[]> {
-        return await (await initCommerceAPI()).getCustomerGroups(args);
+        try {
+            return await (await initCommerceAPI()).getCustomerGroups(args);
+        } catch (e) {
+            console.warn((e as Error).message);
+            return [];
+        }
     },
     vendor: function (): string {
         return cacheApiConfig().vendor;

From abe9305c258e47d96bf26946b2f8a1140097755b Mon Sep 17 00:00:00 2001
From: Ben Pearey <bpearey@amplience.com>
Date: Tue, 21 Jan 2025 08:49:11 +0000
Subject: [PATCH 2/7] feat: bump integration middleware version

---
 package.json | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package.json b/package.json
index ed606dc0..ec0ba899 100644
--- a/package.json
+++ b/package.json
@@ -11,7 +11,7 @@
         "build-storybook": "storybook build"
     },
     "dependencies": {
-        "@amplience/dc-integration-middleware": "^2.3.1",
+        "@amplience/dc-integration-middleware": "^2.4.0",
         "@amplience/dc-integration-stylitics": "^1.0.0",
         "@emotion/styled": "^11.11.0",
         "@mui/icons-material": "^5.15.14",

From db0ea3291d08df0443385a0844214ba08a551772 Mon Sep 17 00:00:00 2001
From: Ben Pearey <bpearey@amplience.com>
Date: Tue, 21 Jan 2025 16:14:45 +0000
Subject: [PATCH 3/7] fix: prevent curate product grid card overflow

---
 .../CuratedProductGridCard.tsx                | 47 +++++++++----------
 1 file changed, 23 insertions(+), 24 deletions(-)

diff --git a/components/cms-modern/CuratedProductGrid/CuratedProductGridCard/CuratedProductGridCard.tsx b/components/cms-modern/CuratedProductGrid/CuratedProductGridCard/CuratedProductGridCard.tsx
index c1f46dba..84f0aabb 100644
--- a/components/cms-modern/CuratedProductGrid/CuratedProductGridCard/CuratedProductGridCard.tsx
+++ b/components/cms-modern/CuratedProductGrid/CuratedProductGridCard/CuratedProductGridCard.tsx
@@ -33,30 +33,29 @@ const CuratedProductGridCard = (props: CuratedProductGridCardProps) => {
 
     return (
         <Link passHref href={`/product/${result.id}/${result.slug}`} onClick={handleClickProduct}>
-            <div {...other}>
-                <div
-                    style={{
-                        position: 'relative' as 'relative',
-                    }}
-                >
-                    {result.variants[0] && (
-                        <img
-                            src={imageUrl}
-                            style={{
-                                top: 0,
-                                bottom: 0,
-                                width: '100%',
-                            }}
-                            alt={result.name}
-                        />
-                    )}
-                </div>
-                <div
-                    style={{
-                        marginTop: 30,
-                        marginBottom: 60,
-                    }}
-                >
+            <div
+                {...other}
+                style={{
+                    display: 'flex',
+                    flexDirection: 'column',
+                    alignItems: 'stretch',
+                    height: '100%',
+                }}
+            >
+                {result.variants[0] && (
+                    <img
+                        src={imageUrl}
+                        style={{
+                            maxWidth: '100%',
+                            height: 'auto',
+                            objectFit: 'contain',
+                            flexGrow: '1',
+                            overflow: 'auto',
+                        }}
+                        alt={result.name}
+                    />
+                )}
+                <div style={{ flexShrink: '0', overflow: 'auto', marginTop: 30, marginBottom: 60 }}>
                     <Typography
                         variant="h4"
                         component="h4"

From f0e533aded6038ab7dadab06cb00623006653173 Mon Sep 17 00:00:00 2001
From: Ben Pearey <bpearey@amplience.com>
Date: Tue, 21 Jan 2025 17:09:11 +0000
Subject: [PATCH 4/7] fix: check variant prices prop is defined

---
 .gitignore                                                      | 2 ++
 .../CuratedProductGridCard/CuratedProductGridCard.tsx           | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/.gitignore b/.gitignore
index bc04a4e7..b4f72c80 100644
--- a/.gitignore
+++ b/.gitignore
@@ -38,3 +38,5 @@ logs
 
 localStorage/
 tsconfig.tsbuildinfo
+
+certificates
\ No newline at end of file
diff --git a/components/cms-modern/CuratedProductGrid/CuratedProductGridCard/CuratedProductGridCard.tsx b/components/cms-modern/CuratedProductGrid/CuratedProductGridCard/CuratedProductGridCard.tsx
index 84f0aabb..77b8ce12 100644
--- a/components/cms-modern/CuratedProductGrid/CuratedProductGridCard/CuratedProductGridCard.tsx
+++ b/components/cms-modern/CuratedProductGrid/CuratedProductGridCard/CuratedProductGridCard.tsx
@@ -19,7 +19,7 @@ const CuratedProductGridCard = (props: CuratedProductGridCardProps) => {
             category: 'Product',
             action: 'Click',
             label: slug,
-            value: prices.list,
+            value: prices?.list,
         });
     };
     const { locale: cmsLocale } = useCmsContext() || {};

From 154216b5b8f72295f9e3c41d19ac14f5e40b6918 Mon Sep 17 00:00:00 2001
From: Neil Mistry <30687441+neilmistryamplience@users.noreply.github.com>
Date: Wed, 22 Jan 2025 10:00:10 +0000
Subject: [PATCH 5/7] docs: scayle

---
 docs/FeatureHighlights.md | 2 +-
 sample-.env.local         | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/docs/FeatureHighlights.md b/docs/FeatureHighlights.md
index 323a5c93..dddc06d1 100644
--- a/docs/FeatureHighlights.md
+++ b/docs/FeatureHighlights.md
@@ -6,7 +6,7 @@
 - Multiple Visualisation implemented (page, standalone, time-based, etc.)
 - Visualisation SDK implmentation for Real-Time Visualisation from Amplience Dynamic Content
 - Filter API implementation for Store page & Product Details Page personalisation
-- GraphQL implentation to connect to e-Commerce (CommerceTools, BigCommerce, file based catalog, etc.)
+- [dc-integration-middleware](https://github.com/amplience/dc-integration-middleware) implementation to connect to e-Commerce (CommerceTools, BigCommerce, Shopify, SFCC, Scayle, file based catalog, etc.)
 - Admin Panel (visualise content, slots, editons, switch between production and staging view)
 - Custom Dashboards (translation & production Kanban board, deep clone)
 - [Stylitics](https://stylitics.com) components for configuration in content not code
diff --git a/sample-.env.local b/sample-.env.local
index b57b5fcc..3457d26d 100644
--- a/sample-.env.local
+++ b/sample-.env.local
@@ -9,4 +9,5 @@ DEMOSTORE_CONFIG_ECOMM_JSON='{"vendor":"rest","codec_params":{"productURL":"http
 # DEMOSTORE_CONFIG_ECOMM_JSON='{"vendor":"commercetools","codec_params":{"project":"","language":"en","client_id":"","client_secret":"","auth_url":"","api_url":"","scope":""}}'
 # DEMOSTORE_CONFIG_ECOMM_JSON='{"vendor":"sfcc","codec_params":{"api_url":"","version":"","auth_url":"","client_id":"","client_secret":"","site_id":""}}'
 # DEMOSTORE_CONFIG_ECOMM_JSON='{"vendor":"bigcommerce","codec_params":{"api_url":"","api_token":"","store_hash":""}}'
-# DEMOSTORE_CONFIG_ECOMM_JSON='{"vendor":"shopify","codec_params":{"access_token":"","admin_access_token":"","site_id":"","version":""}}'
\ No newline at end of file
+# DEMOSTORE_CONFIG_ECOMM_JSON='{"vendor":"shopify","codec_params":{"access_token":"","admin_access_token":"","site_id":"","version":""}}'
+# DEMOSTORE_CONFIG_ECOMM_JSON='{"vendor":"scayle","codec_params":{"access_token":"","shop_id":"","tenant_space":"","api_version":"","image_base_path": ""}}'
\ No newline at end of file

From a7b2c77860dd01ac8da64cbe501b22c21ff8c434 Mon Sep 17 00:00:00 2001
From: Ben Pearey <bpearey@amplience.com>
Date: Thu, 23 Jan 2025 10:30:34 +0000
Subject: [PATCH 6/7] fix: checking for undefined menu items menu priority when
 sorting navigation

---
 components/cms-modern/Navigation/Navigation.tsx | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/components/cms-modern/Navigation/Navigation.tsx b/components/cms-modern/Navigation/Navigation.tsx
index 78872096..345208d2 100644
--- a/components/cms-modern/Navigation/Navigation.tsx
+++ b/components/cms-modern/Navigation/Navigation.tsx
@@ -65,13 +65,11 @@ const Navigation = ({ pages, style }: NavigationProps) => {
         <nav className="navigation" style={style}>
             <ul className="navigation__list">
                 {pages
-                    .sort((p1, p2) =>
-                        p1.content?.menu.priority > p2.content?.menu.priority
-                            ? 1
-                            : p1.content?.menu.priority < p2.content?.menu.priority
-                              ? -1
-                              : 0,
-                    )
+                    .sort((p1, p2) => {
+                        const menu1Priority = p1.content?.menu?.priority || 0;
+                        const menu2Priority = p2.content?.menu?.priority || 0;
+                        return menu1Priority > menu2Priority ? 1 : menu1Priority < menu2Priority ? -1 : 0;
+                    })
                     .map(({ title, href = '', children = [], content, category }, index) => {
                         return (
                             <li

From d514afe9dfc8239d00e47b6bb5c789a56ff34367 Mon Sep 17 00:00:00 2001
From: Neil Mistry <30687441+neilmistryamplience@users.noreply.github.com>
Date: Tue, 28 Jan 2025 12:03:57 +0000
Subject: [PATCH 7/7] fix: package-lock bump to middleware v2.4.0

---
 package-lock.json | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/package-lock.json b/package-lock.json
index 37090e1f..99865fcc 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -9,7 +9,7 @@
             "version": "4.1.0",
             "license": "Apache-2.0",
             "dependencies": {
-                "@amplience/dc-integration-middleware": "^2.3.1",
+                "@amplience/dc-integration-middleware": "^2.4.0",
                 "@amplience/dc-integration-stylitics": "^1.0.0",
                 "@emotion/styled": "^11.11.0",
                 "@mui/icons-material": "^5.15.14",
@@ -197,9 +197,9 @@
             }
         },
         "node_modules/@amplience/dc-integration-middleware": {
-            "version": "2.3.1",
-            "resolved": "https://registry.npmjs.org/@amplience/dc-integration-middleware/-/dc-integration-middleware-2.3.1.tgz",
-            "integrity": "sha512-mn1BUZYihhezyCvleWYX26wqHXUF2t6TwYH+cBEmvNX4gU/UO/aUueDpR4xlyR+qAFk3aTCU2yGYgQ9B9/TJtQ==",
+            "version": "2.4.0",
+            "resolved": "https://registry.npmjs.org/@amplience/dc-integration-middleware/-/dc-integration-middleware-2.4.0.tgz",
+            "integrity": "sha512-y0BRyo5VBKiDK5J0GykmAzizEvGPVwRudARG0YM5/7I9RVjn+KGNB0voqzo0+H107TzOQVE14pCUVLW0X7Pzzw==",
             "dependencies": {
                 "axios": "^0.27.2",
                 "btoa": "^1.2.1",