Skip to content

Commit 43b7260

Browse files
committed
Fix: Product index incorrect when PER_ORDER checkout enabled
1 parent a32263b commit 43b7260

File tree

1 file changed

+5
-2
lines changed
  • frontend/src/components/routes/product-widget/CollectInformation

1 file changed

+5
-2
lines changed

frontend/src/components/routes/product-widget/CollectInformation/index.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -547,11 +547,14 @@ export const CollectInformation = () => {
547547
const productHasQuestions = productQuestions?.some(question => question.product_ids?.includes(orderItem.product_id));
548548

549549
if (!product) {
550-
return;
550+
return null;
551551
}
552552

553553
if (!productRequiresDetails && !productHasQuestions) {
554-
return;
554+
// Still increment productIndex for each item in the quantity
555+
// to maintain correct form field indices
556+
productIndex += orderItem.quantity ?? 0;
557+
return null;
555558
}
556559

557560
return (

0 commit comments

Comments
 (0)