Prevent the "_esid" hidden line item property from showing in your theme

Emilis Sapronas
21 Jul, 2023

If you’ve noticed an “_esid” property appearing on your cart, checkout, or shipping labels, this guide will explain why it's there, and how to hide it.

Understanding the '_esid' Property

The “_esid” is a hidden attribute used to track whether the recommended size was purchased after using the Fit Quiz. It is used in performance metrics such as Sales conversion, Purchases, Gross Sales, Returns with and without Fit Quiz. Additionally, it helps our Fit Quiz algorithm to understand shopper behavior and improve future recommendations.

Why is '_esid' Visible?

Typically, line item properties beginning with an underscore "_" are classified as hidden and aren't shown on the checkout page or invoices. Shopify allows you to attach information to line items in your cart using line item properties.

However, not all themes follow this rule. If you're seeing the "_esid" property, it might indicate that an app or a theme you’re using isn't following Shopify’s guideline regarding hidden attributes.

Hiding the '_esid' Property

To hide this attribute, you'll need to modify your cart's Liquid template. Here's how:

  1. In your cart.liquid template, locate the line that handles line item properties. It might look something like this: {% for p in item.properties %} or {% for prop in item.properties %} or {%- for property in item.properties -%}
  2. Directly below that line, paste the following: {% if p.first.first == "_" %}{% continue %}{% endif %}

This adjustment makes sure that hidden properties remain invisible to shoppers.

It's important not to remove this attribute, as that would prevent Fit Quiz from accurately tracking shopper engagement.

Can't Do It Yourself? We're Here to Help

If these instructions didn’t work or if you need more technical help, reach out to us. We're here to assist you, free of charge.

💡FAQ

How do I know if a property is considered 'hidden' on Shopify?
Any line item property that begins with an underscore "_" is classified as hidden by Shopify and will not be displayed on the checkout page or invoices.

What should I do if my theme does not automatically hide these properties?
You'll need to manually add a conditional statement in your theme's cart template to ensure these properties are skipped and remain hidden from view.

Where can I find the cart template in my Shopify theme?
Common names for the cart template include cart.liquid, cart-template.liquid, main-cart-items.liquid and several others. If unsure, use your theme's search function and look for 'cart' or 'item' to find the relevant file.

What if the code snippet provided doesn't work with my theme?
Check if your theme uses a different variable name than p for properties within the loop. If so, replace p with the correct variable name (e.g., property or prop) in the provided snippet.

Who can I contact for help if I'm unable to make these changes myself?
If you're having trouble implementing these changes, consider reaching out to a Shopify expert or the support team for your theme for further assistance.