mirror of
https://github.com/vercel/commerce.git
synced 2025-07-23 04:36:49 +00:00
handle missing shipping costs and black styling issue
This commit is contained in:
@@ -643,10 +643,6 @@ function reshapeOrder(shopifyOrder: ShopifyOrder): Order {
|
||||
totalTax: reshapeMoney(shopifyOrder.totalTax),
|
||||
totalPrice: reshapeMoney(shopifyOrder.totalPrice),
|
||||
createdAt: shopifyOrder.createdAt,
|
||||
shippingMethod: {
|
||||
name: shopifyOrder.shippingLine?.title,
|
||||
price: reshapeMoney(shopifyOrder.shippingLine.originalPrice)!
|
||||
},
|
||||
warrantyActivationDeadline: shopifyOrder.warrantyActivationDeadline,
|
||||
warrantyStatus: shopifyOrder.warrantyStatus,
|
||||
warrantyActivationInstallation: shopifyOrder.warrantyActivationInstallation,
|
||||
@@ -667,6 +663,13 @@ function reshapeOrder(shopifyOrder: ShopifyOrder): Order {
|
||||
coreReturnDescription: shopifyOrder.coreReturnDescription
|
||||
};
|
||||
|
||||
if (shopifyOrder.shippingLine) {
|
||||
order.shippingMethod = {
|
||||
name: shopifyOrder.shippingLine.title,
|
||||
price: reshapeMoney(shopifyOrder.shippingLine.originalPrice)
|
||||
};
|
||||
}
|
||||
|
||||
if (shopifyOrder.customer) {
|
||||
order.customer = reshapeCustomer(shopifyOrder.customer);
|
||||
}
|
||||
|
@@ -163,7 +163,7 @@ export type Order = {
|
||||
totalShipping: Money;
|
||||
totalTax: Money;
|
||||
totalPrice: Money;
|
||||
shippingMethod: {
|
||||
shippingMethod?: {
|
||||
name: string;
|
||||
price: Money;
|
||||
};
|
||||
|
@@ -18,9 +18,6 @@ export const carPartPlanetColor = {
|
||||
200: '#666C89',
|
||||
500: '#2D3A7B',
|
||||
600: '#111C55'
|
||||
},
|
||||
black: {
|
||||
700: '#1A1A25'
|
||||
}
|
||||
};
|
||||
|
||||
@@ -44,9 +41,6 @@ export const remanTransmissionColor = {
|
||||
200: '#666C89',
|
||||
500: '#2D3A7B',
|
||||
600: '#111C55'
|
||||
},
|
||||
black: {
|
||||
700: '#1A1A25'
|
||||
}
|
||||
};
|
||||
|
||||
@@ -70,8 +64,5 @@ export const transmissionLocatorColor = {
|
||||
200: '#666C89',
|
||||
500: '#2D3A7B',
|
||||
600: '#111C55'
|
||||
},
|
||||
black: {
|
||||
700: '#1A1A25'
|
||||
}
|
||||
};
|
||||
|
Reference in New Issue
Block a user