capture display_labels
if show_sale_label and compare_price and onboarding == false
if show_sale_label == 'show-text'
assign sale_text = sale_t
elsif show_sale_label == 'show-percent'
assign price_diff = product_item.compare_at_price | minus: product_item.price
assign percent_diff = price_diff | times: 100 | divided_by: product_item.compare_at_price
assign sale_text = percent_diff | append: '% ' | append: off_t
endif
echo sale_text
assign label_type = 'sale'
elsif show_new_label and is_new_product and onboarding == false
echo new_t
assign label_type = 'new'
endif
endcapture
capture featured_label
if featured_tags.size > 0 and product_item.available and onboarding == false
assign break_loop = false
for featured_tag in featured_tags
assign formatted_featured_tag = featured_tag | downcase
for product_tag in product_item.tags
assign formatted_product_tag = product_tag | remove: ' ' | downcase
if formatted_product_tag == formatted_featured_tag
echo product_tag | escape
assign label_type = product_tag | handleize
assign break_loop = true
break
endif
endfor
if break_loop
break
endif
endfor
endif
endcapture
capture swatch_list
unless swatches == 'none'
for option in product_item.options_with_values
assign swatch_count = option.values | map: 'swatch' | compact | size
if swatch_count > 0
unless hide_single_swatch and option.values.size == 1
assign swatch_id = section_id | append: '-' | append: product_item.id
render 'swatches', id: swatch_id, option: option, static: true, shape: swatches
endunless
break
endif
endfor
endunless
endcapture
-%}
capture display_labels
if show_sale_label and compare_price and onboarding == false
if show_sale_label == 'show-text'
assign sale_text = sale_t
elsif show_sale_label == 'show-percent'
assign price_diff = product_item.compare_at_price | minus: product_item.price
assign percent_diff = price_diff | times: 100 | divided_by: product_item.compare_at_price
assign sale_text = percent_diff | append: '% ' | append: off_t
endif
echo sale_text
assign label_type = 'sale'
elsif show_new_label and is_new_product and onboarding == false
echo new_t
assign label_type = 'new'
endif
endcapture
capture featured_label
if featured_tags.size > 0 and product_item.available and onboarding == false
assign break_loop = false
for featured_tag in featured_tags
assign formatted_featured_tag = featured_tag | downcase
for product_tag in product_item.tags
assign formatted_product_tag = product_tag | remove: ' ' | downcase
if formatted_product_tag == formatted_featured_tag
echo product_tag | escape
assign label_type = product_tag | handleize
assign break_loop = true
break
endif
endfor
if break_loop
break
endif
endfor
endif
endcapture
capture swatch_list
unless swatches == 'none'
for option in product_item.options_with_values
assign swatch_count = option.values | map: 'swatch' | compact | size
if swatch_count > 0
unless hide_single_swatch and option.values.size == 1
assign swatch_id = section_id | append: '-' | append: product_item.id
render 'swatches', id: swatch_id, option: option, static: true, shape: swatches
endunless
break
endif
endfor
endunless
endcapture
-%}
capture display_labels
if show_sale_label and compare_price and onboarding == false
if show_sale_label == 'show-text'
assign sale_text = sale_t
elsif show_sale_label == 'show-percent'
assign price_diff = product_item.compare_at_price | minus: product_item.price
assign percent_diff = price_diff | times: 100 | divided_by: product_item.compare_at_price
assign sale_text = percent_diff | append: '% ' | append: off_t
endif
echo sale_text
assign label_type = 'sale'
elsif show_new_label and is_new_product and onboarding == false
echo new_t
assign label_type = 'new'
endif
endcapture
capture featured_label
if featured_tags.size > 0 and product_item.available and onboarding == false
assign break_loop = false
for featured_tag in featured_tags
assign formatted_featured_tag = featured_tag | downcase
for product_tag in product_item.tags
assign formatted_product_tag = product_tag | remove: ' ' | downcase
if formatted_product_tag == formatted_featured_tag
echo product_tag | escape
assign label_type = product_tag | handleize
assign break_loop = true
break
endif
endfor
if break_loop
break
endif
endfor
endif
endcapture
capture swatch_list
unless swatches == 'none'
for option in product_item.options_with_values
assign swatch_count = option.values | map: 'swatch' | compact | size
if swatch_count > 0
unless hide_single_swatch and option.values.size == 1
assign swatch_id = section_id | append: '-' | append: product_item.id
render 'swatches', id: swatch_id, option: option, static: true, shape: swatches
endunless
break
endif
endfor
endunless
endcapture
-%}
capture display_labels
if show_sale_label and compare_price and onboarding == false
if show_sale_label == 'show-text'
assign sale_text = sale_t
elsif show_sale_label == 'show-percent'
assign price_diff = product_item.compare_at_price | minus: product_item.price
assign percent_diff = price_diff | times: 100 | divided_by: product_item.compare_at_price
assign sale_text = percent_diff | append: '% ' | append: off_t
endif
echo sale_text
assign label_type = 'sale'
elsif show_new_label and is_new_product and onboarding == false
echo new_t
assign label_type = 'new'
endif
endcapture
capture featured_label
if featured_tags.size > 0 and product_item.available and onboarding == false
assign break_loop = false
for featured_tag in featured_tags
assign formatted_featured_tag = featured_tag | downcase
for product_tag in product_item.tags
assign formatted_product_tag = product_tag | remove: ' ' | downcase
if formatted_product_tag == formatted_featured_tag
echo product_tag | escape
assign label_type = product_tag | handleize
assign break_loop = true
break
endif
endfor
if break_loop
break
endif
endfor
endif
endcapture
capture swatch_list
unless swatches == 'none'
for option in product_item.options_with_values
assign swatch_count = option.values | map: 'swatch' | compact | size
if swatch_count > 0
unless hide_single_swatch and option.values.size == 1
assign swatch_id = section_id | append: '-' | append: product_item.id
render 'swatches', id: swatch_id, option: option, static: true, shape: swatches
endunless
break
endif
endfor
endunless
endcapture
-%}
capture display_labels
if show_sale_label and compare_price and onboarding == false
if show_sale_label == 'show-text'
assign sale_text = sale_t
elsif show_sale_label == 'show-percent'
assign price_diff = product_item.compare_at_price | minus: product_item.price
assign percent_diff = price_diff | times: 100 | divided_by: product_item.compare_at_price
assign sale_text = percent_diff | append: '% ' | append: off_t
endif
echo sale_text
assign label_type = 'sale'
elsif show_new_label and is_new_product and onboarding == false
echo new_t
assign label_type = 'new'
endif
endcapture
capture featured_label
if featured_tags.size > 0 and product_item.available and onboarding == false
assign break_loop = false
for featured_tag in featured_tags
assign formatted_featured_tag = featured_tag | downcase
for product_tag in product_item.tags
assign formatted_product_tag = product_tag | remove: ' ' | downcase
if formatted_product_tag == formatted_featured_tag
echo product_tag | escape
assign label_type = product_tag | handleize
assign break_loop = true
break
endif
endfor
if break_loop
break
endif
endfor
endif
endcapture
capture swatch_list
unless swatches == 'none'
for option in product_item.options_with_values
assign swatch_count = option.values | map: 'swatch' | compact | size
if swatch_count > 0
unless hide_single_swatch and option.values.size == 1
assign swatch_id = section_id | append: '-' | append: product_item.id
render 'swatches', id: swatch_id, option: option, static: true, shape: swatches
endunless
break
endif
endfor
endunless
endcapture
-%}
capture display_labels
if show_sale_label and compare_price and onboarding == false
if show_sale_label == 'show-text'
assign sale_text = sale_t
elsif show_sale_label == 'show-percent'
assign price_diff = product_item.compare_at_price | minus: product_item.price
assign percent_diff = price_diff | times: 100 | divided_by: product_item.compare_at_price
assign sale_text = percent_diff | append: '% ' | append: off_t
endif
echo sale_text
assign label_type = 'sale'
elsif show_new_label and is_new_product and onboarding == false
echo new_t
assign label_type = 'new'
endif
endcapture
capture featured_label
if featured_tags.size > 0 and product_item.available and onboarding == false
assign break_loop = false
for featured_tag in featured_tags
assign formatted_featured_tag = featured_tag | downcase
for product_tag in product_item.tags
assign formatted_product_tag = product_tag | remove: ' ' | downcase
if formatted_product_tag == formatted_featured_tag
echo product_tag | escape
assign label_type = product_tag | handleize
assign break_loop = true
break
endif
endfor
if break_loop
break
endif
endfor
endif
endcapture
capture swatch_list
unless swatches == 'none'
for option in product_item.options_with_values
assign swatch_count = option.values | map: 'swatch' | compact | size
if swatch_count > 0
unless hide_single_swatch and option.values.size == 1
assign swatch_id = section_id | append: '-' | append: product_item.id
render 'swatches', id: swatch_id, option: option, static: true, shape: swatches
endunless
break
endif
endfor
endunless
endcapture
-%}
capture display_labels
if show_sale_label and compare_price and onboarding == false
if show_sale_label == 'show-text'
assign sale_text = sale_t
elsif show_sale_label == 'show-percent'
assign price_diff = product_item.compare_at_price | minus: product_item.price
assign percent_diff = price_diff | times: 100 | divided_by: product_item.compare_at_price
assign sale_text = percent_diff | append: '% ' | append: off_t
endif
echo sale_text
assign label_type = 'sale'
elsif show_new_label and is_new_product and onboarding == false
echo new_t
assign label_type = 'new'
endif
endcapture
capture featured_label
if featured_tags.size > 0 and product_item.available and onboarding == false
assign break_loop = false
for featured_tag in featured_tags
assign formatted_featured_tag = featured_tag | downcase
for product_tag in product_item.tags
assign formatted_product_tag = product_tag | remove: ' ' | downcase
if formatted_product_tag == formatted_featured_tag
echo product_tag | escape
assign label_type = product_tag | handleize
assign break_loop = true
break
endif
endfor
if break_loop
break
endif
endfor
endif
endcapture
capture swatch_list
unless swatches == 'none'
for option in product_item.options_with_values
assign swatch_count = option.values | map: 'swatch' | compact | size
if swatch_count > 0
unless hide_single_swatch and option.values.size == 1
assign swatch_id = section_id | append: '-' | append: product_item.id
render 'swatches', id: swatch_id, option: option, static: true, shape: swatches
endunless
break
endif
endfor
endunless
endcapture
-%}
capture display_labels
if show_sale_label and compare_price and onboarding == false
if show_sale_label == 'show-text'
assign sale_text = sale_t
elsif show_sale_label == 'show-percent'
assign price_diff = product_item.compare_at_price | minus: product_item.price
assign percent_diff = price_diff | times: 100 | divided_by: product_item.compare_at_price
assign sale_text = percent_diff | append: '% ' | append: off_t
endif
echo sale_text
assign label_type = 'sale'
elsif show_new_label and is_new_product and onboarding == false
echo new_t
assign label_type = 'new'
endif
endcapture
capture featured_label
if featured_tags.size > 0 and product_item.available and onboarding == false
assign break_loop = false
for featured_tag in featured_tags
assign formatted_featured_tag = featured_tag | downcase
for product_tag in product_item.tags
assign formatted_product_tag = product_tag | remove: ' ' | downcase
if formatted_product_tag == formatted_featured_tag
echo product_tag | escape
assign label_type = product_tag | handleize
assign break_loop = true
break
endif
endfor
if break_loop
break
endif
endfor
endif
endcapture
capture swatch_list
unless swatches == 'none'
for option in product_item.options_with_values
assign swatch_count = option.values | map: 'swatch' | compact | size
if swatch_count > 0
unless hide_single_swatch and option.values.size == 1
assign swatch_id = section_id | append: '-' | append: product_item.id
render 'swatches', id: swatch_id, option: option, static: true, shape: swatches
endunless
break
endif
endfor
endunless
endcapture
-%}
capture display_labels
if show_sale_label and compare_price and onboarding == false
if show_sale_label == 'show-text'
assign sale_text = sale_t
elsif show_sale_label == 'show-percent'
assign price_diff = product_item.compare_at_price | minus: product_item.price
assign percent_diff = price_diff | times: 100 | divided_by: product_item.compare_at_price
assign sale_text = percent_diff | append: '% ' | append: off_t
endif
echo sale_text
assign label_type = 'sale'
elsif show_new_label and is_new_product and onboarding == false
echo new_t
assign label_type = 'new'
endif
endcapture
capture featured_label
if featured_tags.size > 0 and product_item.available and onboarding == false
assign break_loop = false
for featured_tag in featured_tags
assign formatted_featured_tag = featured_tag | downcase
for product_tag in product_item.tags
assign formatted_product_tag = product_tag | remove: ' ' | downcase
if formatted_product_tag == formatted_featured_tag
echo product_tag | escape
assign label_type = product_tag | handleize
assign break_loop = true
break
endif
endfor
if break_loop
break
endif
endfor
endif
endcapture
capture swatch_list
unless swatches == 'none'
for option in product_item.options_with_values
assign swatch_count = option.values | map: 'swatch' | compact | size
if swatch_count > 0
unless hide_single_swatch and option.values.size == 1
assign swatch_id = section_id | append: '-' | append: product_item.id
render 'swatches', id: swatch_id, option: option, static: true, shape: swatches
endunless
break
endif
endfor
endunless
endcapture
-%}
capture display_labels
if show_sale_label and compare_price and onboarding == false
if show_sale_label == 'show-text'
assign sale_text = sale_t
elsif show_sale_label == 'show-percent'
assign price_diff = product_item.compare_at_price | minus: product_item.price
assign percent_diff = price_diff | times: 100 | divided_by: product_item.compare_at_price
assign sale_text = percent_diff | append: '% ' | append: off_t
endif
echo sale_text
assign label_type = 'sale'
elsif show_new_label and is_new_product and onboarding == false
echo new_t
assign label_type = 'new'
endif
endcapture
capture featured_label
if featured_tags.size > 0 and product_item.available and onboarding == false
assign break_loop = false
for featured_tag in featured_tags
assign formatted_featured_tag = featured_tag | downcase
for product_tag in product_item.tags
assign formatted_product_tag = product_tag | remove: ' ' | downcase
if formatted_product_tag == formatted_featured_tag
echo product_tag | escape
assign label_type = product_tag | handleize
assign break_loop = true
break
endif
endfor
if break_loop
break
endif
endfor
endif
endcapture
capture swatch_list
unless swatches == 'none'
for option in product_item.options_with_values
assign swatch_count = option.values | map: 'swatch' | compact | size
if swatch_count > 0
unless hide_single_swatch and option.values.size == 1
assign swatch_id = section_id | append: '-' | append: product_item.id
render 'swatches', id: swatch_id, option: option, static: true, shape: swatches
endunless
break
endif
endfor
endunless
endcapture
-%}
capture display_labels
if show_sale_label and compare_price and onboarding == false
if show_sale_label == 'show-text'
assign sale_text = sale_t
elsif show_sale_label == 'show-percent'
assign price_diff = product_item.compare_at_price | minus: product_item.price
assign percent_diff = price_diff | times: 100 | divided_by: product_item.compare_at_price
assign sale_text = percent_diff | append: '% ' | append: off_t
endif
echo sale_text
assign label_type = 'sale'
elsif show_new_label and is_new_product and onboarding == false
echo new_t
assign label_type = 'new'
endif
endcapture
capture featured_label
if featured_tags.size > 0 and product_item.available and onboarding == false
assign break_loop = false
for featured_tag in featured_tags
assign formatted_featured_tag = featured_tag | downcase
for product_tag in product_item.tags
assign formatted_product_tag = product_tag | remove: ' ' | downcase
if formatted_product_tag == formatted_featured_tag
echo product_tag | escape
assign label_type = product_tag | handleize
assign break_loop = true
break
endif
endfor
if break_loop
break
endif
endfor
endif
endcapture
capture swatch_list
unless swatches == 'none'
for option in product_item.options_with_values
assign swatch_count = option.values | map: 'swatch' | compact | size
if swatch_count > 0
unless hide_single_swatch and option.values.size == 1
assign swatch_id = section_id | append: '-' | append: product_item.id
render 'swatches', id: swatch_id, option: option, static: true, shape: swatches
endunless
break
endif
endfor
endunless
endcapture
-%}
capture display_labels
if show_sale_label and compare_price and onboarding == false
if show_sale_label == 'show-text'
assign sale_text = sale_t
elsif show_sale_label == 'show-percent'
assign price_diff = product_item.compare_at_price | minus: product_item.price
assign percent_diff = price_diff | times: 100 | divided_by: product_item.compare_at_price
assign sale_text = percent_diff | append: '% ' | append: off_t
endif
echo sale_text
assign label_type = 'sale'
elsif show_new_label and is_new_product and onboarding == false
echo new_t
assign label_type = 'new'
endif
endcapture
capture featured_label
if featured_tags.size > 0 and product_item.available and onboarding == false
assign break_loop = false
for featured_tag in featured_tags
assign formatted_featured_tag = featured_tag | downcase
for product_tag in product_item.tags
assign formatted_product_tag = product_tag | remove: ' ' | downcase
if formatted_product_tag == formatted_featured_tag
echo product_tag | escape
assign label_type = product_tag | handleize
assign break_loop = true
break
endif
endfor
if break_loop
break
endif
endfor
endif
endcapture
capture swatch_list
unless swatches == 'none'
for option in product_item.options_with_values
assign swatch_count = option.values | map: 'swatch' | compact | size
if swatch_count > 0
unless hide_single_swatch and option.values.size == 1
assign swatch_id = section_id | append: '-' | append: product_item.id
render 'swatches', id: swatch_id, option: option, static: true, shape: swatches
endunless
break
endif
endfor
endunless
endcapture
-%}
capture display_labels
if show_sale_label and compare_price and onboarding == false
if show_sale_label == 'show-text'
assign sale_text = sale_t
elsif show_sale_label == 'show-percent'
assign price_diff = product_item.compare_at_price | minus: product_item.price
assign percent_diff = price_diff | times: 100 | divided_by: product_item.compare_at_price
assign sale_text = percent_diff | append: '% ' | append: off_t
endif
echo sale_text
assign label_type = 'sale'
elsif show_new_label and is_new_product and onboarding == false
echo new_t
assign label_type = 'new'
endif
endcapture
capture featured_label
if featured_tags.size > 0 and product_item.available and onboarding == false
assign break_loop = false
for featured_tag in featured_tags
assign formatted_featured_tag = featured_tag | downcase
for product_tag in product_item.tags
assign formatted_product_tag = product_tag | remove: ' ' | downcase
if formatted_product_tag == formatted_featured_tag
echo product_tag | escape
assign label_type = product_tag | handleize
assign break_loop = true
break
endif
endfor
if break_loop
break
endif
endfor
endif
endcapture
capture swatch_list
unless swatches == 'none'
for option in product_item.options_with_values
assign swatch_count = option.values | map: 'swatch' | compact | size
if swatch_count > 0
unless hide_single_swatch and option.values.size == 1
assign swatch_id = section_id | append: '-' | append: product_item.id
render 'swatches', id: swatch_id, option: option, static: true, shape: swatches
endunless
break
endif
endfor
endunless
endcapture
-%}
capture display_labels
if show_sale_label and compare_price and onboarding == false
if show_sale_label == 'show-text'
assign sale_text = sale_t
elsif show_sale_label == 'show-percent'
assign price_diff = product_item.compare_at_price | minus: product_item.price
assign percent_diff = price_diff | times: 100 | divided_by: product_item.compare_at_price
assign sale_text = percent_diff | append: '% ' | append: off_t
endif
echo sale_text
assign label_type = 'sale'
elsif show_new_label and is_new_product and onboarding == false
echo new_t
assign label_type = 'new'
endif
endcapture
capture featured_label
if featured_tags.size > 0 and product_item.available and onboarding == false
assign break_loop = false
for featured_tag in featured_tags
assign formatted_featured_tag = featured_tag | downcase
for product_tag in product_item.tags
assign formatted_product_tag = product_tag | remove: ' ' | downcase
if formatted_product_tag == formatted_featured_tag
echo product_tag | escape
assign label_type = product_tag | handleize
assign break_loop = true
break
endif
endfor
if break_loop
break
endif
endfor
endif
endcapture
capture swatch_list
unless swatches == 'none'
for option in product_item.options_with_values
assign swatch_count = option.values | map: 'swatch' | compact | size
if swatch_count > 0
unless hide_single_swatch and option.values.size == 1
assign swatch_id = section_id | append: '-' | append: product_item.id
render 'swatches', id: swatch_id, option: option, static: true, shape: swatches
endunless
break
endif
endfor
endunless
endcapture
-%}
capture display_labels
if show_sale_label and compare_price and onboarding == false
if show_sale_label == 'show-text'
assign sale_text = sale_t
elsif show_sale_label == 'show-percent'
assign price_diff = product_item.compare_at_price | minus: product_item.price
assign percent_diff = price_diff | times: 100 | divided_by: product_item.compare_at_price
assign sale_text = percent_diff | append: '% ' | append: off_t
endif
echo sale_text
assign label_type = 'sale'
elsif show_new_label and is_new_product and onboarding == false
echo new_t
assign label_type = 'new'
endif
endcapture
capture featured_label
if featured_tags.size > 0 and product_item.available and onboarding == false
assign break_loop = false
for featured_tag in featured_tags
assign formatted_featured_tag = featured_tag | downcase
for product_tag in product_item.tags
assign formatted_product_tag = product_tag | remove: ' ' | downcase
if formatted_product_tag == formatted_featured_tag
echo product_tag | escape
assign label_type = product_tag | handleize
assign break_loop = true
break
endif
endfor
if break_loop
break
endif
endfor
endif
endcapture
capture swatch_list
unless swatches == 'none'
for option in product_item.options_with_values
assign swatch_count = option.values | map: 'swatch' | compact | size
if swatch_count > 0
unless hide_single_swatch and option.values.size == 1
assign swatch_id = section_id | append: '-' | append: product_item.id
render 'swatches', id: swatch_id, option: option, static: true, shape: swatches
endunless
break
endif
endfor
endunless
endcapture
-%}
capture display_labels
if show_sale_label and compare_price and onboarding == false
if show_sale_label == 'show-text'
assign sale_text = sale_t
elsif show_sale_label == 'show-percent'
assign price_diff = product_item.compare_at_price | minus: product_item.price
assign percent_diff = price_diff | times: 100 | divided_by: product_item.compare_at_price
assign sale_text = percent_diff | append: '% ' | append: off_t
endif
echo sale_text
assign label_type = 'sale'
elsif show_new_label and is_new_product and onboarding == false
echo new_t
assign label_type = 'new'
endif
endcapture
capture featured_label
if featured_tags.size > 0 and product_item.available and onboarding == false
assign break_loop = false
for featured_tag in featured_tags
assign formatted_featured_tag = featured_tag | downcase
for product_tag in product_item.tags
assign formatted_product_tag = product_tag | remove: ' ' | downcase
if formatted_product_tag == formatted_featured_tag
echo product_tag | escape
assign label_type = product_tag | handleize
assign break_loop = true
break
endif
endfor
if break_loop
break
endif
endfor
endif
endcapture
capture swatch_list
unless swatches == 'none'
for option in product_item.options_with_values
assign swatch_count = option.values | map: 'swatch' | compact | size
if swatch_count > 0
unless hide_single_swatch and option.values.size == 1
assign swatch_id = section_id | append: '-' | append: product_item.id
render 'swatches', id: swatch_id, option: option, static: true, shape: swatches
endunless
break
endif
endfor
endunless
endcapture
-%}
capture display_labels
if show_sale_label and compare_price and onboarding == false
if show_sale_label == 'show-text'
assign sale_text = sale_t
elsif show_sale_label == 'show-percent'
assign price_diff = product_item.compare_at_price | minus: product_item.price
assign percent_diff = price_diff | times: 100 | divided_by: product_item.compare_at_price
assign sale_text = percent_diff | append: '% ' | append: off_t
endif
echo sale_text
assign label_type = 'sale'
elsif show_new_label and is_new_product and onboarding == false
echo new_t
assign label_type = 'new'
endif
endcapture
capture featured_label
if featured_tags.size > 0 and product_item.available and onboarding == false
assign break_loop = false
for featured_tag in featured_tags
assign formatted_featured_tag = featured_tag | downcase
for product_tag in product_item.tags
assign formatted_product_tag = product_tag | remove: ' ' | downcase
if formatted_product_tag == formatted_featured_tag
echo product_tag | escape
assign label_type = product_tag | handleize
assign break_loop = true
break
endif
endfor
if break_loop
break
endif
endfor
endif
endcapture
capture swatch_list
unless swatches == 'none'
for option in product_item.options_with_values
assign swatch_count = option.values | map: 'swatch' | compact | size
if swatch_count > 0
unless hide_single_swatch and option.values.size == 1
assign swatch_id = section_id | append: '-' | append: product_item.id
render 'swatches', id: swatch_id, option: option, static: true, shape: swatches
endunless
break
endif
endfor
endunless
endcapture
-%}
capture display_labels
if show_sale_label and compare_price and onboarding == false
if show_sale_label == 'show-text'
assign sale_text = sale_t
elsif show_sale_label == 'show-percent'
assign price_diff = product_item.compare_at_price | minus: product_item.price
assign percent_diff = price_diff | times: 100 | divided_by: product_item.compare_at_price
assign sale_text = percent_diff | append: '% ' | append: off_t
endif
echo sale_text
assign label_type = 'sale'
elsif show_new_label and is_new_product and onboarding == false
echo new_t
assign label_type = 'new'
endif
endcapture
capture featured_label
if featured_tags.size > 0 and product_item.available and onboarding == false
assign break_loop = false
for featured_tag in featured_tags
assign formatted_featured_tag = featured_tag | downcase
for product_tag in product_item.tags
assign formatted_product_tag = product_tag | remove: ' ' | downcase
if formatted_product_tag == formatted_featured_tag
echo product_tag | escape
assign label_type = product_tag | handleize
assign break_loop = true
break
endif
endfor
if break_loop
break
endif
endfor
endif
endcapture
capture swatch_list
unless swatches == 'none'
for option in product_item.options_with_values
assign swatch_count = option.values | map: 'swatch' | compact | size
if swatch_count > 0
unless hide_single_swatch and option.values.size == 1
assign swatch_id = section_id | append: '-' | append: product_item.id
render 'swatches', id: swatch_id, option: option, static: true, shape: swatches
endunless
break
endif
endfor
endunless
endcapture
-%}
capture display_labels
if show_sale_label and compare_price and onboarding == false
if show_sale_label == 'show-text'
assign sale_text = sale_t
elsif show_sale_label == 'show-percent'
assign price_diff = product_item.compare_at_price | minus: product_item.price
assign percent_diff = price_diff | times: 100 | divided_by: product_item.compare_at_price
assign sale_text = percent_diff | append: '% ' | append: off_t
endif
echo sale_text
assign label_type = 'sale'
elsif show_new_label and is_new_product and onboarding == false
echo new_t
assign label_type = 'new'
endif
endcapture
capture featured_label
if featured_tags.size > 0 and product_item.available and onboarding == false
assign break_loop = false
for featured_tag in featured_tags
assign formatted_featured_tag = featured_tag | downcase
for product_tag in product_item.tags
assign formatted_product_tag = product_tag | remove: ' ' | downcase
if formatted_product_tag == formatted_featured_tag
echo product_tag | escape
assign label_type = product_tag | handleize
assign break_loop = true
break
endif
endfor
if break_loop
break
endif
endfor
endif
endcapture
capture swatch_list
unless swatches == 'none'
for option in product_item.options_with_values
assign swatch_count = option.values | map: 'swatch' | compact | size
if swatch_count > 0
unless hide_single_swatch and option.values.size == 1
assign swatch_id = section_id | append: '-' | append: product_item.id
render 'swatches', id: swatch_id, option: option, static: true, shape: swatches
endunless
break
endif
endfor
endunless
endcapture
-%}
capture display_labels
if show_sale_label and compare_price and onboarding == false
if show_sale_label == 'show-text'
assign sale_text = sale_t
elsif show_sale_label == 'show-percent'
assign price_diff = product_item.compare_at_price | minus: product_item.price
assign percent_diff = price_diff | times: 100 | divided_by: product_item.compare_at_price
assign sale_text = percent_diff | append: '% ' | append: off_t
endif
echo sale_text
assign label_type = 'sale'
elsif show_new_label and is_new_product and onboarding == false
echo new_t
assign label_type = 'new'
endif
endcapture
capture featured_label
if featured_tags.size > 0 and product_item.available and onboarding == false
assign break_loop = false
for featured_tag in featured_tags
assign formatted_featured_tag = featured_tag | downcase
for product_tag in product_item.tags
assign formatted_product_tag = product_tag | remove: ' ' | downcase
if formatted_product_tag == formatted_featured_tag
echo product_tag | escape
assign label_type = product_tag | handleize
assign break_loop = true
break
endif
endfor
if break_loop
break
endif
endfor
endif
endcapture
capture swatch_list
unless swatches == 'none'
for option in product_item.options_with_values
assign swatch_count = option.values | map: 'swatch' | compact | size
if swatch_count > 0
unless hide_single_swatch and option.values.size == 1
assign swatch_id = section_id | append: '-' | append: product_item.id
render 'swatches', id: swatch_id, option: option, static: true, shape: swatches
endunless
break
endif
endfor
endunless
endcapture
-%}
capture display_labels
if show_sale_label and compare_price and onboarding == false
if show_sale_label == 'show-text'
assign sale_text = sale_t
elsif show_sale_label == 'show-percent'
assign price_diff = product_item.compare_at_price | minus: product_item.price
assign percent_diff = price_diff | times: 100 | divided_by: product_item.compare_at_price
assign sale_text = percent_diff | append: '% ' | append: off_t
endif
echo sale_text
assign label_type = 'sale'
elsif show_new_label and is_new_product and onboarding == false
echo new_t
assign label_type = 'new'
endif
endcapture
capture featured_label
if featured_tags.size > 0 and product_item.available and onboarding == false
assign break_loop = false
for featured_tag in featured_tags
assign formatted_featured_tag = featured_tag | downcase
for product_tag in product_item.tags
assign formatted_product_tag = product_tag | remove: ' ' | downcase
if formatted_product_tag == formatted_featured_tag
echo product_tag | escape
assign label_type = product_tag | handleize
assign break_loop = true
break
endif
endfor
if break_loop
break
endif
endfor
endif
endcapture
capture swatch_list
unless swatches == 'none'
for option in product_item.options_with_values
assign swatch_count = option.values | map: 'swatch' | compact | size
if swatch_count > 0
unless hide_single_swatch and option.values.size == 1
assign swatch_id = section_id | append: '-' | append: product_item.id
render 'swatches', id: swatch_id, option: option, static: true, shape: swatches
endunless
break
endif
endfor
endunless
endcapture
-%}
capture display_labels
if show_sale_label and compare_price and onboarding == false
if show_sale_label == 'show-text'
assign sale_text = sale_t
elsif show_sale_label == 'show-percent'
assign price_diff = product_item.compare_at_price | minus: product_item.price
assign percent_diff = price_diff | times: 100 | divided_by: product_item.compare_at_price
assign sale_text = percent_diff | append: '% ' | append: off_t
endif
echo sale_text
assign label_type = 'sale'
elsif show_new_label and is_new_product and onboarding == false
echo new_t
assign label_type = 'new'
endif
endcapture
capture featured_label
if featured_tags.size > 0 and product_item.available and onboarding == false
assign break_loop = false
for featured_tag in featured_tags
assign formatted_featured_tag = featured_tag | downcase
for product_tag in product_item.tags
assign formatted_product_tag = product_tag | remove: ' ' | downcase
if formatted_product_tag == formatted_featured_tag
echo product_tag | escape
assign label_type = product_tag | handleize
assign break_loop = true
break
endif
endfor
if break_loop
break
endif
endfor
endif
endcapture
capture swatch_list
unless swatches == 'none'
for option in product_item.options_with_values
assign swatch_count = option.values | map: 'swatch' | compact | size
if swatch_count > 0
unless hide_single_swatch and option.values.size == 1
assign swatch_id = section_id | append: '-' | append: product_item.id
render 'swatches', id: swatch_id, option: option, static: true, shape: swatches
endunless
break
endif
endfor
endunless
endcapture
-%}
capture display_labels
if show_sale_label and compare_price and onboarding == false
if show_sale_label == 'show-text'
assign sale_text = sale_t
elsif show_sale_label == 'show-percent'
assign price_diff = product_item.compare_at_price | minus: product_item.price
assign percent_diff = price_diff | times: 100 | divided_by: product_item.compare_at_price
assign sale_text = percent_diff | append: '% ' | append: off_t
endif
echo sale_text
assign label_type = 'sale'
elsif show_new_label and is_new_product and onboarding == false
echo new_t
assign label_type = 'new'
endif
endcapture
capture featured_label
if featured_tags.size > 0 and product_item.available and onboarding == false
assign break_loop = false
for featured_tag in featured_tags
assign formatted_featured_tag = featured_tag | downcase
for product_tag in product_item.tags
assign formatted_product_tag = product_tag | remove: ' ' | downcase
if formatted_product_tag == formatted_featured_tag
echo product_tag | escape
assign label_type = product_tag | handleize
assign break_loop = true
break
endif
endfor
if break_loop
break
endif
endfor
endif
endcapture
capture swatch_list
unless swatches == 'none'
for option in product_item.options_with_values
assign swatch_count = option.values | map: 'swatch' | compact | size
if swatch_count > 0
unless hide_single_swatch and option.values.size == 1
assign swatch_id = section_id | append: '-' | append: product_item.id
render 'swatches', id: swatch_id, option: option, static: true, shape: swatches
endunless
break
endif
endfor
endunless
endcapture
-%}
capture display_labels
if show_sale_label and compare_price and onboarding == false
if show_sale_label == 'show-text'
assign sale_text = sale_t
elsif show_sale_label == 'show-percent'
assign price_diff = product_item.compare_at_price | minus: product_item.price
assign percent_diff = price_diff | times: 100 | divided_by: product_item.compare_at_price
assign sale_text = percent_diff | append: '% ' | append: off_t
endif
echo sale_text
assign label_type = 'sale'
elsif show_new_label and is_new_product and onboarding == false
echo new_t
assign label_type = 'new'
endif
endcapture
capture featured_label
if featured_tags.size > 0 and product_item.available and onboarding == false
assign break_loop = false
for featured_tag in featured_tags
assign formatted_featured_tag = featured_tag | downcase
for product_tag in product_item.tags
assign formatted_product_tag = product_tag | remove: ' ' | downcase
if formatted_product_tag == formatted_featured_tag
echo product_tag | escape
assign label_type = product_tag | handleize
assign break_loop = true
break
endif
endfor
if break_loop
break
endif
endfor
endif
endcapture
capture swatch_list
unless swatches == 'none'
for option in product_item.options_with_values
assign swatch_count = option.values | map: 'swatch' | compact | size
if swatch_count > 0
unless hide_single_swatch and option.values.size == 1
assign swatch_id = section_id | append: '-' | append: product_item.id
render 'swatches', id: swatch_id, option: option, static: true, shape: swatches
endunless
break
endif
endfor
endunless
endcapture
-%}
capture display_labels
if show_sale_label and compare_price and onboarding == false
if show_sale_label == 'show-text'
assign sale_text = sale_t
elsif show_sale_label == 'show-percent'
assign price_diff = product_item.compare_at_price | minus: product_item.price
assign percent_diff = price_diff | times: 100 | divided_by: product_item.compare_at_price
assign sale_text = percent_diff | append: '% ' | append: off_t
endif
echo sale_text
assign label_type = 'sale'
elsif show_new_label and is_new_product and onboarding == false
echo new_t
assign label_type = 'new'
endif
endcapture
capture featured_label
if featured_tags.size > 0 and product_item.available and onboarding == false
assign break_loop = false
for featured_tag in featured_tags
assign formatted_featured_tag = featured_tag | downcase
for product_tag in product_item.tags
assign formatted_product_tag = product_tag | remove: ' ' | downcase
if formatted_product_tag == formatted_featured_tag
echo product_tag | escape
assign label_type = product_tag | handleize
assign break_loop = true
break
endif
endfor
if break_loop
break
endif
endfor
endif
endcapture
capture swatch_list
unless swatches == 'none'
for option in product_item.options_with_values
assign swatch_count = option.values | map: 'swatch' | compact | size
if swatch_count > 0
unless hide_single_swatch and option.values.size == 1
assign swatch_id = section_id | append: '-' | append: product_item.id
render 'swatches', id: swatch_id, option: option, static: true, shape: swatches
endunless
break
endif
endfor
endunless
endcapture
-%}
capture display_labels
if show_sale_label and compare_price and onboarding == false
if show_sale_label == 'show-text'
assign sale_text = sale_t
elsif show_sale_label == 'show-percent'
assign price_diff = product_item.compare_at_price | minus: product_item.price
assign percent_diff = price_diff | times: 100 | divided_by: product_item.compare_at_price
assign sale_text = percent_diff | append: '% ' | append: off_t
endif
echo sale_text
assign label_type = 'sale'
elsif show_new_label and is_new_product and onboarding == false
echo new_t
assign label_type = 'new'
endif
endcapture
capture featured_label
if featured_tags.size > 0 and product_item.available and onboarding == false
assign break_loop = false
for featured_tag in featured_tags
assign formatted_featured_tag = featured_tag | downcase
for product_tag in product_item.tags
assign formatted_product_tag = product_tag | remove: ' ' | downcase
if formatted_product_tag == formatted_featured_tag
echo product_tag | escape
assign label_type = product_tag | handleize
assign break_loop = true
break
endif
endfor
if break_loop
break
endif
endfor
endif
endcapture
capture swatch_list
unless swatches == 'none'
for option in product_item.options_with_values
assign swatch_count = option.values | map: 'swatch' | compact | size
if swatch_count > 0
unless hide_single_swatch and option.values.size == 1
assign swatch_id = section_id | append: '-' | append: product_item.id
render 'swatches', id: swatch_id, option: option, static: true, shape: swatches
endunless
break
endif
endfor
endunless
endcapture
-%}
capture display_labels
if show_sale_label and compare_price and onboarding == false
if show_sale_label == 'show-text'
assign sale_text = sale_t
elsif show_sale_label == 'show-percent'
assign price_diff = product_item.compare_at_price | minus: product_item.price
assign percent_diff = price_diff | times: 100 | divided_by: product_item.compare_at_price
assign sale_text = percent_diff | append: '% ' | append: off_t
endif
echo sale_text
assign label_type = 'sale'
elsif show_new_label and is_new_product and onboarding == false
echo new_t
assign label_type = 'new'
endif
endcapture
capture featured_label
if featured_tags.size > 0 and product_item.available and onboarding == false
assign break_loop = false
for featured_tag in featured_tags
assign formatted_featured_tag = featured_tag | downcase
for product_tag in product_item.tags
assign formatted_product_tag = product_tag | remove: ' ' | downcase
if formatted_product_tag == formatted_featured_tag
echo product_tag | escape
assign label_type = product_tag | handleize
assign break_loop = true
break
endif
endfor
if break_loop
break
endif
endfor
endif
endcapture
capture swatch_list
unless swatches == 'none'
for option in product_item.options_with_values
assign swatch_count = option.values | map: 'swatch' | compact | size
if swatch_count > 0
unless hide_single_swatch and option.values.size == 1
assign swatch_id = section_id | append: '-' | append: product_item.id
render 'swatches', id: swatch_id, option: option, static: true, shape: swatches
endunless
break
endif
endfor
endunless
endcapture
-%}
capture display_labels
if show_sale_label and compare_price and onboarding == false
if show_sale_label == 'show-text'
assign sale_text = sale_t
elsif show_sale_label == 'show-percent'
assign price_diff = product_item.compare_at_price | minus: product_item.price
assign percent_diff = price_diff | times: 100 | divided_by: product_item.compare_at_price
assign sale_text = percent_diff | append: '% ' | append: off_t
endif
echo sale_text
assign label_type = 'sale'
elsif show_new_label and is_new_product and onboarding == false
echo new_t
assign label_type = 'new'
endif
endcapture
capture featured_label
if featured_tags.size > 0 and product_item.available and onboarding == false
assign break_loop = false
for featured_tag in featured_tags
assign formatted_featured_tag = featured_tag | downcase
for product_tag in product_item.tags
assign formatted_product_tag = product_tag | remove: ' ' | downcase
if formatted_product_tag == formatted_featured_tag
echo product_tag | escape
assign label_type = product_tag | handleize
assign break_loop = true
break
endif
endfor
if break_loop
break
endif
endfor
endif
endcapture
capture swatch_list
unless swatches == 'none'
for option in product_item.options_with_values
assign swatch_count = option.values | map: 'swatch' | compact | size
if swatch_count > 0
unless hide_single_swatch and option.values.size == 1
assign swatch_id = section_id | append: '-' | append: product_item.id
render 'swatches', id: swatch_id, option: option, static: true, shape: swatches
endunless
break
endif
endfor
endunless
endcapture
-%}
capture display_labels
if show_sale_label and compare_price and onboarding == false
if show_sale_label == 'show-text'
assign sale_text = sale_t
elsif show_sale_label == 'show-percent'
assign price_diff = product_item.compare_at_price | minus: product_item.price
assign percent_diff = price_diff | times: 100 | divided_by: product_item.compare_at_price
assign sale_text = percent_diff | append: '% ' | append: off_t
endif
echo sale_text
assign label_type = 'sale'
elsif show_new_label and is_new_product and onboarding == false
echo new_t
assign label_type = 'new'
endif
endcapture
capture featured_label
if featured_tags.size > 0 and product_item.available and onboarding == false
assign break_loop = false
for featured_tag in featured_tags
assign formatted_featured_tag = featured_tag | downcase
for product_tag in product_item.tags
assign formatted_product_tag = product_tag | remove: ' ' | downcase
if formatted_product_tag == formatted_featured_tag
echo product_tag | escape
assign label_type = product_tag | handleize
assign break_loop = true
break
endif
endfor
if break_loop
break
endif
endfor
endif
endcapture
capture swatch_list
unless swatches == 'none'
for option in product_item.options_with_values
assign swatch_count = option.values | map: 'swatch' | compact | size
if swatch_count > 0
unless hide_single_swatch and option.values.size == 1
assign swatch_id = section_id | append: '-' | append: product_item.id
render 'swatches', id: swatch_id, option: option, static: true, shape: swatches
endunless
break
endif
endfor
endunless
endcapture
-%}
capture display_labels
if show_sale_label and compare_price and onboarding == false
if show_sale_label == 'show-text'
assign sale_text = sale_t
elsif show_sale_label == 'show-percent'
assign price_diff = product_item.compare_at_price | minus: product_item.price
assign percent_diff = price_diff | times: 100 | divided_by: product_item.compare_at_price
assign sale_text = percent_diff | append: '% ' | append: off_t
endif
echo sale_text
assign label_type = 'sale'
elsif show_new_label and is_new_product and onboarding == false
echo new_t
assign label_type = 'new'
endif
endcapture
capture featured_label
if featured_tags.size > 0 and product_item.available and onboarding == false
assign break_loop = false
for featured_tag in featured_tags
assign formatted_featured_tag = featured_tag | downcase
for product_tag in product_item.tags
assign formatted_product_tag = product_tag | remove: ' ' | downcase
if formatted_product_tag == formatted_featured_tag
echo product_tag | escape
assign label_type = product_tag | handleize
assign break_loop = true
break
endif
endfor
if break_loop
break
endif
endfor
endif
endcapture
capture swatch_list
unless swatches == 'none'
for option in product_item.options_with_values
assign swatch_count = option.values | map: 'swatch' | compact | size
if swatch_count > 0
unless hide_single_swatch and option.values.size == 1
assign swatch_id = section_id | append: '-' | append: product_item.id
render 'swatches', id: swatch_id, option: option, static: true, shape: swatches
endunless
break
endif
endfor
endunless
endcapture
-%}
capture display_labels
if show_sale_label and compare_price and onboarding == false
if show_sale_label == 'show-text'
assign sale_text = sale_t
elsif show_sale_label == 'show-percent'
assign price_diff = product_item.compare_at_price | minus: product_item.price
assign percent_diff = price_diff | times: 100 | divided_by: product_item.compare_at_price
assign sale_text = percent_diff | append: '% ' | append: off_t
endif
echo sale_text
assign label_type = 'sale'
elsif show_new_label and is_new_product and onboarding == false
echo new_t
assign label_type = 'new'
endif
endcapture
capture featured_label
if featured_tags.size > 0 and product_item.available and onboarding == false
assign break_loop = false
for featured_tag in featured_tags
assign formatted_featured_tag = featured_tag | downcase
for product_tag in product_item.tags
assign formatted_product_tag = product_tag | remove: ' ' | downcase
if formatted_product_tag == formatted_featured_tag
echo product_tag | escape
assign label_type = product_tag | handleize
assign break_loop = true
break
endif
endfor
if break_loop
break
endif
endfor
endif
endcapture
capture swatch_list
unless swatches == 'none'
for option in product_item.options_with_values
assign swatch_count = option.values | map: 'swatch' | compact | size
if swatch_count > 0
unless hide_single_swatch and option.values.size == 1
assign swatch_id = section_id | append: '-' | append: product_item.id
render 'swatches', id: swatch_id, option: option, static: true, shape: swatches
endunless
break
endif
endfor
endunless
endcapture
-%}
capture display_labels
if show_sale_label and compare_price and onboarding == false
if show_sale_label == 'show-text'
assign sale_text = sale_t
elsif show_sale_label == 'show-percent'
assign price_diff = product_item.compare_at_price | minus: product_item.price
assign percent_diff = price_diff | times: 100 | divided_by: product_item.compare_at_price
assign sale_text = percent_diff | append: '% ' | append: off_t
endif
echo sale_text
assign label_type = 'sale'
elsif show_new_label and is_new_product and onboarding == false
echo new_t
assign label_type = 'new'
endif
endcapture
capture featured_label
if featured_tags.size > 0 and product_item.available and onboarding == false
assign break_loop = false
for featured_tag in featured_tags
assign formatted_featured_tag = featured_tag | downcase
for product_tag in product_item.tags
assign formatted_product_tag = product_tag | remove: ' ' | downcase
if formatted_product_tag == formatted_featured_tag
echo product_tag | escape
assign label_type = product_tag | handleize
assign break_loop = true
break
endif
endfor
if break_loop
break
endif
endfor
endif
endcapture
capture swatch_list
unless swatches == 'none'
for option in product_item.options_with_values
assign swatch_count = option.values | map: 'swatch' | compact | size
if swatch_count > 0
unless hide_single_swatch and option.values.size == 1
assign swatch_id = section_id | append: '-' | append: product_item.id
render 'swatches', id: swatch_id, option: option, static: true, shape: swatches
endunless
break
endif
endfor
endunless
endcapture
-%}