<div class="collection-list-wrapper isolate section-{{ section.id }}-padding">
<h2 class="wishlist__heading {{ section.settings.heading_size }}">
{{ section.settings.title | escape }}
</h2>
{% if customer %}
{% assign wishlist = customer.metafields.lantern.wishlist.value %}
{% if wishlist and wishlist.size > 0 %}
<ul
class="grid product-grid grid--4-col-desktop grid--2-col-tablet-down"
role="list"
>
{% for variant in wishlist %}
{% assign product = variant.product %}
<li class="grid__item">
{% render 'card-product',
card_product: product,
variant: variant,
media_aspect_ratio: section.settings.image_ratio,
show_secondary_image: section.settings.show_secondary_image,
show_vendor: true
%}
</li>
{% endfor %}
</ul>
{% else %}
<p>Your wishlist is empty.</p>
{% endif %}
{% else %}
<div class="isolate page-width">
<div class="rich-text content-container section-{{ section.id }}-padding">
<div class="rich-text__wrapper rich-text__wrapper--{{ section.settings.desktop_content_position }}{% unless section.settings.full_width %} page-width{% endunless %}">
<p class="wishlist-login"><a href="{{ routes.account_login_url }}">Log in</a> to view your wishlist.</p>
</div>
</div>
</div>
{% endif %}
</div>
{% schema %}
{
"name": "Wishlist",
"tag": "section",
"class": "section",
"disabled_on": {
"groups": ["header", "footer"]
},
"settings": [
{
"type": "text",
"id": "title",
"default": "Wishlist",
"label": "Title"
},
{
"type": "select",
"id": "heading_size",
"options": [
{
"value": "h2",
"label": "t:sections.all.heading_size.options__1.label"
},
{
"value": "h1",
"label": "t:sections.all.heading_size.options__2.label"
},
{
"value": "h0",
"label": "t:sections.all.heading_size.options__3.label"
}
],
"default": "h1",
"label": "t:sections.all.heading_size.label"
},
{
"type": "header",
"content": "t:sections.all.padding.section_padding_heading"
}
]
}
{% endschema %}