Shopify Item Details on Cart Page

A quick liquid template snippet for displaying cart item product options in Shopify:

  {% for item in cart.items %}
      {% if forloop.first %}
        {% assign coll_handle = item.product.collections.first.handle %}
        {% if coll_handle == 'frontpage' or coll_handle == '' %}{% assign coll_handle = 'all' %}{% endif %}
      {% endif %}
      <tr class="cart-row">
        <td class="cart-item">
          <a href="{{ item.product.url | within: collections.all }}">  
            {% assign option_index = 0 %}
            {% assign found_option = false %}
            {% assign image_index = 0 %}
            {% assign found_image = false %}
            {% for option in item.product.options %}
              {% unless found_option %}
                {% assign downcased_option = option | downcase %}
                {% if downcased_option contains 'color' or downcased_option contains 'colour' or downcased_option contains 'style' %}
                  {% assign option_index = forloop.index0 %}
                  {% assign found_option = true %}
                {% endif %}
              {% endunless %}
            {% endfor %}
            {% if found_option %}
              {% for image in item.product.images %}
                {% unless found_image %}
                  {% if image.alt == item.variant.options[option_index] %}
                    {% assign image_index = forloop.index0 %}
                    {% assign found_image = true %}
                  {% endif %}
                {% endunless %}
              {% endfor %}
            {% endif %}
            <img src="{{ item.product.images[image_index].src | product_img_url: 'medium' }}" alt="{{ item.title | escape }}" width="69px" />
          </a>
        </td>
        <td class="cart-detail">
          <h2><a href="{{ item.product.url }}">{{ item.product.title }}</a></h2>
          {% if item.product.variants.size == 1 %}{% unless item.variant.title contains 'Default' %}<p>{{ item.variant.title }}</p>{% endunless %}{% endif %}
          {% for o in item.product.options %}
          {{ item.variant.options[forloop.index0] }}{% unless o.last %}, {% endunless %}
          {% endfor %}
          {% for p in item.properties %}
            {% unless p.last == blank %}
              {{ p.first }}:
              {% if p.last contains '/uploads/' %}
              <p><a class="lightbox" href="{{ p.last }}">{{ p.last | split: '/' | last }}</a></p>
              {% else %}
              <p>{{ p.last }}</p>
              {% endif %}
            {% endunless %}
          {% endfor %}
        </td>
        <td class="cart-price">{{ item.price | money }}</td>
        <td class="cart-quantity"><input type="text" class="field styled-input" name="updates[]" id="updates_{{ item.id }}" value="{{ item.quantity }}" /></td>
        <td class="cart-total">{{ item.line_price | money }}</td>
        <td class="cart-remove"><a href="/cart/change?line={{ forloop.index }}&quantity=0" class="remove-glyph" title="remove"></a></td>
      </tr>
      {% endfor %}