Problem

Some themes do not handle "line item properties" correctly, which can result in technical line item properties to be visible, when they should be hidden.

Example:

Solution

The solution requires a small modification to your theme.

This modification requires:

  • technical skills

  • a good understanding of the liquid files in your theme

Step 1: find your (drawer) cart liquid file

Locate the liquid file where your cart or drawer cart is implemented.

Step 2: locate the loop where properties are rendered

Look for a for loop similar to this:

{%- for p in item.properties -%}
... code that renders properties...
{%- endfor -%}

Step 3: add code inside the loop

Shopify themes should ignore technical line item properties.

Line item properties have a key and a value.

Technical line item properties have an empty value.

So we need to add an unless/endunless block inside the loop:

{%- for p in item.properties -%}
{%- unless p.last == blank -%}
... code that renders properties...
{%- endunless -%}
{%- endfor -%}
Did this answer your question?