Hiding “Title: 162536267323823” from products in cart

All Shopify products have a default variant defined in the product object item.options_with_values. This array of product options is never empty because variants with no options still have a default option.

See Shopify Help docs:
https://shopify.dev/api/liquid/objects#line_item-options_with_values

Because of this, you may see the Shopify Default item.options_with_values appear on your cart or checkout pages. This will usually appear as Title: 162536267323823 or just the item identifier 162536267323823.

The default option name is always “Title“. This method will filter options with the name “Title” and still display others.

Add the code in bold to your cart page, slide drawer etc. You may need to modify these lines slightly but this example should get you going.

{%- for option in item.options_with_values -%}
  {% unless option.name contains 'Title' %}
      <div class="product-option">
         <dt>{{ option.name }}: </dt>
         <dd>{{ option.value }}</dd>
      </div>
  {% endunless %}            
{%- endfor -%}