Display thumbnail image in cart
Automatic
On your upload field, in the Image settings section, select "Thumbnail uploaded image".
Make sure the "Show image preview" checkbox is enabled.
Image styles
To overwrite the image styles you can use the following CSS:
.cl-prop img { max-width:100px !important; max-height:100px !important; }
Manual
to achieve the result shown in the image above you first have to configure the thumbnail feature in the App.
On your upload field, in the Image settings section, select "Thumbnail uploaded image".
Next you have to edit your theme code where the cart items are displayed.
Open the Shopify Admin theme editor, navigate to Online Store > Themes, [More actions] > Edit Code.
Search for "cart" to show your themes cart related code.
Common locations are:
- sections/cart-template.liquid (most themes)
- templates/cart.liquid
{%- for p in item.properties -%}<br>
{%- for p in properties -%} {%- unless p.last == blank -%} {% if p.first contains 'thumbnail' %} <li class="product-details__item product-details__item--property" data-cart-item-property> <span data-cart-item-property-value> <img class="cart__image" style="margin-left: 0;margin-top:1em;" src="{{ p.last }}" /></span> </li> {%- continue -%} {%- endif -%} {% if p.first.first == '_' %}{% continue %}{%- endif -%} <li class="product-details__item product-details__item--property{%if property_size == 0%} hide{% endif %}" data-cart-item-property> <span class="product-details__item-label" data-cart-item-property-name>{{ p.first }}: </span> <span data-cart-item-property-value> {%- if p.last contains 'cloudlift.app' -%} <a href="{{ p.last }}" target="_blank">Link</a> {%- else -%} {{ p.last }} {%- endif -%} </span> </li> {%- endunless -%} {%- endfor -%}
If you need further assistance, please send us a request and we will be happy to help you out.