Product description missing for single variant products - HELP

Hey. Suddenly products descriptions are missing for my single variant products. our other 200 products are showing descriptions, but 3 products (single variant) are not.

Can someone help fix this?

Affected product example:
https://crascph.dk/products/returlabel

Store Url: https://crascph.dk/ + https://crascph.com/

Hi,

I have inspected your pages and unfortunately could not find anything that would cause this issue. I would suggest you go to your theme`s code and explore the product template page. There has to be something that decides when to show description and when not to.

If you like, you can post the code here and I will try to help.

To be fair, I figured that your description is within

and on some products it`s just missing, whereas usually it would be an addition line of css with display: none parameter.

I am certain there is something before this div that restricts it to be visible on some products.

Hey thanks! Do you mean the product.liquid under “templates”?

Noted. Can you help fix it?

Sure. In my theme it`s called product-template.liquid. Has to be something similar in yours, too. Once you find it, press Ctrl + F and look for <div class=“Product__Tabs”

If you found it, then that`s the file we need

here is the code:

{%- capture section_settings -%}
{
“enableHistoryState”: true,
“showInventoryQuantity”: {% if section.settings.show_inventory_quantity %}true{% else %}false{% endif %},
“showThumbnails”: {% if section.settings.show_thumbnails %}true{% else %}false{% endif %},
“inventoryQuantityThreshold”: {{ section.settings.inventory_quantity_threshold }},
“enableImageZoom”: {% if section.settings.enable_image_zoom %}true{% else %}false{% endif %},
“showPaymentButton”: {{ section.settings.show_payment_button | json }},
“useAjaxCart”: {% if settings.cart_type == ‘drawer’ %}true{% else %}false{% endif %}
}
{%- endcapture -%}

{%- capture action_list_items -%} {%- if section.settings.enable_image_zoom -%}
{% include 'icon' with 'plus' %}
{%- endif -%}

{%- if section.settings.show_share_buttons -%}

{% include 'icon' with 'share' %} {% include 'icon' with 'close' %}

{%- assign share_url = shop.url | append: product.url -%}
{%- assign twitter_text = product.title -%}
{%- assign pinterest_description = product.description | strip_html | truncatewords: 15 | url_param_escape -%}
{%- assign pinterest_image = product.featured_image | img_url: ‘large’ | prepend: ‘https:’ -%}

{%- endif -%} {%- endcapture -%}

{%- comment -%}

PRODUCT GALLERY

{%- endcomment -%}

{%- assign initial_image_id = product.featured_image.id -%}
{%- assign initial_image_index = 0 -%}
{%- assign image_count = 0 -%}

{%- capture slideshow_images -%}
{%- for image in product.images -%}
{%- if image.alt == ‘featured’ or image.alt == ‘featured mobile’ -%}
{%- continue -%}
{%- endif -%}

{%- if image.id == product.selected_or_first_available_variant.image.id -%}
{%- assign initial_image_index = image_count -%}
{%- assign initial_image_id = image.id -%}
{%- endif -%}

{%- include ‘image-size’, sizes: ‘200,400,600,700,800,900,1000,1200,1400,1600’, image: image -%}

{%- assign is_video = false -%}

{%- if image.alt contains ‘YouTube’ or image.alt contains ‘player.vimeo.com’ -%}
{%- assign is_video = true -%}
{%- endif -%}

{% assign image_url = image | img_url: '1x1' | replace: '_1x1.', '_{width}x.' %}

<img class=“Image–lazyLoad Image–fadeIn”
{% if initial_image_id == image.id %}src=“{{ image | img_url: ‘250x’ }}”{% endif %}
data-src=“{{ image_url }}”
data-widths=“[{{ supported_sizes }}]”
data-sizes=“auto”
data-expand=“-100”
alt=“{{ image.alt | escape }}”
data-max-width=“{{ image.width }}”
data-max-height=“{{ image.height }}”
data-original-src=“{{ image | img_url: ‘master’ }}” style=“transition-delay: {{ 200 | times: forloop.index0 }}ms;”>

{%- if is_video -%}
{% include ‘icon’ with ‘play’ %}
{%- endif -%}

{{ image.alt | escape }}

{%- assign image_count = image_count | plus: 1 -%}
{%- endfor -%}
{%- endcapture -%}

{%- if product.images.size > 0 -%}

{%- if action_list_items != blank -%}

{{ action_list_items }}
{%- endif -%}

{%- if product.metafields.create2stay.condition != blank -%}

{{ 'product.condition.pre-owned' | t }}
{%- endif -%}

{%- if image_count > 1 -%}

{%- for image in product.images -%} {%- if image.alt == 'featured' or image.alt == 'featured mobile' -%} {%- continue -%} {%- endif -%}


{%- endfor -%}

{%- endif -%}

{%- capture flickity_options -%}
{
“prevNextButtons”: false,
“pageDots”: {% if image_count > 1 %}true{% else %}false{% endif %},
“adaptiveHeight”: true,
“wrapAround”: false,
“watchCSS”: true,
“dragThreshold”: 8,
“initialIndex”: {{ initial_image_index }}
}
{%- endcapture -%}

{{ slideshow_images }}
{%- endif -%}

{%- capture product_aside -%}
{%- comment -%}

PRODUCT TABS

{%- endcomment -%}

{%- comment -%}

PRODUCT WEAR IT WITH

We allow merchants to add a tag that looks like __with:product-handle to feature an additional product

{%- endcomment -%}

{% if section.settings.wear_it_with_mode == ‘single’ %}

{%- for tag in product.tags -%}
{%- if tag contains ‘__with’ -%}
{%- assign product_handle = tag | split: ‘__with:’ | last -%}
{%- assign associated_product = all_products[product_handle] -%}

{%- if associated_product != empty -%}

{{ 'product.buy_it_with.title' | t }}

{% include ‘product-item’, product: associated_product, use_horizontal: true, show_labels: false, show_product_info: true, show_vendor: false, show_price_on_hover: false %}

{%- break -%}

{%- endif -%}
{%- endif -%}
{%- endfor -%}

{% endif %}

{%- endcapture -%}

{%- include 'product-meta', show_description: true -%} {%- include 'product-form' -%} {%- include 'product-tabs' -%}

{%- if product_aside != blank and image_count > 0 -%}

{%- endif -%}

{%- if action_list_items != blank -%}

{{ action_list_items }}
{%- endif -%}

{%- if product_aside != blank -%}

{{- product_aside -}}
{%- endif -%}

{%- comment -%}

OFF SCREEN ELEMENTS

{%- endcomment -%}

{% unless settings.variant_swatches %}
{{- product_popovers -}}
{% endunless %}
{{- product_modals -}}

{% if section.settings.shop_the_look_slider %}

{%- capture flickity_options -%}
{
“prevNextButtons”: true,
“pageDots”: false,
“wrapAround”: false,
“contain”: true,
“cellAlign”: “center”,
“watchCSS”: true,
“dragThreshold”: 8,
“groupCells”: true,
“arrowShape”: {“x0”: 10,
“x1”: 60, “y1”: 50,
“x2”: 75, “y2”: 35,
“x3”: 40}
}
{%- endcapture -%}

{% assign associated_product_count = 0 %}

{{ 'product.buy_it_with.title' | t }}

{%- for tag in product.tags -%}
{%- if tag contains ‘__with’ -%}
{%- assign product_handle = tag | split: ‘__with:’ | last -%}
{%- assign associated_product = all_products[product_handle] -%}
{%- assign product = empty -%}

{%- if associated_product != empty -%}

{%- assign product = associated_product -%}

{%- assign associated_product_count = associated_product_count | plus: 1 -%}

{% include 'product-item', show_product_info: section.settings.shop_the_look_show_product_info, show_vendor: section.settings.shop_the_look_show_vendor, show_color_swatch: section.settings.shop_the_look_show_color_swatch, show_labels: true %}

{%- endif -%}
{%- endif -%}
{%- endfor -%}

{% if associated_product_count == 0 %}

#wearitwith { display: none; }

{% else %}

{% endif %}

{% else %}

{%- for tag in product.tags -%}
{%- if tag contains ‘__with’ -%}
{%- assign product_handle = tag | split: ‘__with:’ | last -%}
{%- assign associated_product = all_products[product_handle] -%}

{%- if associated_product != empty -%}

{{ 'product.buy_it_with.title' | t }}

{% include ‘product-item’, product: associated_product, use_horizontal: true, show_labels: false, show_product_info: true, show_vendor: false, show_price_on_hover: false %}

{%- break -%}

{%- endif -%}
{%- endif -%}
{%- endfor -%}

{% endif %}

{%- if product_aside != blank -%}
{{- product_aside -}}
{%- endif -%}

{%- comment -%}

PRODUCT WEAR IT WITH

We allow merchants to add a tag that looks like __with:product-handle to feature an additional product

{%- endcomment -%}

{% if section.settings.wear_it_with_mode == ‘multi’ %}

{%- capture flickity_options -%}
{
“prevNextButtons”: true,
“pageDots”: false,
“wrapAround”: false,
“contain”: true,
“cellAlign”: “center”,
“watchCSS”: true,
“dragThreshold”: 8,
“groupCells”: true,
“arrowShape”: {“x0”: 10,
“x1”: 60, “y1”: 50,
“x2”: 75, “y2”: 35,
“x3”: 40}
}
{%- endcapture -%}

{% assign associated_product_count = 0 %}

{{ 'product.buy_it_with.title' | t }}

{%- for tag in product.tags -%}
{%- if tag contains ‘__with’ -%}
{%- assign product_handle = tag | split: ‘__with:’ | last -%}
{%- assign associated_product = all_products[product_handle] -%}
{%- assign product = empty -%}

{%- if associated_product != empty -%}

{%- assign product = associated_product -%}

{%- assign associated_product_count = associated_product_count | plus: 1 -%}

{% include 'product-item', show_product_info: section.settings.shop_the_look_show_product_info, show_vendor: section.settings.shop_the_look_show_vendor, show_color_swatch: section.settings.shop_the_look_show_color_swatch, show_labels: true %}

{%- endif -%}
{%- endif -%}
{%- endfor -%}

{% if associated_product_count == 0 %}

#wearitwith { display: none; }

{% else %}

{% endif %}

{% endif %}

{%- comment -%}

FEATURED IMAGE

We allow merchants to use one image as a “featured image” by adding the alt tag “featured”

{%- endcomment -%}

{%- for image in product.images -%}
{%- if image.alt == ‘featured’ -%}
{%- assign desk_featured_image = image -%}
{%- endif -%}

{%- if image.alt == ‘featured mobile’ -%}
{%- assign mobile_featured_image = image -%}
{%- endif -%}
{%- endfor -%}

{%- if desk_featured_image or mobile_featured_image -%}
{%- assign mobile_featured_image = mobile_featured_image | default: desk_featured_image -%}
{%- assign desk_featured_image = desk_featured_image | default: mobile_featured_image -%}

#shopify-section-{{ section.id }} + .shopify-section--bordered { border-top: 0; }

{%- else -%}

/* Very ugly haha */ @media screen and (max-width: 640px) { #shopify-section-{{ section.id }} + .shopify-section--bordered { border-top: 0; } #shopify-section-{{ section.id }} + .shopify-section--bordered > .Section { padding-top: 0; } }

{%- endif -%}

{%- comment -%}

MODALS

If we have some videos, we implement them as modal

{%- endcomment -%}

{%- for image in product.images -%}
{%- if image.alt contains ‘YouTube’ or image.alt contains ‘player.vimeo.com’ -%}

{% if image.alt contains 'youtube.com/embed' %} {% else %} {% endif %}

{% include ‘icon’ with ‘close’ %}

{%- endif -%} {%- endfor -%}

{%- comment -%}

PHOTO SWIPE

This is the root container for the zoom functionality. Must not be removed, as order element is important.

{%- endcomment -%}

{%- if section.settings.enable_image_zoom -%}

{% include 'icon' with 'arrow-left' %} {% include 'icon' with 'close-small' %} {% include 'icon' with 'arrow-right' %}
{%- endif -%}

{% schema %}
{
“name”: “Product page”,
“class”: “shopify-section–bordered”,
“settings”: [
{
“type”: “checkbox”,
“id”: “show_share_buttons”,
“label”: “Show social sharing buttons”,
“default”: true
},
{
“type”: “checkbox”,
“id”: “show_vendor”,
“label”: “Show vendor”,
“default”: true
},
{
“type”: “checkbox”,
“id”: “description_below_add_to_cart”,
“label”: “Description below add to cart”,
“default”: false
},
{
“type”: “checkbox”,
“id”: “show_color_swatch”,
“label”: “Show color swatch”,
“default”: true,
“info”: “Some colors appear white? Learn more.”
},
{
“type”: “checkbox”,
“id”: “show_color_carousel”,
“label”: “Show color carousel”,
“info”: “A selector will appear with variant image previews when choosing colors.”,
“default”: false
},
{
“type”: “checkbox”,
“id”: “show_quantity_selector”,
“label”: “Show quantity selector”,
“default”: true
},
{
“type”: “checkbox”,
“id”: “show_inventory_quantity”,
“label”: “Show inventory quantity”,
“info”: “Make sure that your inventory is tracked. Learn more.”,
“default”: false
},
{
“type”: “range”,
“id”: “inventory_quantity_threshold”,
“label”: “Inventory quantity threshold”,
“info”: “Only show inventory quantity if below threshold. Choose 0 to always show.”,
“min”: 0,
“max”: 50,
“step”: 1,
“default”: 0
},
{
“type”: “checkbox”,
“id”: “show_payment_button”,
“label”: “Show dynamic checkout button”,
“info”: “Lets customers check out directly using a familiar payment method. Learn more”,
“default”: false
},
{
“type”: “header”,
“content”: “Product images”
},
{
“type”: “select”,
“id”: “image_size”,
“label”: “Size”,
“options”: [
{
“value”: “small”,
“label”: “Small”
},
{
“value”: “medium”,
“label”: “Medium”
},
{
“value”: “large”,
“label”: “Large”
},
{
“value”: “fill”,
“label”: “Fill screen”
}
],
“default”: “large”
},
{
“type”: “checkbox”,
“id”: “enable_image_zoom”,
“label”: “Enable zoom”,
“default”: true
},
{
“type”: “checkbox”,
“id”: “show_thumbnails”,
“label”: “Show thumbnails”,
“info”: “Only applicable on large screens”,
“default”: true
},
{
“type”: “header”,
“content”: “Tabs”
},
{
“type”: “page”,
“id”: “tab_page_1_handle”,
“label”: “First page”
},
{
“type”: “page”,
“id”: “tab_page_2_handle”,
“label”: “Second page”
},
{
“type”: “paragraph”,
“content”: “The theme also allows you to add specific tabs for a given product only. Learn more about this feature.”
},
{
“type”: “header”,
“content”: “Reviews”
},
{
“type”: “paragraph”,
“content”: “You need to install Shopify’s free Product Reviews app before enabling this option.”
},
{
“type”: “checkbox”,
“id”: “reviews_enabled”,
“label”: “Enable”,
“default”: false
},
{
“type”: “header”,
“content”: “Wear it with”
},
{
“type”: “checkbox”,
“id”: “shop_the_look_slider”,
“label”: “Show as slider”,
“default”: false
},
{
“type”: “checkbox”,
“id”: “shop_the_look_show_product_info”,
“label”: “Show product info”,
“default”: true
},
{
“type”: “checkbox”,
“id”: “shop_the_look_show_vendor”,
“label”: “Show vendor”,
“default”: false
},
{
“type”: “checkbox”,
“id”: “shop_the_look_show_color_swatch”,
“label”: “Show color swatch”,
“info”: “Some colors appear white? Learn more.”,
“default”: false
},
{
“type”: “header”,
“content”: “Featured image”
},
{
“type”: “paragraph”,
“content”: “You can highlight an image after product tabs by adding the ALT tag "featured" to a given image. Learn more.”
},
{
“type”: “select”,
“id”: “featured_image_size”,
“label”: “Section size”,
“options”: [
{
“value”: “small”,
“label”: “Small”
},
{
“value”: “normal”,
“label”: “Normal”
},
{
“value”: “large”,
“label”: “Large”
}
],
“default”: “large”
},
{
“type”: “header”,
“content”: “Buy it with”
},
{
“type”: “paragraph”,
“content”: “You can associate products to each other using product tags. Learn more.”
},
{
“type”: “select”,
“id”: “wear_it_with_mode”,
“label”: “Display mode”,
“default”: “single”,
“options”: [
{
“value”: “single”,
“label”: “Single (row)”
},
{
“value”: “multi”,
“label”: “Multiple (slider)”
}
]
}
]
}
{% endschema %}

Hi,

Could not find anything that would cause a problem here, but I can see that another file called product-tabs is the one calling for description. Send the code from it.

I will probably reply only tomorrow tho (leaving work :D)

ah ok. here it is:

{%- assign first_page = pages[section.settings.tab_page_1_handle] -%}
{%- assign second_page = pages[section.settings.tab_page_2_handle] -%}
{%- assign third_page = pages[section.settings.tab_page_3_handle] -%}
{%- assign first_custom_page = ‘’ -%}
{%- assign second_custom_page = ‘’ -%}
{%- assign third_custom_page = ‘’ -%}
{% capture newLine %}
{% endcapture %}

{%- comment -%}
We allow to add two tabs that are extracted using the tag system. To add such a tag, simply create a page and
note the handle somewhere.
Next, add a tag to your product in this form: __tab1:page-handle or __tab2:page-handle
The theme will automatically link the tab to the page
{%- endcomment -%}

{%- assign has_unique_tab_1 = false -%}
{%- assign has_unique_tab_2 = false -%}
{%- assign has_unique_tab_3 = false -%}
{%- assign has_sizeguide_desc = false -%}

{%- comment -%}First, check the metafields{%- endcomment -%}

{%- if product.metafields.sf_product_tabs.tab_1_title != blank and product.metafields.sf_product_tabs.tab_1_content != blank -%}
{%- assign unique_tab_1_title = product.metafields.sf_product_tabs.tab_1_title -%}
{%- assign unique_tab_1_content = product.metafields.sf_product_tabs.tab_1_content -%}
{%- assign has_unique_tab_1 = true -%}
{%- endif -%}

{%- if product.metafields.sf_product_tabs.tab_2_title != blank and product.metafields.sf_product_tabs.tab_2_content != blank -%}
{%- assign unique_tab_2_title = product.metafields.sf_product_tabs.tab_2_title -%}
{%- assign unique_tab_2_content = product.metafields.sf_product_tabs.tab_2_content -%}
{%- assign has_unique_tab_2 = true -%}
{%- endif -%}

{%- if product.metafields.sf_product_tabs.tab_3_title != blank and product.metafields.sf_product_tabs.tab_3_content != blank -%}
{%- assign unique_tab_3_title = product.metafields.sf_product_tabs.tab_3_title -%}
{%- assign unique_tab_3_content = product.metafields.sf_product_tabs.tab_3_content -%}
{%- assign has_unique_tab_3 = true -%}
{%- endif -%}

{%- comment -%}
{%- if product.description != blank and product.description contains ‘

’ -%}
{%- assign sizeguide_desc_content = product.description | split: ‘

’ | last -%}
{%- assign has_sizeguide_desc = true -%}
{%- endif -%}
{%- endcomment -%}

{% for tag in product.tags %}
{% if tag contains ‘sizeguide_’ %}
{%- assign page_handle = tag | split: ‘sizeguide_’ | last -%}
{%- assign page_content = pages[page_handle].content -%}
{% if page_content != blank %}
{%- assign sizeguide_desc_content = page_content -%}
{%- assign has_sizeguide_desc = true -%}
{% endif %}
{% endif %}
{% endfor %}

{%- comment -%}Then, let’s try the tags{%- endcomment -%}

{%- for tag in product.tags -%}
{%- if tag contains ‘__tab1’ -%}
{%- assign first_custom_page = tag | split: ‘:’ | last -%}
{%- assign first_custom_page = pages[first_custom_page] -%}

{%- assign unique_tab_1_title = first_custom_page.title -%}
{%- assign unique_tab_1_content = first_custom_page.content -%}
{%- assign has_unique_tab_1 = true -%}
{%- endif -%}

{%- if tag contains ‘__tab2’ -%}
{%- assign second_custom_page = tag | split: ‘:’ | last -%}
{%- assign second_custom_page = pages[second_custom_page] -%}

{%- assign unique_tab_2_title = second_custom_page.title -%}
{%- assign unique_tab_2_content = second_custom_page.content -%}
{%- assign has_unique_tab_2 = true -%}
{%- endif -%}

{%- if tag contains ‘__tab3’ -%}
{%- assign third_custom_page = tag | split: ‘:’ | last -%}
{%- assign third_custom_page = pages[third_custom_page] -%}

{%- assign unique_tab_3_title = third_custom_page.title -%}
{%- assign unique_tab_3_content = third_custom_page.content -%}
{%- assign has_unique_tab_3 = true -%}
{%- endif -%}

{%- endfor -%}

{%- if first_page.handle != blank or second_page.handle != blank or third_page.handle != blank or has_unique_tab_1 or has_unique_tab_2 or has_unique_tab_3 or has_sizeguide_desc or section.settings.reviews_enabled -%}

{{ 'product.tabs.description' | t }}
{%- comment -%}
{{ product.description | split: '

---

' | first }}
{%- endcomment -%}
{{ product.description }}

{%- if has_sizeguide_desc -%}

{{- 'product.tabs.size_guide' | t -}}
{{- sizeguide_desc_content -}}
{%- endif -%}

{%- if has_unique_tab_1 -%}

{{- unique_tab_1_title -}}
{{- unique_tab_1_content -}}
{%- endif -%}

{%- if has_unique_tab_2 -%}

{{- unique_tab_2_title -}}
{{- unique_tab_2_content -}}
{%- endif -%}

{%- if has_unique_tab_3 -%}

{{- unique_tab_3_title -}}
{{- unique_tab_3_content -}}
{%- endif -%}

{%- if first_page != empty -%}

{{- first_page.title -}}
{{- first_page.content -}}
{%- endif -%}

{%- if second_page != empty -%}

{{- second_page.title -}}
{{- second_page.content -}}
{%- endif -%}

{%- if third_page != empty -%}

{{- third_page.title -}}
{{- third_page.content -}}
{%- endif -%}

{%- if section.settings.reviews_enabled -%}

{%- comment -%}We parse from metafields the number of reviews{%- endcomment -%} {%- assign reviews_count = product.metafields.spr.reviews | split: '' | first | times: 1 -%} {{ 'product.tabs.reviews' | t }} ({{ reviews_count | default: 0 }})
{{ product.metafields.spr.reviews }}
{%- endif -%}

{%- assign size_chart_page_handle = settings.size_chart_page | default: ‘size-chart’ -%}
{%- assign size_chart_page = pages[size_chart_page_handle] -%}

{%- if size_label contains downcase_option and size_chart_page != empty -%}

{{- ‘product.form.size_chart’ | t -}}


{%- endif -%}

{%- endif -%}

Hi,

I was able to locate the issue there. You can replace your code with the one below, this should do it.

{%- assign first_page = pages[section.settings.tab_page_1_handle] -%}
{%- assign second_page = pages[section.settings.tab_page_2_handle] -%}
{%- assign third_page = pages[section.settings.tab_page_3_handle] -%}
{%- assign first_custom_page = '' -%}
{%- assign second_custom_page = '' -%}
{%- assign third_custom_page = '' -%}
{% capture newLine %}
{% endcapture %}

{%- comment -%}
We allow to add two tabs that are extracted using the tag system. To add such a tag, simply create a page and
note the handle somewhere.
Next, add a tag to your product in this form: __tab1:page-handle or __tab2:page-handle
The theme will automatically link the tab to the page
{%- endcomment -%}

{%- assign has_unique_tab_1 = false -%}
{%- assign has_unique_tab_2 = false -%}
{%- assign has_unique_tab_3 = false -%}
{%- assign has_sizeguide_desc = false -%}

{%- comment -%}First, check the metafields{%- endcomment -%}

{%- if product.metafields.sf_product_tabs.tab_1_title != blank and product.metafields.sf_product_tabs.tab_1_content != blank -%}
{%- assign unique_tab_1_title = product.metafields.sf_product_tabs.tab_1_title -%}
{%- assign unique_tab_1_content = product.metafields.sf_product_tabs.tab_1_content -%}
{%- assign has_unique_tab_1 = true -%}
{%- endif -%}

{%- if product.metafields.sf_product_tabs.tab_2_title != blank and product.metafields.sf_product_tabs.tab_2_content != blank -%}
{%- assign unique_tab_2_title = product.metafields.sf_product_tabs.tab_2_title -%}
{%- assign unique_tab_2_content = product.metafields.sf_product_tabs.tab_2_content -%}
{%- assign has_unique_tab_2 = true -%}
{%- endif -%}

{%- if product.metafields.sf_product_tabs.tab_3_title != blank and product.metafields.sf_product_tabs.tab_3_content != blank -%}
{%- assign unique_tab_3_title = product.metafields.sf_product_tabs.tab_3_title -%}
{%- assign unique_tab_3_content = product.metafields.sf_product_tabs.tab_3_content -%}
{%- assign has_unique_tab_3 = true -%}
{%- endif -%}

{%- comment -%}
{%- if product.description != blank and product.description contains '

---

' -%}
{%- assign sizeguide_desc_content = product.description | split: '

---

' | last -%}
{%- assign has_sizeguide_desc = true -%}
{%- endif -%}
{%- endcomment -%}

{% for tag in product.tags %}
{% if tag contains 'sizeguide_' %}
{%- assign page_handle = tag | split: 'sizeguide_' | last -%}
{%- assign page_content = pages[page_handle].content -%}
{% if page_content != blank %}
{%- assign sizeguide_desc_content = page_content -%}
{%- assign has_sizeguide_desc = true -%}
{% endif %}
{% endif %}
{% endfor %}

{%- comment -%}Then, let's try the tags{%- endcomment -%}

{%- for tag in product.tags -%}
{%- if tag contains '__tab1' -%}
{%- assign first_custom_page = tag | split: ':' | last -%}
{%- assign first_custom_page = pages[first_custom_page] -%}

{%- assign unique_tab_1_title = first_custom_page.title -%}
{%- assign unique_tab_1_content = first_custom_page.content -%}
{%- assign has_unique_tab_1 = true -%}
{%- endif -%}

{%- if tag contains '__tab2' -%}
{%- assign second_custom_page = tag | split: ':' | last -%}
{%- assign second_custom_page = pages[second_custom_page] -%}

{%- assign unique_tab_2_title = second_custom_page.title -%}
{%- assign unique_tab_2_content = second_custom_page.content -%}
{%- assign has_unique_tab_2 = true -%}
{%- endif -%}

{%- if tag contains '__tab3' -%}
{%- assign third_custom_page = tag | split: ':' | last -%}
{%- assign third_custom_page = pages[third_custom_page] -%}

{%- assign unique_tab_3_title = third_custom_page.title -%}
{%- assign unique_tab_3_content = third_custom_page.content -%}
{%- assign has_unique_tab_3 = true -%}
{%- endif -%}

{%- endfor -%}

{%- comment -%}

{{ product.description | split: '

---

' | first }}

{%- endcomment -%}

{{ product.description }}

{%- if has_sizeguide_desc -%}

{{- sizeguide_desc_content -}}

{%- endif -%}

{%- if has_unique_tab_1 -%}

{{- unique_tab_1_content -}}

{%- endif -%}

{%- if has_unique_tab_2 -%}

{{- unique_tab_2_content -}}

{%- endif -%}

{%- if has_unique_tab_3 -%}

{{- unique_tab_3_content -}}

{%- endif -%}

{%- if first_page != empty -%}

{{- first_page.content -}}

{%- endif -%}

{%- if second_page != empty -%}

{{- second_page.content -}}

{%- endif -%}

{%- if third_page != empty -%}

{{- third_page.content -}}

{%- endif -%}

{%- if section.settings.reviews_enabled -%}

{%- comment -%}We parse from metafields the number of reviews{%- endcomment -%}
{%- assign reviews_count = product.metafields.spr.reviews | split: '' | first | times: 1 -%}

{{ product.metafields.spr.reviews }}

{%- endif -%}

{%- assign size_chart_page_handle = settings.size_chart_page | default: 'size-chart' -%}
{%- assign size_chart_page = pages[size_chart_page_handle] -%}

{%- if size_label contains downcase_option and size_chart_page != empty -%}

{%- endif -%}