All Collections
Setting up Dynamic Pricing
Technical line item property in the cart
Technical line item property in the cart

Learn how to remove the DiscountNinja.FreeGift.XXXX line from your (drawer) cart

Bart Coppens avatar
Written by Bart Coppens
Updated over a week ago


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.



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 -%}
... 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 -%}
{%- unless p.last == blank -%}
... code that renders properties...
{%- endunless -%}
{%- endfor -%}
Did this answer your question?