Cart: fix extras group

This commit is contained in:
2025-11-11 17:02:19 +03:00
parent 42a70affe2
commit 3d3262e5ad
6 changed files with 166 additions and 130 deletions

View File

@@ -23,7 +23,7 @@ export default function ProductFooter({
isValid?: boolean;
selectedExtras: Extra[];
selectedVariant?: Variant;
selectedGroups: Extra[];
selectedGroups: Record<number, string[]>;
quantity: number;
onClose?: () => void;
}) {
@@ -69,7 +69,11 @@ export default function ProductFooter({
comment: specialRequest,
variant: selectedVariant,
extras: selectedExtras,
extrasgroup: selectedGroups,
extrasgroupnew: Object.keys(selectedGroups).map((key) => ({
groupid: key,
extrasid: selectedGroups[Number(key)],
})),
extrasgroup: [""],
isHasLoyalty: product?.isHasLoyalty,
no_of_stamps_give: product?.no_of_stamps_give,
},