diff --git a/app/[locale]/terms/page.tsx b/app/[locale]/terms/page.tsx
index 123c2e28a..04339f352 100644
--- a/app/[locale]/terms/page.tsx
+++ b/app/[locale]/terms/page.tsx
@@ -2,7 +2,8 @@ import Footer from 'components/layout/footer';
import { SupportedLocale } from 'components/layout/navbar/language-control';
import Navbar from 'components/layout/navbar';
-import { getCart } from 'lib/shopify';
+import { getCart, getProduct } from 'lib/shopify';
+import { Product } from 'lib/shopify/types';
import { cookies } from 'next/headers';
import { Suspense } from 'react';
import TermsOfUse from './terms-of-use';
@@ -30,9 +31,14 @@ export default async function TermsPage({
cart = await getCart(cartId);
}
+ const promotedItem: Product | undefined = await getProduct({
+ handle: 'gift-bag-and-postcard-set',
+ language: locale?.toUpperCase()
+ });
+
return (
-
+
diff --git a/components/cart/delete-item-button.tsx b/components/cart/delete-item-button.tsx
index 43a970505..c81625c85 100644
--- a/components/cart/delete-item-button.tsx
+++ b/components/cart/delete-item-button.tsx
@@ -28,7 +28,7 @@ export default function DeleteItemButton({ item }: { item: CartItem }) {
}}
disabled={isPending}
className={clsx(
- 'ease flex h-[17px] w-[17px] items-center justify-center rounded-full bg-neutral-500 transition-all duration-200',
+ 'ease flex h-[17px] w-[17px] items-center justify-center rounded-full bg-dark transition-all duration-200',
{
'cursor-not-allowed px-0': isPending
}
diff --git a/components/cart/index.tsx b/components/cart/index.tsx
index 3e250ba93..f82c7a67f 100644
--- a/components/cart/index.tsx
+++ b/components/cart/index.tsx
@@ -1,8 +1,10 @@
-import { getCart } from 'lib/shopify';
+import { SupportedLocale } from 'components/layout/navbar/language-control';
+import { getCart, getProduct } from 'lib/shopify';
+import { Product } from 'lib/shopify/types';
import { cookies } from 'next/headers';
import CartModal from './modal';
-export default async function Cart() {
+export default async function Cart({ locale }: { locale?: SupportedLocale }) {
const cartId = cookies().get('cartId')?.value;
let cart;
@@ -10,5 +12,10 @@ export default async function Cart() {
cart = await getCart(cartId);
}
- return
;
+ const promotedItem: Product | undefined = await getProduct({
+ handle: 'gift-bag-and-postcard-set',
+ language: locale?.toUpperCase() || 'EN'
+ });
+
+ return
;
}
diff --git a/components/cart/modal.tsx b/components/cart/modal.tsx
index 009ad602e..d1b34ecfb 100644
--- a/components/cart/modal.tsx
+++ b/components/cart/modal.tsx
@@ -1,7 +1,7 @@
'use client';
import { Dialog, Transition } from '@headlessui/react';
-import { ShoppingCartIcon } from '@heroicons/react/24/outline';
+import { ShoppingBagIcon } from '@heroicons/react/24/outline';
import Price from 'components/price';
import { DEFAULT_OPTION } from 'lib/constants';
import type { Cart, Product } from 'lib/shopify/types';
@@ -15,6 +15,7 @@ import CloseCart from './close-cart';
import DeleteItemButton from './delete-item-button';
import EditItemQuantityButton from './edit-item-quantity-button';
import OpenCart from './open-cart';
+import { PromotedCartItem } from './promoted-cart-item';
type MerchandiseSearchParams = {
[key: string]: string;
@@ -84,8 +85,8 @@ export default function CartModal({
{!cart || cart.lines.length === 0 ? (
-
-
Your cart is empty.
+
+
Your shopping bag is empty.
) : (
@@ -156,25 +157,21 @@ export default function CartModal({
);
})}
- {/* {!!promotedItem && (
-
- )} */}
-
- {/*
+ )}
+
+
*/}
- {/*
+
Calculated at checkout
+
+
Shipping
Calculated at checkout
-
*/}
+
Total
+ const defaultVariantId = product?.variants?.length === 1 ? product?.variants?.[0]?.id : undefined;
+ const variant = product?.variants?.find((variant: ProductVariant) =>
variant.selectedOptions.every(
(option) => option.value === searchParams.get(option.name.toLowerCase())
)
@@ -34,7 +33,7 @@ export function PromotedCartItem({
? 'Please select options'
: undefined;
- return firstVariant ? (
+ return product ? (