mirror of
https://github.com/vercel/commerce.git
synced 2025-05-15 05:56:59 +00:00
fix: use referencedId for item id
This commit is contained in:
parent
85e0584782
commit
d24146d45e
@ -1,44 +1,44 @@
|
|||||||
import {
|
import {
|
||||||
requestCart,
|
requestCart,
|
||||||
requestCategory,
|
requestCategory,
|
||||||
requestCategoryList,
|
requestCategoryList,
|
||||||
requestCategoryProductsCollection,
|
requestCategoryProductsCollection,
|
||||||
requestCrossSell,
|
requestCrossSell,
|
||||||
requestNavigation,
|
requestNavigation,
|
||||||
requestProductsCollection,
|
requestProductsCollection,
|
||||||
requestSearchCollectionProducts,
|
requestSearchCollectionProducts,
|
||||||
requestSeoUrl,
|
requestSeoUrl,
|
||||||
requestSeoUrls
|
requestSeoUrls
|
||||||
} from './api';
|
} from './api';
|
||||||
import { ExtendedCategory, ExtendedProduct, ExtendedProductListingResult } from './api-extended';
|
import { ExtendedCategory, ExtendedProduct, ExtendedProductListingResult } from './api-extended';
|
||||||
import {
|
import {
|
||||||
getDefaultCategoryCriteria,
|
getDefaultCategoryCriteria,
|
||||||
getDefaultCategoryWithCmsCriteria,
|
getDefaultCategoryWithCmsCriteria,
|
||||||
getDefaultCrossSellingCriteria,
|
getDefaultCrossSellingCriteria,
|
||||||
getDefaultProductCriteria,
|
getDefaultProductCriteria,
|
||||||
getDefaultProductsCriteria,
|
getDefaultProductsCriteria,
|
||||||
getDefaultSearchProductsCriteria,
|
getDefaultSearchProductsCriteria,
|
||||||
getDefaultSubCategoriesCriteria,
|
getDefaultSubCategoriesCriteria,
|
||||||
getSortingCriteria
|
getSortingCriteria
|
||||||
} from './criteria';
|
} from './criteria';
|
||||||
import {
|
import {
|
||||||
transformCollection,
|
transformCollection,
|
||||||
transformHandle,
|
transformHandle,
|
||||||
transformMenu,
|
transformMenu,
|
||||||
transformPage,
|
transformPage,
|
||||||
transformProduct,
|
transformProduct,
|
||||||
transformProducts,
|
transformProducts,
|
||||||
transformSubCollection
|
transformSubCollection
|
||||||
} from './transform';
|
} from './transform';
|
||||||
import {
|
import {
|
||||||
ApiSchemas,
|
ApiSchemas,
|
||||||
Cart,
|
Cart,
|
||||||
CategoryListingResultSW,
|
CategoryListingResultSW,
|
||||||
Menu,
|
Menu,
|
||||||
Page,
|
Page,
|
||||||
Product,
|
Product,
|
||||||
ProductListingCriteria,
|
ProductListingCriteria,
|
||||||
StoreNavigationTypeSW
|
StoreNavigationTypeSW
|
||||||
} from './types';
|
} from './types';
|
||||||
|
|
||||||
export async function getMenu(params?: {
|
export async function getMenu(params?: {
|
||||||
@ -282,6 +282,7 @@ export async function getCart(): Promise<Cart> {
|
|||||||
cartData.lineItems?.map((lineItem) => ({
|
cartData.lineItems?.map((lineItem) => ({
|
||||||
id: lineItem.id || '',
|
id: lineItem.id || '',
|
||||||
quantity: lineItem.quantity ?? 0,
|
quantity: lineItem.quantity ?? 0,
|
||||||
|
id: lineItem.referencedId || '',
|
||||||
cost: {
|
cost: {
|
||||||
totalAmount: {
|
totalAmount: {
|
||||||
amount: (lineItem as any)?.price?.totalPrice || '',
|
amount: (lineItem as any)?.price?.totalPrice || '',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user