Understanding Line Item Splits in Bundled Products: Handling the "Penny Problem"
Introduction
If you are a merchant using the Simple Bundles app on Shopify and have noticed that the line items in your bundle are sometimes split into multiple line items in the order admin, this guide is for you. You might find that although your bundle seems to break down correctly during checkout, it appears divided in the Order page. Rest assured, this is an intentional design feature to tackle what we refer to as the "Penny Problem," which arises due to the mathematical limitations of decimal division.
Why Does This Happen?
The Issue: "Penny Problem"
When a bundle product is created, the price you set for the bundle is distributed among its component items. Often, the price of the bundle is not evenly divisible by the number of items within it, resulting in fractions of pennies that need to be accounted for.
For example, consider a bundle named "T-Shirt Pack," priced at $10, which contains 3 T-Shirts. The individual unit price for each T-Shirt would be $10 / 3 = $3.333... When you divide 10 by 3, you get a repeating decimal.
Two Scenarios: Checkout vs. Order Page
During Checkout
During the checkout process, the fractional pricing is not a problem. The checkout page shows the bundled products as grouped, as there is no requirement that the line amount must be divisible by the line quantity.
Checkout View:
1x T-Shirt Pack $10
3x T-Shirts
On the Order Page
However, the Order page operates exclusively at the component level. It has a requirement that each line must have a unit price that, when multiplied by the line quantity, results in the line amount. To resolve the "penny problem," the system automatically divides and rounds the price among the bundled items.
Order Page View:
2x T-Shirt $6.66
1x T-Shirt $3.37
To ensure every cent is accounted for, Shopify splits the line items to accommodate the missing pennies. The sum of these split line items will still equal the total bundle price.
Solution: Adjusting Bundle Pricing in Cents
If you wish to make the least impactful change to your bundle pricing while avoiding the "Penny Problem," you can adjust the price of your parent bundle by just a few cents. The goal is to find a price that, when divided by the number of items in the bundle, results in a repeating decimal with fewer digits, thereby making it easier to evenly divide.
Note: this solution will not work for multi-currency orders are the price conversions cannot be guaranteed to be divisible the count of the bundle contents.
How to Do It
- Identify the Bundle: Pinpoint which bundle is causing the line item splits.
- Count the Items: Tally the number of items within the bundle.
- Fine-Tune the Price: Increment or decrement the bundle price by a few cents until you find a price that divides evenly.
Example
Let's revisit our original example where a "T-Shirt Pack" priced at $10 contains 3 T-Shirts.
- Initial Scenario
- Bundle Price: $10.00
- Number of Items: 3
- Individual Price: $10.00 / 3 = $3.333... (resulting in the "Penny Problem")
To minimize the impact on pricing, we can adjust the bundle price by just a few cents. For example, we could change it to $9.99.
- Adjusted Scenario 1
- New Bundle Price: $9.99
- Number of Items: 3
- New Individual Price: $9.99 / 3 = $3.33 (rounded off, less problematic)
While these adjustments won't completely eliminate the possibility of having fractional cents, they will make it easier to manage the prices. With the new individual prices of $3.33, the system will find it easier to distribute the remaining cents, reducing the necessity for splitting line items in most cases.
Conclusion: item splitting is expected behavior
The splitting of line items in bundled products on the Order page is not a bug; it's a feature designed to handle the limitations of fractional pricing. While the design choice allows for a more straightforward API during checkout, the Order page adopts a more meticulous approach to ensure that the accounting is accurate down to the last penny.
We hope this guide clarifies why line items in your bundled products may appear as multiple line items in the Order page. If you have any further questions, feel free to contact our support team.