March 21, 20179 yr Hi all,I've been working on adding custom fields to a product to allow a customer to added text etc. I came across an issue this morning which is, when a customer is on the cart page they see the product and the custom field data they have added, text image etc - I have a bit of CSS styling added to this page, basically something like:Text on Front: Hello World (text before : in bold)When the quantity is changed, lets say from 1 to 2 the styling is removed. Anyone know why this would be? Ok, looks like the code I need to edit is contained within {% raw %}, here is what I'm looking at: {{#properties}} {{#each this}} {{#if this}} <p>{{@key}}: {{this}}</p> {{/if}} {{/each}} {{/properties}} I have 2 custom text fields and 1 file upload field. The file upload field needs to display an image. Here is what the code looks like further up in the cart-template.liquid file. {% assign property_size = item.properties | size %} {% if property_size > 0 %} {% for p in item.properties %} {% assign first_character_in_key = p.first | truncate: 1, '' %} {% unless p.last == blank or first_character_in_key == '_' %} <p class="custom-section"><span class="order-variant">{{ p.first }}: </span> {% if p.last contains '/uploads/' %} <a class="order-custom-image" href="{{ p.last }}"><img src="{{ p.last }}"></a> {% else %} {{ p.last }} {% endif %} </p> {% endunless %} {% endfor %} {% endif %} Any ideas on how to add that in the {% raw %} section?Thanks,Al.
Create an account or sign in to comment