Hide line items in checkout only, not in cart

Hide line items in checkout only, not in cart

hazzardt
Tourist
22 0 3

Hello,

 

was trying to find a solution to this but no luck. Basically I know line item properties which begin with an underscore "_" are hidden from checkout/cart. But I want to hide it only on checkout, yet still display it in my cart. IS there any option to do so? My cart code is pretty basic, showing like items besides products like this: 

<span>{{ property.first }}: </span>

But obviously if I add "_", it hides it.

Replies 2 (2)

maxdanko
Shopify Partner
29 3 7

you can access properties using

{% for property in cart_item.properties %}
{{ property }}
{% endfor %}
hazzardt
Tourist
22 0 3

I know. This however doesn't show line item if property includes "_" when adding to cart. I already have this code for basic use. I want to show line item even if property includes "_", so e.g.

name="_properties[Poppins]"