Overview:
This code is typically included in all themes by default, however, some of the more custom themes may not include it. If for some reason your theme doesn't include line item properties in the cart page, here is the code to do so.
Tutorial:
You will need to insert this in cart.liquid where the product / variant title is written. First locate the cart item loop by looking for the liquid "{% for item in cart.items %}", then find where the "item.product.title" and "item.variant.title" is written. It is possible the theme doesn't write the variant title. Paste this code after that.
{% assign property_size = item.properties | size %} {% if property_size > 0 %} <p> {% for p in item.properties %} {% if p.first contains "_options" %} {% continue %} {% endif %} {% unless p.last == blank %} <small>{{ p.first }}:</small> {% if p.last contains '/uploads/' %} <a target="_blank" href="{{ p.last }}"><small>Link</small></a> {% else %} <small>{{ p.last }}</small> {% endif %} <br> {% endunless %} {% endfor %} </p> {% endif %}
For example here is where we inserted it into our theme:
Important parts are highlighted in red, and the new code is highlighted in blue.