11.20.22
No items found.

How to remove the upsell_id from showing on your store

When you add upsells using the UpsellPlus app, we use an upsell_id to track your upsell results, like revenue, impressions and conversions. 

‍

When an item gets added to cart in the checkout, and the customer returns to cart, it’s possible they might see something like this:

‍

‍

removing upsell_id tracker from the cart attributes
cart with upsell_id

‍

This can be confusing and isn’t preferable for customers and merchants alike. So how do we hide this upsell_id?

‍

Cart page

In your theme, there’s a file called cart__main.liquid. This file can differ in name from theme to theme, so locate the file that controls the main cart page for your store.

‍

Within that theme, the code that controls what attributes or details are shown for each product on the cart page looks like this:

‍

cart.liquid theme file edit

‍

To avoid the upsell_id from showing you’ll have to add in a small piece of code. 

‍

  1. Go to your main cart theme file
  2. Search, using CTRL/Command + F, and type ‘item.properties’ to find this part of the code
  3. Locate this specific line of code: {% unless p.last == blank %} 
  4. Replace it with the following code:

‍

  1. Save your theme

‍

cart__main.liquid theme file

This will remove the upsell_id from your main cart page.

‍

AJAX cart

If you are using an AJAX cart (a cart that can be updated without reloading the page, like a cart side drawer or cart summary), you might need to repeat this in the AJAX file of your theme.

‍

This file could be called cart.ajax.liquid or something similar mentioning ‘cart’ and ‘AJAX’. In this file, repeat steps 1-5 above and replace the line of code.

‍

‍

cart.ajax.liquid theme file

‍

Result: a clean and beautiful cart.

‍

cart without upsell_id!

‍

If you need help with this, let us know.

Jaap Vergote

Jaap Vergote

Need help implementing this?

Book a call

Ready to make every order worth more?

Launch your first offer with a 14-day free trial, or talk with our team about a Shopify Plus strategy.