Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Shopify Coding Help

Featured Replies

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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.