When using parent_id in /cart/add.js to create nested cart lines (e.g., a main product with a free gift nested underneath), the default order confirmation email renders the parent line item twice:
Once as a standalone item in the subtotal_line_items loop (because line.groups.size == 0 and it’s not a nested_line_child?)
Once as a deliverable group in the line_item_groups loop (with its children correctly shown underneath)
The subtotal/total calculations are correct — only the visual display is duplicated.
Steps to reproduce:
Add items to cart via /cart/add.js with a parent_id field on one of the items, creating a parent-child nested line relationship: