Streamline Theme - description tab always open

hi, I need help. Is there a way to make the description tab always open? When I enter the product page it is always closed

Enlace web: https://aneven.co/

1 Like

Hi @Deiby ,

Please send me the code of product-additional-content.liquid file, I will help you to check and add it

1 Like
Hello, sorry, I can't find a file with that name, maybe it has another name?
I share the product-template.liquid file in case it is necessary

{%- liquid
assign current_variant = product.selected_or_first_available_variant

assign product_zoom_size = ‘1800x1800’
assign product_image_size = ‘620x’

assign enableHistory = true
if isModal
assign enableHistory = false
endif

case image_container_width
when ‘small’
assign product_image_width = ‘medium-up–two-fifths’
assign product_description_width = ‘medium-up–three-fifths’
assign product_image_size = ‘480x’
when ‘medium’
assign product_image_width = ‘medium-up–one-half’
assign product_description_width = ‘medium-up–one-half’
assign product_image_size = ‘620x’
when ‘large’
assign product_image_width = ‘medium-up–three-fifths’
assign product_description_width = ‘medium-up–two-fifths’
assign product_image_size = ‘740x’
endcase
-%}

{%- liquid
assign connect_to_sizechart = false

for block in section.blocks
if block.type == ‘size_chart’
assign sizechart_index = forloop.index0
assign next_block_index = sizechart_index | plus: 1
assign variant_block = section.blocks[next_block_index]

if variant_block.type == ‘variant_picker’ and variant_block.settings.picker_type == ‘button’ and product.has_only_default_variant == false
for option in product.options_with_values
assign size_trigger = ‘products.general.size_trigger’ | t | downcase
assign downcased_option = option.name | downcase

if downcased_option contains size_trigger
assign connect_to_sizechart = true
endif
endfor
endif

endif
endfor
-%}

{%- render ‘product-template-variables’, product: product, current_variant: current_variant -%}

{%- render 'product-images', section_id: section_id, product: product, product_image_type: product_image_type, product_zoom_enable: product_zoom_enable, product_zoom_size: product_zoom_size, product_image_size: product_image_size, isModal: isModal, video_looping: video_looping, video_style: video_style -%}
{%- if settings.vendor_enable -%}
{%- assign vendor_handle = product.vendor | handleize -%} {%- if collections[vendor_handle] != empty -%} {{ collections[vendor_handle].title }} {%- else -%} {{ product.vendor | link_to_vendor }} {%- endif -%}
{%- endif -%}

{%- if sku_enable -%}

{%- if current_variant.sku -%} {{ current_variant.sku }} {%- endif -%}

{%- endif -%}

{%- if isModal -%}

{{ product.title }}

{%- else -%}

{%- unless product.empty? -%} {{ product.title }} {%- else -%} {{ 'home_page.onboarding.product_title' | t }} {%- endunless -%}

{%- endif -%}
{% capture form_id %}AddToCartForm-{{ section_id }}{% endcapture %} {%- if blocks -%} {%- for block in blocks -%} {%- case block.type -%} {%- when '@app' -%} {% render block %} {%- when 'separator' -%}

{%- when 'text' -%}
{{ block.settings.text }}
{%- when 'tab' -%}
{% assign tab_id = block.id | append: product.id %} {% capture tab_content %} {{ block.settings.content }} {{ block.settings.page.content }} {% endcapture %} {%- render 'tab', id: tab_id, title: block.settings.title, content: tab_content -%}
{%- when 'contact' -%}
{% assign tab_id = block.id | append: product.id %} {% assign tab_id = block.id | append: product.id %} {%- render 'tab-contact', id: tab_id, block: block -%}
{%- when 'description' -%}
{%- assign id = block.id | append: product.id -%} {%- render 'product-description', id: id, product: product, is_tab: block.settings.is_tab -%}
{%- when 'price' -%}
{%- if product.compare_at_price_max > product.price -%} {%- liquid assign hide_sale_price = true if current_variant.compare_at_price assign hide_sale_price = false endif -%} {{ 'products.general.regular_price' | t }} {%- if current_variant.compare_at_price > current_variant.price -%} {{ current_variant.compare_at_price | money }} {%- endif -%} {{ 'products.general.sale_price' | t }} {%- else -%} {{ 'products.general.regular_price' | t }} {%- endif -%}


{%- unless product.empty? -%}
{{ current_variant.price | money }}
{%- else -%}
{{ 1999 | money }}
{%- endunless -%}

{%- capture unit_price_base_unit -%} {%- if current_variant.unit_price_measurement -%} {%- if current_variant.unit_price_measurement.reference_value != 1 -%} {{ current_variant.unit_price_measurement.reference_value }} {%- endif -%} {{ current_variant.unit_price_measurement.reference_unit }} {%- endif -%} {%- endcapture -%}

{{ current_variant.unit_price | money }}/{{ unit_price_base_unit }}

{%- if shop.taxes_included or shop.shipping_policy.body != blank -%}

{%- if shop.taxes_included -%} {{ 'products.product.include_taxes' | t }} {%- endif -%} {%- if shop.shipping_policy.body != blank -%} {{ 'products.product.shipping_policy_html' | t: link: shop.shipping_policy.url }} {%- endif -%}
{%- endif -%}
{%- when 'quantity_selector' -%}
{{ 'products.product.quantity' | t }}
{%- when 'size_chart' -%} {% if connect_to_sizechart == false %} {%- capture size_chart_title -%} {{ 'products.general.size_chart' | t }}.a{fill:none;stroke:#000;stroke-width:2px} {%- endcapture -%}
{%- render 'tool-tip-trigger', title: size_chart_title, content: block.settings.size_chart.content, context: 'size-chart', mobile_style: 'display: block; text-align: center;' -%} {% style %} @media (max-width: 768px) { tool-tip-trigger { display: block; text-align: center; } } {% endstyle %}
{% endif %} {%- when 'variant_picker' -%}
{%- unless product.has_only_default_variant -%} {%- for option in product.options_with_values -%} {%- if block.settings.color_swatches -%} {%- assign is_color = false -%} {%- assign color_option_index = 0 -%} {%- assign swatch_trigger = 'products.general.color_swatch_trigger' | t | downcase-%} {%- assign color_option_index = forloop.index0 -%} {%- assign downcased_option = option.name | downcase -%} {%- if downcased_option contains swatch_trigger -%} {%- assign is_color = true -%} {%- elsif swatch_trigger == 'color' and downcased_option contains 'colour' -%} {%- assign is_color = true -%} {%- endif -%} {%- endif -%}

{%- if block.settings.picker_type == ‘button’ -%}
{%- render ‘variant-button’,
block: block,
product: product,
form_id: form_id,
section_id: section_id,
variant_labels: block.settings.variant_labels,
option: option,
forloop: forloop,
is_color: is_color,
color_option_index: color_option_index,
connect_to_sizechart: connect_to_sizechart,
sizechart_index: sizechart_index
-%}
{%- else -%}
{%- render ‘variant-dropdown’,
product: product,
form_id: form_id,
section_id: section_id,
variant_labels: block.settings.variant_labels,
option: option,
forloop: forloop
-%}
{%- endif -%}
{%- endfor -%}
{%- endunless -%}

{%- when 'buy_buttons' -%}
{%- unless product.empty? -%}
{%- render 'product-form', form_id: form_id, section_id: section_id, product: product, show_dynamic_checkout: block.settings.show_dynamic_checkout, current_variant: current_variant -%}
{%- endunless -%}

{%- if block.settings.surface_pickup_enable -%}

{%- endif -%}
{%- when 'sales_point' -%} {%- unless block.settings.text == blank -%}
  • {% case block.settings.icon %} {% when 'checkmark' %} .a{fill:none;stroke:#000;stroke-width:2px} {% when 'gift' %} .a{fill:none;stroke:#000;stroke-width:2px} {% when 'globe' %} .a{fill:none;stroke:#000;stroke-width:2px} {% when 'heart' %} .a{fill:none;stroke:#000;stroke-width:2px} {% when 'leaf' %} .a{fill:none;stroke:#000;stroke-miterlimit:10;stroke-width:2px} {% when 'lock' %} .a{fill:none;stroke:#000;stroke-width:2px} {% when 'package' %} {% when 'phone' %} {% when 'ribbon' %} .a{fill:none;stroke:#000;stroke-width:2px} {% when 'shield' %} .a{fill:none;stroke:#000;stroke-width:2px} {% when 'tag' %} .a{fill:none;stroke:#000;stroke-width:2px} {% when 'truck' %} .a{fill:none;stroke:#000;stroke-miterlimit:10;stroke-width:2px} {% endcase %} {{ block.settings.text }}
{%- endunless -%} {%- when 'inventory_status' -%} {%- render 'product-inventory', section_id: section_id, product: product, current_variant: current_variant, block: block -%} {%- when 'share' -%}
{%- render 'social-sharing', share_title: product.title, share_permalink: product.url, share_image: product -%}
{%- when 'trust_badge' -%}
{%- assign img_url = block.settings.trust_image | img_url: '1x1' | replace: '_1x1.', '_{width}x.' -%} {{ block.settings.trust_image.alt }} {{ block.settings.trust_image.alt }}
{%- when 'custom' -%}
{{ block.settings.code }}
{%- endcase -%} {%- endfor -%} {%- else -%}
{%- endif -%}

Hi @Deiby ,

Please send me the code of product-template.liquid file

1 Like

{%- liquid
assign current_variant = product.selected_or_first_available_variant

assign product_zoom_size = ‘1800x1800’
assign product_image_size = ‘620x’

assign enableHistory = true
if isModal
assign enableHistory = false
endif

case image_container_width
when ‘small’
assign product_image_width = ‘medium-up–two-fifths’
assign product_description_width = ‘medium-up–three-fifths’
assign product_image_size = ‘480x’
when ‘medium’
assign product_image_width = ‘medium-up–one-half’
assign product_description_width = ‘medium-up–one-half’
assign product_image_size = ‘620x’
when ‘large’
assign product_image_width = ‘medium-up–three-fifths’
assign product_description_width = ‘medium-up–two-fifths’
assign product_image_size = ‘740x’
endcase
-%}

{%- liquid
assign connect_to_sizechart = false

for block in section.blocks
if block.type == ‘size_chart’
assign sizechart_index = forloop.index0
assign next_block_index = sizechart_index | plus: 1
assign variant_block = section.blocks[next_block_index]

if variant_block.type == ‘variant_picker’ and variant_block.settings.picker_type == ‘button’ and product.has_only_default_variant == false
for option in product.options_with_values
assign size_trigger = ‘products.general.size_trigger’ | t | downcase
assign downcased_option = option.name | downcase

if downcased_option contains size_trigger
assign connect_to_sizechart = true
endif
endfor
endif

endif
endfor
-%}

{%- render ‘product-template-variables’, product: product, current_variant: current_variant -%}

{%- render 'product-images', section_id: section_id, product: product, product_image_type: product_image_type, product_zoom_enable: product_zoom_enable, product_zoom_size: product_zoom_size, product_image_size: product_image_size, isModal: isModal, video_looping: video_looping, video_style: video_style -%}
{%- if settings.vendor_enable -%}
{%- assign vendor_handle = product.vendor | handleize -%} {%- if collections[vendor_handle] != empty -%} {{ collections[vendor_handle].title }} {%- else -%} {{ product.vendor | link_to_vendor }} {%- endif -%}
{%- endif -%}

{%- if sku_enable -%}

{%- if current_variant.sku -%} {{ current_variant.sku }} {%- endif -%}

{%- endif -%}

{%- if isModal -%}

{{ product.title }}

{%- else -%}

{%- unless product.empty? -%} {{ product.title }} {%- else -%} {{ 'home_page.onboarding.product_title' | t }} {%- endunless -%}

{%- endif -%}
{% capture form_id %}AddToCartForm-{{ section_id }}{% endcapture %} {%- if blocks -%} {%- for block in blocks -%} {%- case block.type -%} {%- when '@app' -%} {% render block %} {%- when 'separator' -%}

{%- when 'text' -%}
{{ block.settings.text }}
{%- when 'tab' -%}
{% assign tab_id = block.id | append: product.id %} {% capture tab_content %} {{ block.settings.content }} {{ block.settings.page.content }} {% endcapture %} {%- render 'tab', id: tab_id, title: block.settings.title, content: tab_content -%}
{%- when 'contact' -%}
{% assign tab_id = block.id | append: product.id %} {% assign tab_id = block.id | append: product.id %} {%- render 'tab-contact', id: tab_id, block: block -%}
{%- when 'description' -%}
{%- assign id = block.id | append: product.id -%} {%- render 'product-description', id: id, product: product, is_tab: block.settings.is_tab -%}
{%- when 'price' -%}
{%- if product.compare_at_price_max > product.price -%} {%- liquid assign hide_sale_price = true if current_variant.compare_at_price assign hide_sale_price = false endif -%} {{ 'products.general.regular_price' | t }} {%- if current_variant.compare_at_price > current_variant.price -%} {{ current_variant.compare_at_price | money }} {%- endif -%} {{ 'products.general.sale_price' | t }} {%- else -%} {{ 'products.general.regular_price' | t }} {%- endif -%}


{%- unless product.empty? -%}
{{ current_variant.price | money }}
{%- else -%}
{{ 1999 | money }}
{%- endunless -%}

{%- capture unit_price_base_unit -%} {%- if current_variant.unit_price_measurement -%} {%- if current_variant.unit_price_measurement.reference_value != 1 -%} {{ current_variant.unit_price_measurement.reference_value }} {%- endif -%} {{ current_variant.unit_price_measurement.reference_unit }} {%- endif -%} {%- endcapture -%}

{{ current_variant.unit_price | money }}/{{ unit_price_base_unit }}

{%- if shop.taxes_included or shop.shipping_policy.body != blank -%}

{%- if shop.taxes_included -%} {{ 'products.product.include_taxes' | t }} {%- endif -%} {%- if shop.shipping_policy.body != blank -%} {{ 'products.product.shipping_policy_html' | t: link: shop.shipping_policy.url }} {%- endif -%}
{%- endif -%}
{%- when 'quantity_selector' -%}
{{ 'products.product.quantity' | t }}
{%- when 'size_chart' -%} {% if connect_to_sizechart == false %} {%- capture size_chart_title -%} {{ 'products.general.size_chart' | t }}.a{fill:none;stroke:#000;stroke-width:2px} {%- endcapture -%}
{%- render 'tool-tip-trigger', title: size_chart_title, content: block.settings.size_chart.content, context: 'size-chart', mobile_style: 'display: block; text-align: center;' -%} {% style %} @media (max-width: 768px) { tool-tip-trigger { display: block; text-align: center; } } {% endstyle %}
{% endif %} {%- when 'variant_picker' -%}
{%- unless product.has_only_default_variant -%} {%- for option in product.options_with_values -%} {%- if block.settings.color_swatches -%} {%- assign is_color = false -%} {%- assign color_option_index = 0 -%} {%- assign swatch_trigger = 'products.general.color_swatch_trigger' | t | downcase-%} {%- assign color_option_index = forloop.index0 -%} {%- assign downcased_option = option.name | downcase -%} {%- if downcased_option contains swatch_trigger -%} {%- assign is_color = true -%} {%- elsif swatch_trigger == 'color' and downcased_option contains 'colour' -%} {%- assign is_color = true -%} {%- endif -%} {%- endif -%}

{%- if block.settings.picker_type == ‘button’ -%}
{%- render ‘variant-button’,
block: block,
product: product,
form_id: form_id,
section_id: section_id,
variant_labels: block.settings.variant_labels,
option: option,
forloop: forloop,
is_color: is_color,
color_option_index: color_option_index,
connect_to_sizechart: connect_to_sizechart,
sizechart_index: sizechart_index
-%}
{%- else -%}
{%- render ‘variant-dropdown’,
product: product,
form_id: form_id,
section_id: section_id,
variant_labels: block.settings.variant_labels,
option: option,
forloop: forloop
-%}
{%- endif -%}
{%- endfor -%}
{%- endunless -%}

{%- when 'buy_buttons' -%}
{%- unless product.empty? -%}
{%- render 'product-form', form_id: form_id, section_id: section_id, product: product, show_dynamic_checkout: block.settings.show_dynamic_checkout, current_variant: current_variant -%}
{%- endunless -%}

{%- if block.settings.surface_pickup_enable -%}

{%- endif -%}
{%- when 'sales_point' -%} {%- unless block.settings.text == blank -%}
  • {% case block.settings.icon %} {% when 'checkmark' %} .a{fill:none;stroke:#000;stroke-width:2px} {% when 'gift' %} .a{fill:none;stroke:#000;stroke-width:2px} {% when 'globe' %} .a{fill:none;stroke:#000;stroke-width:2px} {% when 'heart' %} .a{fill:none;stroke:#000;stroke-width:2px} {% when 'leaf' %} .a{fill:none;stroke:#000;stroke-miterlimit:10;stroke-width:2px} {% when 'lock' %} .a{fill:none;stroke:#000;stroke-width:2px} {% when 'package' %} {% when 'phone' %} {% when 'ribbon' %} .a{fill:none;stroke:#000;stroke-width:2px} {% when 'shield' %} .a{fill:none;stroke:#000;stroke-width:2px} {% when 'tag' %} .a{fill:none;stroke:#000;stroke-width:2px} {% when 'truck' %} .a{fill:none;stroke:#000;stroke-miterlimit:10;stroke-width:2px} {% endcase %} {{ block.settings.text }}
{%- endunless -%} {%- when 'inventory_status' -%} {%- render 'product-inventory', section_id: section_id, product: product, current_variant: current_variant, block: block -%} {%- when 'share' -%}
{%- render 'social-sharing', share_title: product.title, share_permalink: product.url, share_image: product -%}
{%- when 'trust_badge' -%}
{%- assign img_url = block.settings.trust_image | img_url: '1x1' | replace: '_1x1.', '_{width}x.' -%} {{ block.settings.trust_image.alt }} {{ block.settings.trust_image.alt }}
{%- when 'custom' -%}
{{ block.settings.code }}
{%- endcase -%} {%- endfor -%} {%- else -%}
{%- endif -%}
I send it to you in a text document

Hi @Deiby ,

Please send me the code of tab.liquid file, it is a file containing all the code, I will help you edit the code here.

1 Like

Hi @LitCommerce

{%- liquid
assign output_tab = true
if title == blank and content == blank
assign output_tab = false
endif
-%}
{%- if output_tab -%}

{{ title }} {%- render 'collapsible-icons' -%}
{{ content }}
{%- endif -%}

Hi @Deiby ,

Please change all code:

{%- liquid
assign output_tab = true
if title == blank and content == blank
assign output_tab = false
endif
if title == 'DescripciĂłn'
assign force_open = true
endif
-%}
{%- if output_tab -%}

  
  

    

      {{ content }}
    

  

{%- endif -%}

Hope it helps!

1 Like

Hello @LitCommerce

I have the same issue - can you please help me?

Thanks

For future reference. You can disable the option “Tabs as accordion” in Products → Product information → Layout.
I am sure all themes have a similar option. I never knew themes had user manuals.
https://softalib4.gitbook.io/minion-shopify-theme/products#layout

Hi, I have the same problem, can you figure out where to locate the problem in this file? This is my product-additional-content.liquid file.

{%- assign blockId = block.id -%}
{% if product %}
{%- assign blockId = block.id | append: product.id -%}
{% endif %}

{%- assign has_custom_tabs = false -%}
{% for tag in product.tags %}
{% if tag contains ‘_tab’ %}
{%- assign has_custom_tabs = true -%}
{% endif %}
{% endfor %}

{% if settings.product_content_1 != blank or settings.product_content_2 != blank or settings.product_content_3 != blank or settings.product_contact or has_custom_tabs or product.description %}

{% if product.description or product.empty? %}

{{ ‘products.product.description’ | t }}
{% include ‘collapsible-icons’ %}

{% if product.empty? %} {{ 'home_page.onboarding.product_description' | t }} {% else %} {{ product.description }} {% endif %}
{% include 'product-features' %}
{% endif %}

{% for tag in product.tags %}
{% if tag contains ‘tab’ %}
{%- assign include_page_handle = tag | split: '
’ -%}
{%- assign include_page = pages[include_page_handle.last] -%}
{% if include_page.title != blank %}

{{ include_page.title }}
{% include ‘collapsible-icons’ %}

{{ include_page.content }}
{% endif %} {% endif %} {% endfor %}

{% if settings.product_content_1 != blank %}

{{ pages[settings.product_content_1].title }}
{% include ‘collapsible-icons’ %}

{{ pages[settings.product_content_1].content }}
{% endif %} {% if settings.product_content_2 != blank %} {{ pages[settings.product_content_2].title }} {% include 'collapsible-icons' %}
{{ pages[settings.product_content_2].content }}
{% endif %} {% if settings.product_content_3 != blank %} {{ pages[settings.product_content_3].title }} {% include 'collapsible-icons' %}
{{ pages[settings.product_content_3].content }}
{% endif %}

{% if settings.product_contact %}
{% form ‘contact’ %}

{{ settings.product_contact_title }} {% include 'collapsible-icons' %}
{{ 'contact.form.name' | t }}
{{ 'contact.form.email' | t }}

{% if settings.product_contact_show_phone %}
{{ ‘contact.form.phone’ | t }}

{% endif %}

{{ ‘contact.form.message’ | t }}

{% if form.body %}{{ form.body }}{% endif %} {{ 'contact.form.send' | t }}

{% if form.posted_successfully? %}

{{ 'contact.form.post_success' | t }}

{% endif %}

{% if form.errors %}
{{ form.errors | default_errors }}
{% endif %}

{% endform %}
{% endif %}

{% endif %}

You can disable the option “Tabs as accordion” in Products → Product information → Layout.
I am sure all themes have a similar option. I never knew themes had user manuals.
https://softalib4.gitbook.io/minion-shopify-theme/products#layout

This does not work on my theme… I´m using Streamline.