The cart drawer shows the gift or bundle at full price
If your cart drawer shows a gift or a bundled item at full price while the cart total and the checkout are correct, this is almost always a theme display issue, not a discount problem. The drawer is reading old Liquid price fields that ignore automatic discounts. This article explains why it happens and the one theme change that fixes it.
Quick check: is the total correct?
Before changing anything, confirm where the wrong price actually appears:
- If the per-line price in the drawer looks wrong (full price on a gift or a discounted item) but the cart subtotal at the bottom of the drawer and the checkout total are correct, this is a display-only issue. Keep reading.
- If the checkout total itself is wrong, that is a different problem (for example, another discount app stacking, or the discount not matching). This article does not cover that case.
Bundlex does not render your cart drawer. The discount is applied by a Shopify cart discount function that runs at checkout, and Bundlex cannot rewrite a theme's per-line price display.
Why the drawer shows full price
Bundlex applies its discount through a Shopify cart discount function. That function allocates the discount onto the cart lines, which Shopify treats as a form of automatic discount.
The catch is in how some themes render each cart line. Older or custom cart drawers display the line price using the Liquid fields line_item.price and line_item.line_price. Shopify's own documentation flags these fields as deprecated because they do not reflect automatic discounts. So the drawer prints the original, undiscounted price even though Shopify has correctly recorded the discount on that line.
The result customers see: every line in the bundle shows the same full unit price, and a free (gift) line can look like it is being charged. Meanwhile the subtotal and checkout are right, because those are computed from the discounted values.
Confirm it with /cart.js
You can prove the discount is being applied correctly, independent of what the drawer shows:
- On the storefront, add the bundle (or the offer with the free gift) to the cart.
- In the browser, open
/cart.json that same store (for example, visithttps://yourstore.com/cart.js). - Find the affected line and look at
final_priceandfinal_line_price.
For a working free-gift line you will see something like final_price: 0 and final_line_price: 0, with the discount listed under that line's discounts (the offer title and the discounted amount). The deprecated price / line_price fields, by contrast, still show the full amount, which is exactly what the drawer is rendering.
Interpreting the result:
final_price/final_line_pricereflect the discount, but the drawer shows full price. The theme is reading the deprecated fields. This is a theme fix, described below.final_pricedoes not reflect the discount. Then the issue is not the drawer display. Look into the cart function side instead (for example, whether the bundle was tagged correctly, whether the discount metafield is current, or whether customer eligibility rules such as B2B or customer tags apply).
The fix: use final_price and final_line_price
This is a one-line-per-field change in your theme. In the cart-drawer snippet (and in any AJAX-cart JavaScript that mirrors these values from the /cart/add.js response), replace the deprecated fields with their final_ equivalents:
line_item.pricebecomesline_item.final_priceline_item.line_pricebecomesline_item.final_line_price
That is the whole change. The final_ fields contain the price after automatic discounts, so the drawer will then match the subtotal and checkout. Nothing else in the theme, the widget, or the Bundlex discount needs to change.
Because the per-line
pricevalue is a static Liquid attribute, Bundlex cannot rewrite it for you. The discount data is already present infinal_price; the theme just has to read it.
If you use a native compare-at price
If your variants also carry a Shopify compare_at_price (a strikethrough such as "50% Off"), that badge is rendered by the theme from the variant data and is unrelated to the Bundlex discount. After switching to the final_ fields, the line price will reflect the Bundlex discount while any compare-at strikethrough continues to display as your theme configures it.
The other case: a leftover gift line at $0
A related but separate symptom: a customer picks an offer that includes a free gift, then reduces the main item's quantity below the offer's threshold. The main line correctly drops to a lower tier, but a free-gift line stays in the cart showing $0.
Here is why. When the quantity falls below the threshold, the cart function correctly stops discounting and drops the allocation. But a Shopify cart function cannot remove a cart line (there is no remove operation available to it). For a free gift configured as a $0 catalog variant, there is no price to "return to", so the now-unqualified gift line simply lingers at $0.
To handle this, Bundlex includes a widget-side cleanup that runs after a cart change and removes the orphaned gift line. There are conditions on when it can run:
- Free gifts only. Paid extras are handled by bundle integrity, not by this cleanup.
- Supported themes only. Cleanup runs on themes that submit cart changes through the
fetchpath. Themes that use XHR for cart changes get the legacy behavior, where the gift line stays. - Cleanup is best-effort. If a step fails, the gift line may remain visually until the next cart interaction.
After it removes a line, Bundlex dispatches cart-refresh events to prompt the theme to re-render. There is no single cart-updated event that every Shopify theme implements, so on themes that do not listen for these the drawer can stay stale until the next interaction. The most important point: the cart math is always correct. The customer is not charged for the lingering $0 line, and the checkout total is accurate regardless of what the drawer momentarily shows.
Summary
- Drawer shows full price, but total and checkout are right: the theme is reading deprecated
line_item.price/line_item.line_price. - Verify with
/cart.js:final_price/final_line_pricereflect the discount. - Fix in the theme: switch those fields to
final_priceandfinal_line_price. - A leftover $0 gift line after reducing quantity is expected (Shopify cannot remove lines); Bundlex cleans it up on supported themes, and the price is always correct at checkout.
Was this article helpful?
Your feedback helps us improve our docs.