mirror of
https://github.com/vercel/commerce.git
synced 2025-07-23 04:36:49 +00:00
feat: add checkout page
This commit is contained in:
@@ -22,3 +22,12 @@ export const sorting: SortFilterItem[] = [
|
||||
|
||||
export const HIDDEN_PRODUCT_TAG = 'nextjs-frontend-hidden';
|
||||
export const DEFAULT_OPTION = 'Default Title';
|
||||
|
||||
export const CHECKOUT_PAGE_PROPS = {
|
||||
title: 'Checkout',
|
||||
body: `Checkout is not implemented yet in this template. Check out
|
||||
<a href="https://docs.medusajs.com/modules/carts-and-checkout/storefront/implement-checkout-flow">our guide on implementing a checkout flow</a> to learn more`,
|
||||
description: 'Checkout is not implemented yet in this template',
|
||||
updatedAt: new Date().toISOString(),
|
||||
createdAt: new Date().toISOString()
|
||||
};
|
||||
|
@@ -74,7 +74,7 @@ export default async function medusaRequest(
|
||||
const reshapeCart = (cart: MedusaCart): Cart => {
|
||||
const lines = cart?.items?.map((item) => reshapeLineItem(item)) || [];
|
||||
const totalQuantity = lines.reduce((a, b) => a + b.quantity, 0);
|
||||
const checkoutUrl = '/';
|
||||
const checkoutUrl = '/checkout'; // todo: implement medusa checkout flow
|
||||
const currencyCode = cart.region?.currency_code.toUpperCase() || 'USD';
|
||||
|
||||
let subtotalAmount = '0';
|
||||
|
Reference in New Issue
Block a user