How to Remove the upsell_ID from Showing on your Store

Jaap Vergote

by

Jaap Vergote

|

November 21, 2022

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:

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:

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.

Go to App listing← BACK to Blog