A space to discuss online store customization, theme development, and Liquid templating.
Hi,
I am going from an older to a newer shopify them.
To add my line items to cart I had this block of code from my old theme:
{%- unless line_item.properties == empty -%}
<ul class="cart-item__properties list--unstyled">
{%- for property in line_item.properties -%}
{%- if property.first.first == '_' -%}{%- continue -%}{%- endif -%}
{%-if property.first =="Image"-%}
<img class="cart-item__property" width="100px" height="100px" src="{{property.last|downcase|replace: ' ','' }}">
{%- else -%}
<li class="cart-item__property" data-name="{{property.first | downcase | replace: ' ',''|replace: '(',''|replace: ')',''|replace: ',',''|replace:':',''}}" data-value="{{property.last|downcase|replace: ' ',''}}">{{ property.first }}: {{ property.last }}</li>
{%- endif -%}
{%- endfor -%}
</ul>
{%- endunless -%}
The new theme has this block and I am not sure how to integrate my prior code since I also retained my line-property-items on the snippet files.:
{%- assign property_size = product.properties | size -%}
{% if property_size > 0 %}
{% for p in product.properties %}
{%- assign first_character_in_key = p.first | truncate: 1, '' -%}
{% unless p.last == blank or first_character_in_key == '_' %}
<div>
{{ p.first }}:
{% if p.last contains '/uploads/' %}
<a href="{{ p.last }}">{{ p.last | split: '/' | last }}</a>ffdgfdgfdg
{% else %}
{{ p.last }}
{% endif %}
</div>
{% endunless %}
{% endfor %}
{% endif %}
@Vy25 can you please send me screen shot and site url?