mirror of
https://github.com/vercel/commerce.git
synced 2025-07-27 04:01:23 +00:00
WIP OrderCloud provider
This commit is contained in:
17
framework/ordercloud/utils/product.ts
Normal file
17
framework/ordercloud/utils/product.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
import type { RawProductWithPrice } from '@framework/types/product'
|
||||
import type { Product } from '@commerce/types/product'
|
||||
|
||||
export function normalize(product: RawProductWithPrice): Product {
|
||||
return {
|
||||
id: product.ID,
|
||||
name: product.Name,
|
||||
description: product.Description,
|
||||
images: [],
|
||||
variants: [],
|
||||
price: {
|
||||
value: product.priceSchedule.PriceBreaks[0].Price,
|
||||
currencyCode: 'USD',
|
||||
},
|
||||
options: [],
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user