Skip to main content
Troubleshooting

The cart drawer shows the gift or bundle at full price

If your cart drawer shows a Bundlex Bundles gift or bundled item at full price while the cart total and the checkout are correct, check how the drawer reads and refreshes its prices. Older Liquid price fields can omit automatic discounts, and a drawer can also keep a stale cart snapshot. This article explains how to distinguish those cases.

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 Bundles does not render your cart drawer. The discount is applied by a Shopify cart discount function that runs at checkout, and the app cannot rewrite a theme's per-line price display.

Why the drawer shows full price

Bundlex Bundles 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:

  1. On the storefront, add the bundle (or the offer with the free gift) to the cart.
  2. In the browser, open /cart.js on that same store (for example, visit https://yourstore.com/cart.js).
  3. Find the affected line and look at final_price and final_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). Check which fields your drawer actually renders. The deprecation described above applies to Liquid's line_item.price and line_item.line_price; a /cart.js response alone does not identify the drawer's data source.

Interpreting the result:

  • final_price / final_line_price reflect the discount, but the drawer shows full price. Check both the fields the drawer renders and whether it refreshes after the cart changes.
  • final_price does 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

If the cart-drawer Liquid snippet uses these deprecated fields for the current price, replace them with their final_ equivalents:

  • line_item.price becomes line_item.final_price
  • line_item.line_price becomes line_item.final_line_price

The final_ fields include line-level discounts. If your drawer uses JavaScript, also check that it renders a fresh cart response or updated theme sections after changes. Replacing a price field does not repair a stale snapshot.

Because the per-line price value is a static Liquid attribute, Bundlex Bundles cannot rewrite it for you. The discount data is already present in final_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 Bundles discount. After switching to the final_ fields, the line price will reflect the app's 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 Bundles 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 cart-change paths. While a full Bundlex Bundles widget is active, cleanup handles both fetch and XHR cart changes. On pages running only the gift-cleanup script without a widget, interception covers fetch changes only. Theme refresh behavior can still affect what the drawer displays.
  • 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 Bundles dispatches cart-refresh events to prompt the theme to re-render. On Dawn and the free Shopify themes built on it, the app also redraws the cart drawer, the cart page and the cart icon count itself. There is no single cart-updated event that every Shopify theme implements, so on other 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: check for deprecated Liquid price fields or stale cart data.
  • Verify with /cart.js: final_price / final_line_price reflect the discount.
  • Fix in the theme: switch those fields to final_price and final_line_price.
  • A leftover $0 gift line after reducing quantity is expected (Shopify cannot remove lines); Bundlex Bundles 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.

Thanks - we'll keep improving this article.

Want to chat with our team? Still have a question?

Still need help?

Our team is one click away. Send us a message and we'll get back to you.

We use a few cookies to keep this site working, measure how it is used, and power our chat widget when you open it. See our cookie policy.