I added a customization box to some products but can not display customizations in cart

Topic summary

A user successfully added a customization input box to product pages using Liquid code in product-variant-options.liquid. The code allows customers to enter custom text (dates for a specific necklace, ring sizes for rings) via properties[Custom Text].

The Problem:
Customization data isn’t displaying in the shopping cart after products are added.

Proposed Solution:
Another user suggested adding code to cart.liquid or cart-items.liquid that loops through item.properties to display custom field values alongside each cart item.

Current Status:
The original poster is struggling to locate the correct section within their theme’s cart template to insert the suggested code. They shared their existing cart items code but haven’t identified where to integrate the properties loop. The issue remains unresolved and requires further guidance on theme-specific implementation.

Summarized with AI on October 31. AI used: claude-sonnet-4-5-20250929.

I added a customization box to some products but when added to cart I can not display customizations.

The added code in product-variant-options.liquid is below. Can anyone please help where and which code should I add to my theme to see the customizations in the cart.

{%- endif -%}
{% if product.handle == ‘put-a-date-on-it-necklace’ %}

Add the Day:
{% endif %} {% if product.type == 'Rings' %}
Pre-Order A New Size:
{% endif %}

Hi @DeryaMutlu ,

Go to Shopify Admin > Online Store > Themes > Edit Code.
Find cart.liquid or cart-items.liquid (depending on your theme).
Locate the section where product names and variants are displayed.
Add this code inside the loop that renders cart items:

{% for item in cart.items %}
  
    

**{{ item.product.title }}**

    
    {%- for p in item.properties -%}
      {% if p.last != blank %}
        

**{{ p.first }}:** {{ p.last }}

      {% endif %}
    {%- endfor -%}
  

{% endfor %}

Hello, thank you.

But I can’t seem to locate the correct section to add the code.

{%- liquid
assign cart_products = ‘’
assign upsell_products = ‘’
assign line_items_html = ‘’
assign upsell_items_html = ‘’
assign animation_name = animation_name | default: ‘cart-items-fade’
assign animation_delay_increment = 50
assign animation_delay = animation_delay | default: 0
-%}

{%- comment -%}
Capture line items
{%- endcomment -%}

{%- for line_item in cart.items -%}
{%- liquid
assign line_item_final_price = line_item.final_price | money
assign line_item_variant_compare_at_price = line_item.variant.compare_at_price | money
assign line_item_original_price = line_item.original_price | money
assign line_item_unit_price = line_item.unit_price | money
assign cart_products = cart_products | append: line_item.product.id | append: ‘,’
-%}

{%- capture cart_line_item -%}

{{- line_item.product.title | strip_html -}}

{%- assign properties_html = '' -%} {%- assign property_size = line_item.properties | size -%}

{%- if property_size > 0 -%}
{%- assign sale_type = ‘products.product.sale_type’ | t -%}

{%- for p in line_item.properties -%}
{%- assign property_first_char = p.first | slice: 0 -%}

{%- if p.last != blank and property_first_char != ‘_’ -%}
{%- if p.first == sale_type -%}

{%- if p.last contains '/uploads/' -%} {{ p.last | split: '/' | last }} {%- else -%} {{ p.last }} {%- endif -%}

{%- else -%} {%- capture properties_html -%} {{ properties_html }}

{{ p.first }}: {%- if p.last contains '/uploads/' -%} {{ p.last | split: '/' | last }} {%- else -%} {{ p.last }} {%- endif -%}

{%- endcapture -%} {%- endif -%} {%- endif -%} {%- endfor -%} {%- endif -%}

{%- unless line_item.product.has_only_default_variant -%}
{%- for option in line_item.options_with_values -%}

{{ option.name }}:

{{ option.value }}

{%- endfor -%} {%- endunless -%}

{%- if line_item.selling_plan_allocation -%}

{{ line_item.selling_plan_allocation.selling_plan.name }}

{%- endif -%}

{%- if properties_html != ‘’ -%}
{{ properties_html }}
{%- endif -%}

{%- liquid assign discounted = false assign sale = false

if line_item.original_price > line_item.final_price
assign discounted = true
endif

if line_item.variant.compare_at_price > line_item.final_price
assign sale = true
endif
-%}

{%- if sale or discounted -%}

{%- if line_item.final_price == 0 -%}
{{ ‘general.money.free’ | t }}
{%- else -%}
{{- line_item_final_price -}}
{%- endif -%}

{%- else -%}
{%- if line_item.final_price == 0 -%}
{{ ‘general.money.free’ | t }}
{%- else -%}
{{- line_item_final_price -}}
{%- endif -%}
{%- endif -%}

{%- if sale and discounted == false -%}
{{- line_item_variant_compare_at_price -}}
{%- endif -%}

{%- if discounted -%}
{{- line_item_original_price -}}
{%- endif -%}

{%- if line_item.unit_price -%}
{%- capture unit_price_separator -%}
/{{ ‘general.accessibility.unit_price_separator’ | t }} 
{%- endcapture -%}

{%- capture unit_price_base_unit -%}
{%- if line_item.unit_price_measurement.reference_value != 1 -%}
{{- line_item.unit_price_measurement.reference_value -}}
{%- endif -%}

{{- line_item.unit_price_measurement.reference_unit -}}
{%- endcapture -%}

{{ 'products.product.unit_price_label' | t }}

{{ line_item_unit_price }}{{ unit_price_separator }}{{ unit_price_base_unit }}

{%- endif -%}

{%- render 'icon-minus' -%}

{%- assign quantity = line_item.quantity -%}

{%- if line_item.variant.inventory_policy == ‘deny’ and line_item.variant.inventory_management != nil and line_item.variant.inventory_quantity < quantity -%}
{%- assign quantity = line_item.variant.inventory_quantity -%}
{%- endif -%}


{%- render ‘icon-plus’ -%}


{{- ‘cart.general.remove’ | t -}}

{%- if line_item.original_price > line_item.final_price -%}
{%- for discount in line_item.line_level_discount_allocations -%}

{%- render 'icon-tags' -%}

{%- assign discount_price = discount.amount | money -%}

{{ ‘cart.general.discount_label’ | t: amount: discount_price, title: discount.discount_application.title }}

{%- endfor -%} {%- endif -%}
{%- endcapture -%}

{%- assign line_items_html = line_items_html | append: cart_line_item -%}
{%- endfor -%}

{%- comment -%}
Capture upsell items based on products added to Cart
{%- endcomment -%}
{%- for line_item in cart.items -%}
{%- capture upsell_line_item -%}
{%- liquid
comment
Upsell items
endcomment
assign upsell_product_single = line_item.product.metafields.theme.upsell
assign upsell_product_list = line_item.product.metafields.theme.upsell_list

comment
Product meta field type “One product”
endcomment
if upsell_product_single.value != nil and upsell_product_single.type == ‘product_reference’
assign upsell_product = upsell_product_single.value

unless upsell_products contains upsell_product.handle or cart_products contains upsell_product.id
render ‘upsell-product’ upsell_product: upsell_product, is_cart: true
assign upsell_products = upsell_products | append: upsell_product.handle | append: ‘,’
endunless
endif

comment
Product meta field type “List of products”
endcomment
if upsell_product_list.value != nil and upsell_product_list.type == ‘list.product_reference’
for upsell_product in upsell_product_list.value
unless upsell_products contains upsell_product.handle or cart_products contains upsell_product.id
render ‘upsell-product’ upsell_product: upsell_product, is_cart: true
assign upsell_products = upsell_products | append: upsell_product.handle | append: ‘,’
endunless
endfor
endif
-%}
{%- endcapture -%}

{%- assign upsell_items_html = upsell_items_html | append: upsell_line_item -%}
{%- endfor -%}

{%- case part -%}
{%- when ‘line-items’ -%}
{{- line_items_html -}}

{%- when ‘upsell-items’ -%}
{{- upsell_items_html -}}

{%- endcase -%}