I've updated my Shopify cart template on debut theme to group products by vendors when the items are added in the cart by the customers. Everything works correctly for the grouping feature.
But when the customer proceed to checkout even though the items are grouped by vendors, while investigating I've noticed that the line numbers attached to them are not changing. For example the default cart page is:
| Product name | Vendor name | Position of product in order page | Line item number |
|---|---|---|---|
| Product A | Vendor A | 1 | 1 |
| Product B | Vendor X | 2 | 2 |
| Product C | Vendor A | 3 | 3 |
| Product D | Vendor A | 4 | 4 |
With the grouping feature the cart page order becomes :
| Product name | Vendor name | Position of product in order page | Line item number |
|---|---|---|---|
| Product A | Vendor A | 1 | 1 |
| Product D | Vendor A | 2 | 4 |
| Product C | Vendor A | 3 | 3 |
| Product B | Vendor X | 4 | 2 |
But since the line item number is not changing for my example when I proceed to checkout the quantity of product D is assigned to product B.
Do you know a way to change the line item number in Shopify cart template table to prevent this behaviour ? The line item number in the cart page should match the position of product in order page.
Thank you,