Clearance Skateboard Gear, Decks, Trucks, Wheels, & More – CCS

{% for badge in badges %}
{% if product.tags contains badge.tag and badge.tag != ‘more-colors’ %}

{{ badge.collection_badge }}

{% endif %}
{% endfor %}

{% if product.siblings.size > 0 %}

{% for sib in product.siblings %}
{% if forloop.index < 4 %}
{% unless sib.image_url == blank %}

{% endunless %}

{% elsif forloop.index == 4 %}

+ {{ product.siblings | size | minus: 3 }}

{% break %}
{% endif %}

{% endfor %}
{% endif %}

{% for tag in product.tags %}
{% if tag contains ‘Vendor’ %}
{% assign vendor_tag = tag | remove: ‘Vendor:’ %}
{% assign vendor_collab = vendor_tag | append: ‘ x’ %}
{% break %}
{% endif %}
{% endfor %}

{% if product.siblings.size > 0 %}
{% assign productTitle = product.title | split: ‘ – ‘ | first %}
{% else %}
{% assign productTitle = product.title | remove: product.type | split: ‘-‘ %}
{% endif %}

{% assign productTitle = product.title | split: ‘ – ‘ | first %}
{% unless product.title contains vendor_collab %}
{% assign productTitle = productTitle | remove: vendor_tag %}
{% endunless %}

{% if vendor_tag != blank %}

{{ vendor_tag }}

{% endif %}

{{ productTitle }}

{% for badge in badges %}
{% if product.tags contains badge.tag and badge.tag == ‘more-colors’ %}

{{ badge.collection_badge }}

{% endif %}
{% endfor %}
{% if product.siblings.size > 0 %}

{{ product.siblings.size | plus: 1}} Color{% if product.siblings.size >= 1 %}s{% endif %}

{% endif %}

{% assign discount_amount = product.price | divided_by: product.compare_price | times: -100 | plus: 100 | round %}
{%- assign range = false -%}
{%- assign min = product.price_min -%}
{%- assign compare_min = product.compare_min -%}
{%- assign max = product.price_max -%}
{%- assign compare_max = product.compare_max -%}
{%- assign before_text = ” -%}
{%- assign min_class = ” -%}
{%- assign max_class = ” -%}

{%- if product.siblings.size > 0 -%}
{%- for sibling in product.siblings -%}
{%- assign sibling_price = sibling.price | times: 100 -%}
{%- assign sibling_compare = sibling.compare_at_price | times: 100 | round -%}

{%- if sibling_price < min -%}
{%- assign min = sibling_price -%}
{%- assign compare_min = sibling_compare -%}
{%- endif -%}

{%- if sibling_price > max -%}
{%- assign max = sibling_price -%}
{%- assign compare_max = sibling_compare -%}
{%- endif -%}
{%- endfor -%}
{%- endif -%}

{% assign discount_amount = max | divided_by: compare_max | times: -100 | plus: 100 | round %}
{%- if max < compare_max and discount_amount > 10 -%}
{%- assign max_class = ‘dark-red’ -%}
{%- endif -%}

{% assign discount_amount = min | divided_by: compare_min | times: -100 | plus: 100 | round %}
{%- if min < compare_min and discount_amount > 10 -%}
{%- assign min_class = ‘dark-red’ -%}
{%- endif -%}

{%- if compare_min < compare_max -%}
{%- assign before_text = ‘From ‘ -%}
{%- endif -%}

{% assign min = min | round %}
{% assign max = max | round %}

{%- if min < max -%}
{%- assign range = true -%}
{%- endif -%}

{%- if range == true -%}
{{ before_text }}

{{ min | money }}

{{ max | money }}

{%- else -%}
{% assign discount_amount = product.price | divided_by: product.compare_price | times: -100 | plus: 100 | round %}
{%- if product.compare_price > product.price and discount_amount > 10 -%}
{{ before_text }}

{{ product.price | money }}

{{ product.compare_price | money }}
{%- else -%}
{{ product.price | money }}
{%- endif -%}
{%- endif -%}

{% if product.reviews %}
{% assign to_half = product.reviews.rating | round:1 | divided_by: 0.5 | round | times: 0.50 %}

{% for i in (1..5) %}

{% assign half = i | minus: 0.5 %}
{% if half == to_half %}

{% else %}

{% endif %}

{% endfor %}

({{ product.reviews.count }})

{% endif %}