{% assign display_wishlist = true %}
{% for tag in Wishlist.data.exclusions %}
{% if product.tags contains tag %}
{% assign display_wishlist = false %}
{% endif %}
{% endfor %}
{% if product == blank %}
{% assign product = Product %}
{% endif %}
{% if display_wishlist %}
{%- if wishlist == blank -%}
{% assign wishlist = Wishlist.data.items | map: 'handle' %}
{% if wishlist[0] == null %}
{% assign wishlist = data.items | map: 'handle' %}
{% endif %}
{%- endif -%}
{%- assign p_title = product.title | replace: '"', '”' -%}
{%- capture wishlist_add -%}
event.preventDefault();
Wishlist.add({
handle: '{{ product.handle }}',
type: '{{ product.type | escpae }}',
image: '{{ product.featured_image }}',
{%- if variant -%}variant: {{ variant.id | json }},{%- endif -%}
title: `{{ p_title }}`
});
[this, _n.sibling(this, '.wishlist__button')].forEach(function(button) { button.classList.toggle('dn')});
{%- endcapture -%}
{% endif %}
{% assign productImage = product.featured_image %}
{% assign hoverImage = product.hover_image %}
{% capture productImageRepsonsive %}
{%- if productImage != blank -%}
{%- if product.featured_image_width > 180 -%}{{ productImage | img_url: '180x' }} 180w {{ 180 | divided_by: product.featured_image_aspect_ratio | round }}h,{%- endif -%}
{%- assign image_size = product.featured_image_width | append: 'x' -%}
{{ productImage | img_url: image_size }} {{ product.featured_image_width }}w {{ product.featured_image_height }}h
{%- endif -%}
{% endcapture %}
{% capture hoverImageRepsonsive %}
{%- if hoverImage != blank -%}
{%- if product.featured_image_width > 180 -%}{{ hoverImage | img_url: '180x' }} 180w {{ 180 | divided_by: product.featured_image_aspect_ratio | round }}h,{%- endif -%}
{%- assign image_size = product.featured_image_width | append: 'x' -%}
{{ hoverImage | img_url: image_size }} {{ product.featured_image_width }}w {{ product.featured_image_height }}h
{%- endif -%}
{% endcapture %}
{% if hoverImage != blank %}{% unless product.tags contains 'Graphic Overlay' or product.hover_image_alt contains 'swatch' %}
{% endunless %}{% endif %}
{%- if product.member_exclusive contains 'coming_soon' or product.member_exclusive contains 'member_active' -%}
{%- assign year = product.member_end | split: '/' | last | prepend: '/' -%}
{%- assign date = product.member_end | remove: year -%}
{%- if product.member_exclusive contains 'coming_soon' -%}
{%- assign year = product.member_start | split: '/' | last | prepend: '/' -%}
{%- assign date = product.member_start | remove: year -%}
{%- endif -%}
{%- capture member_active_text -%}CCS+ Exclusive through {{ date }}{%- endcapture -%}
{%- capture coming_soon_text -%}CCS+ Exclusive starting {{ date }}{%- endcapture -%}
{%- assign member_text = member_active_text -%}
{%- if product.member_exclusive contains 'coming_soon' -%}
{%- assign member_text = coming_soon_text -%}
{%- endif -%}
{{ year }}
{{ date }}
{{ member_text }}
{%- endif -%}