Hello,
I would like to hide prices from specific product template, both on product page and collection page, how can I do this?
This is the section code:
<div id="section-{{ section.id }}" class="site-box-container container--fullscreen box--can-stick product--section" data-collection="{{ collection.handle }}" data-gallery-size="{{ product.media.size }}" data-id="{{ product.id }}" data-hide-variants="{{ section.settings.hide_variants }}" data-product-available="{{ product.available }}" {%- if product.has_only_default_variant -%} data-single-variant="true" {%- endif -%}>
<div class="site-box box--big lap--box--bigger box--typo-big box--no-padding box__product-gallery {{ section.settings.gallery_style }}" data-lap="box--bigger" data-order="0" data-images="{{ product.media.size }}" data-show-progress="{{ section.settings.show_gallery_progress }}" data-images-aspect="{{ section.settings.gallery_resize }}">
<div class="site-box-content" data-video-looping="{{ section.settings.enable_video_looping }}" data-size="{{ product.media.size }}">
{% if product.media.size == 0 %}
<div class="gallery-item" data-product-media-type="image">
<span class="onboarding-svg">{{ 'product-1' | placeholder_svg_tag }}</span>
</div>
{% else %}
{%- for media in product.media -%}
{%- render 'product-media', media: media, enable_zoom: section.settings.gallery_zoom, index: forloop.index0 -%}
{%- endfor -%}
{%- endif -%}
{%- assign first_3d_model = product.media | where: "media_type", "model" | first -%}
{%- if first_3d_model -%}
<button
aria-label="{{ 'product.view_in_space_label' | t }}"
class="product__view-in-space"
data-shopify-xr
data-shopify-first-model3d-id="{{ first_3d_model.id }}"
data-shopify-model3d-id="{{ first_3d_model.id }}"
data-shopify-title="{{ product.title | escape }}"
data-shopify-xr-hidden
>{%- render 'theme-symbols', icon: 'model_button' -%}
<span class='product__view-in-space-text'>{{ 'product.view_in_space' | t }}</span>
</button>
{% endif %}
</div>
</div>
<div class="site-box box--big lap--box--bigger box--typo-big box--center-align box--column-flow box__product-content" data-lap="box--bigger" data-order="1">
<div class="site-box-content fix-me-with-margin">
{% render 'product-breadcrumb' %}<h1 class="product-title">{{ product.title | escape }}</h1>
{% assign current_variant = product.selected_or_first_available_variant %}
<span class="variant-sku hide">{{ current_variant.sku | escape }}</span>
{% if section.settings.product_vendor_enabled %}
{%- capture vendor -%} {{ product.vendor | link_to_vendor }} {%- endcapture -%}
<p class="product-vendor">{{ 'product.vendor_html' | t: vendor: vendor }}</p>
{% endif %}
{%- assign variant = product.selected_or_first_available_variant -%}
<div class="price-reviews rtl">
<span class="price">
{% render 'product-badge', product: product %}
<div style="display: inline-block;">
<span class="product-price">{{ product.price | money }}</span>
<span class="info compare-price">
{% if product.compare_at_price > product.price %}
{{ product.compare_at_price | money }}
{%- endif -%}
</span>
{% if variant.unit_price_measurement %}
<span class="unit-price">
{{ variant.unit_price | money }} /
{%- if variant.unit_price_measurement.reference_value != 1 -%}
{{ variant.unit_price_measurement.reference_value }}
{%- endif -%}
{{ variant.unit_price_measurement.reference_unit }}
</span>
{% endif %}
</div>
</span>
{% if section.settings.show_reviews_badge %}
<a class="review" href="#shopify-product-reviews">
<span class="shopify-product-reviews-badge" data-id="{{ product.id }}"></span>
</a>
{% endif %}
</div>
{% if section.settings.show_tax_info %}
{%- if shop.taxes_included or shop.shipping_policy.body != blank -%}
<div class="product-policies" data-product-policies>
{% if shop.taxes_included %}
{{ 'product.include_taxes' | t }}
{%- endif -%}
{%- if shop.shipping_policy.body != blank -%}
{{ 'product.shipping_policy_html' | t: link: shop.shipping_policy.url }}
{%- endif -%}
</div>
{% endif %}
{%- endif -%}
<div class="offers">
<div id="add-to-cart-{{ section.id }}" class="product--add-to-cart-form style--{{ section.settings.variants_style }}" data-type="{{ settings.cart_action }}">
{%- form 'product', product -%}
<div class="product-variants-holder" {% if product.has_only_default_variant %} style="display:none;" {% endif %}>
{% for option in product.options_with_values %}
<div class="product-variant selector-wrapper hidden">
<label for="product-{{ option.name | downcase | strip }}">{{ option.name | escape }}</label>
<select class="product-variants" id="product-{{ option.name | downcase | strip }}">
{% for value in option.values %}
<option value="{{ value | escape }}" {% if option.selected_value == value %}selected{% endif %}>{{ value | escape }}</option>
{% endfor %}
</select>
</div>
{% endfor %}
</div>
<select id="productSelect" name="id" class="styled" style="display: none;">
{% for variant in product.variants %}
{%- if variant.available -%}
<option {% if variant == product.selected_or_first_available_variant %} selected="selected" {% endif %} value="{{ variant.id }}" {% if section.settings.show_quantities and variant.inventory_management != null %} data-quantity="{{ variant.inventory_quantity }}" data-inventory="{{ variant.inventory_policy }}" {% endif %}>
{{ variant.title | escape }}
</option>
{% else %}
<option disabled="disabled">{{ variant.title | escape }}</option>
{% endif %}
{%- endfor -%}
</select>
{%- assign enable_payment_button = section.settings.enable_payment_button -%}
{%- if product.tags contains 'preorder' -%}
{%- assign enable_payment_button = false -%}
{%- endif -%}
<div class="cart-functions payment-button--{{ enable_payment_button }}">
{% render 'product-quantity', quantity_selector: section.settings.quantity_selector, enable_payment_button: enable_payment_button %}
<div class="shopify-payment-button" style="text-align: center;">
<div>
<div>
<a href="/pages/contact-us">
<div class="shopify-payment-button__button shopify-payment-button__button--unbranded">
<font style="vertical-align: inherit;">
<font style="vertical-align: inherit;">יצירת קשר להזמנה אישית</font>
</font>
</div>
</a>
</div>
</div>
</div>
</div>
<span class="variant-quantity" {% if product.tags contains 'preorder' %} style="display: none; {% endif %}"></span>
{%- if product.tags contains 'preorder' -%}
<span style="display: block !important; opacity: .66; margin-top: 30px; width: 100%;">{{ 'product.pre_order_text' | t }}</span>
{%- endif -%}
{%- endform -%}
{%- if section.settings.show_local_pickup -%}
<div class="product-availability-container" data-store-availability-container data-base-url="{{ shop.url }}{{ routes.root_url }}"></div>
{%- endif -%}
</div>
</div>
<div class="rte extract-images">
{%- if section.settings.enable_product_gallery -%}
<style type="text/css">.extract-images img:not(.dont-extract) { display: none; }</style>
{%- assign img_tag = '<' | append: 'img' -%}
{%- assign product_description = product.description -%}
{%- if product.description contains img_tag -%}
{%- assign images = product.description | split: 'src="' -%}
{%- assign images_in_context = '' | split : '' -%}
{%- for image in images -%}
{%- unless forloop.first -%}
{%- assign src=image | split: '"' | first | remove: 'https:' | remove: 'http:' -%}
{%- assign img_sizes = "_pico,_icon,_thumb,_small,_compact,_medium,_large,_grande,_100x100,_160x160,_240x240,_480x480,_640x640,_1024x1024,_2048x2048" | split: "," -%}
{%- assign src_cleaned = src -%}
{%- for size in img_sizes -%}
{%- if src contains size -%}
{%- assign src_cleaned = src | replace: size, '' -%}
{%- endif -%}
{%- endfor -%}
{%- assign img_path = src_cleaned | split: "/" -%}
{%- assign img_name = img_path | last | split: "?" -%}
{%- assign my_img = img_name | first | file_img_url: '10x' -%}
{%- assign product_description = product_description | replace: src, my_img -%}
{%- endunless -%}
{%- endfor -%}
{%- endif -%}
<div class="product-description">
{{ product.description }}
</div>
{%- else -%}
<div class="product-description">
{{ product.description }}
</div>
{%- endif -%}
{%- if section.blocks.size > 0 -%}
<div class="krown-tabs" data-design="{{ section.settings.tabs_style }}">
<div class="titles">
<!-- CUSTOM FAQ - FIRST -->
{%- if product.metafields.global.additional_faq_title_1 != blank and product.metafields.global.additional_faq_desc_1 != blank -%}
<h5 class="krown-tab-title" {{ block.shopify_attributes }}>
{{ product.metafields.global.additional_faq_title_1 | escape }}
{%- if section.settings.tabs_style == 'toggles' -%}
<span class="minus"><svg version="1.0" class="svg minus" xmlns="//
www.w3.org/2000/svg" xmlns:xlink="//
www.w3.org /1999/xlink" x="0px" y="0px" width="10px" height="10px" viewBox="0 0 10 10" enable-background="new 0 0 10 10" xml:space="preserve"><rect y="4" width="10" height="2"/></svg></span>
<span class="plus"><svg version="1.0" class="svg minus" xmlns="//
www.w3.org/2000/svg" xmlns:xlink="//
www.w3.org /1999/xlink" x="0px" y="0px" width="10px" height="10px" viewBox="0 0 10 10" enable-background="new 0 0 10 10" xml:space="preserve"><rect y="4" width="10" height="2"/><rect y="4" width="10" height="2" style="transform: rotate(-90deg);transform-origin: center;"/></svg></span>
{% endif %}
</h5>
{%- endif -%}
<!-- CUSTOM FAQ - FIRST // END -->
<!-- CUSTOM FAQ - SECOND -->
{%- if product.metafields.global.additional_faq_title_2 != blank and product.metafields.global.additional_faq_desc_2 != blank -%}
<h5 class="krown-tab-title" {{ block.shopify_attributes }}>
{{ product.metafields.global.additional_faq_title_2 | escape }}
{%- if section.settings.tabs_style == 'toggles' -%}
<span class="minus"><svg version="1.0" class="svg minus" xmlns="//
www.w3.org/2000/svg" xmlns:xlink="//
www.w3.org /1999/xlink" x="0px" y="0px" width="10px" height="10px" viewBox="0 0 10 10" enable-background="new 0 0 10 10" xml:space="preserve"><rect y="4" width="10" height="2"/></svg></span>
<span class="plus"><svg version="1.0" class="svg minus" xmlns="//
www.w3.org/2000/svg" xmlns:xlink="//
www.w3.org /1999/xlink" x="0px" y="0px" width="10px" height="10px" viewBox="0 0 10 10" enable-background="new 0 0 10 10" xml:space="preserve"><rect y="4" width="10" height="2"/><rect y="4" width="10" height="2" style="transform: rotate(-90deg);transform-origin: center;"/></svg></span>
{% endif %}
</h5>
{%- endif -%}
<!-- CUSTOM FAQ - SECOND // END -->
{% for block in section.blocks %}
<h5 class="krown-tab-title" {{ block.shopify_attributes }}>
{{ block.settings.title | escape }}
{%- if section.settings.tabs_style == 'toggles' -%}
<span class="minus"><svg version="1.0" class="svg minus" xmlns="//
www.w3.org/2000/svg" xmlns:xlink="//
www.w3.org /1999/xlink" x="0px" y="0px" width="10px" height="10px" viewBox="0 0 10 10" enable-background="new 0 0 10 10" xml:space="preserve"><rect y="4" width="10" height="2"/></svg></span>
<span class="plus"><svg version="1.0" class="svg minus" xmlns="//
www.w3.org/2000/svg" xmlns:xlink="//
www.w3.org /1999/xlink" x="0px" y="0px" width="10px" height="10px" viewBox="0 0 10 10" enable-background="new 0 0 10 10" xml:space="preserve"><rect y="4" width="10" height="2"/><rect y="4" width="10" height="2" style="transform: rotate(-90deg);transform-origin: center;"/></svg></span>
{% endif %}
</h5>
{% endfor %}
</div>
<div class="contents">
<!-- CUSTOM FAQ - FIRST CONTENT -->
{%- if product.metafields.global.additional_faq_title_1 != blank and product.metafields.global.additional_faq_desc_1 != blank -%}
<div class="tab">
<p>{{ product.metafields.global.additional_faq_desc_1 }}</p>
{%- unless block.settings.image == blank -%}
<a href="{{ block.settings.image | img_url: 'master' }}" class="block-fade mfp-image">
<figure class="show-lazy-preloader" style="padding-top: {{ 100 | divided_by: block.settings.image.aspect_ratio }}%">
<img
src="{{ block.settings.image | img_url: '460x' }}" alt="{{ block.settings.image.alt | escape }}"
srcset="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="
data-srcset="{{ block.settings.image | img_url: '460x' }} 380w, {{ block.settings.image | img_url: '660x' }} 760w, {{ block.settings.image | img_url: '960x' }} 860w"
data-sizes="auto"
class="lazyload dont-extract"
/>
</figure>
</a>
{% endunless %}
</div>
{%- endif -%}
<!-- CUSTOM FAQ - FIRST CONTENT // END -->
<!-- CUSTOM FAQ - SECOND CONTENT -->
{%- if product.metafields.global.additional_faq_title_2 != blank and product.metafields.global.additional_faq_desc_2 != blank -%}
<div class="tab">
<p>{{ product.metafields.global.additional_faq_desc_2 }}</p>
{%- unless block.settings.image == blank -%}
<a href="{{ block.settings.image | img_url: 'master' }}" class="block-fade mfp-image">
<figure class="show-lazy-preloader" style="padding-top: {{ 100 | divided_by: block.settings.image.aspect_ratio }}%">
<img
src="{{ block.settings.image | img_url: '460x' }}" alt="{{ block.settings.image.alt | escape }}"
srcset="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="
data-srcset="{{ block.settings.image | img_url: '460x' }} 380w, {{ block.settings.image | img_url: '660x' }} 760w, {{ block.settings.image | img_url: '960x' }} 860w"
data-sizes="auto"
class="lazyload dont-extract"
/>
</figure>
</a>
{% endunless %}
</div>
{%- endif -%}
<!-- CUSTOM FAQ - SECOND CONTENT // END -->
{% for block in section.blocks %}
<div class="tab">
{{ block.settings.body }}
{%- unless block.settings.image == blank -%}
<a href="{{ block.settings.image | img_url: 'master' }}" class="block-fade mfp-image">
<figure class="show-lazy-preloader" style="padding-top: {{ 100 | divided_by: block.settings.image.aspect_ratio }}%">
<img
src="{{ block.settings.image | img_url: '460x' }}" alt="{{ block.settings.image.alt | escape }}"
srcset="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="
data-srcset="{{ block.settings.image | img_url: '460x' }} 380w, {{ block.settings.image | img_url: '660x' }} 760w, {{ block.settings.image | img_url: '960x' }} 860w"
data-sizes="auto"
class="lazyload dont-extract"
/>
</figure>
</a>
{% endunless %}
</div>
{% endfor %}
</div>
</div>
{% endif %}
{%- if section.settings.site_sharing -%}
{%- render 'share', title: product.title, url: product.url, image: product.featured_media -%}
{%- endif -%}
</div>
</div>
</div>
</div>
{%- if section.settings.enable_product_gallery -%}
<div id="product-gallery-split" class="site-box-container container--fullscreen add-border"></div>
{%- endif -%}
{%- if section.settings.show_reviews -%}
<div id="shopify-product-reviews" data-id="{{product.id}}">{{ product.metafields.spr.reviews }}</div>
{%- endif -%}
{%- unless product.empty == empty -%}
<script type="application/json" id="ProductJson-{{ section.id }}" class="product-json">
{{ product | json }}
</script>
<script type="application/json" id="ModelJson-{{ section.id }}" class="model-json">
{{ product.media | where: 'media_type', 'model' | json }}
</script>
{%- endunless -%}
<style type="text/css">
.spr-reviews[style="display: none"]:after {
content: "{{ 'product.no_reviews' | t }}";
}
</style>
{% schema %}
{
"name": "Product page",
"class": "mount-product mount-images mount-gallery mount-tabs",
"max_blocks": 4,
"blocks": [
{
"type": "tab",
"name": "Tab",
"settings": [
{
"type": "text",
"id": "title",
"label": "Title",
"default": "Title"
},
{
"type": "richtext",
"id": "body",
"label": "Text",
"default": "<p>Add extra product information, such as size guides or technical data.</p>"
},
{
"type": "image_picker",
"id": "image",
"label": "Image"
}
]
}
],
"settings": [
{
"type": "checkbox",
"id": "product_vendor_enabled",
"label": "Show vendor",
"default": true
},
{
"type": "select",
"id": "variants_style",
"label": "Variants style",
"options": [
{
"value": "minimal",
"label": "Minimal"
},
{
"value": "classic",
"label": "Classic"
}
]
},
{
"type": "checkbox",
"id": "show_quantities",
"label": "Show variant quantities",
"default": false
},
{
"type": "checkbox",
"id": "hide_variants",
"label": "Hide out of stock variants",
"default": false
},
{
"type": "checkbox",
"id": "quantity_selector",
"label": "Show quantity selector",
"default": true
},
{
"type": "checkbox",
"id": "enable_payment_button",
"label": "Show dynamic checkout button",
"default": true
},
{
"type": "checkbox",
"id": "show_tax_info",
"label": "Show tax info",
"default": false
},
{
"type": "checkbox",
"id": "show_local_pickup",
"label": "Show local pickup availability",
"default": false
},
{
"type": "checkbox",
"id": "site_sharing",
"label": "Enable product sharing",
"default": true
},
{
"type": "header",
"content": "Media",
},
{
"type": "select",
"id": "gallery_style",
"label": "Gallery style",
"options": [
{
"value": "scroll",
"label": "Scroll"
},
{
"value": "slider",
"label": "Slider"
}
],
"default": "scroll",
"info": "Defaults to slider for mobile devices"
},
{
"type": "checkbox",
"id": "show_gallery_progress",
"label": "Show progress indicator",
"default": true
},
{
"type": "select",
"id": "gallery_resize",
"label": "Gallery image aspect",
"options": [
{
"value": "fill",
"label": "Cropped"
},
{
"value": "fit",
"label": "Natural"
}
],
"info": "Only images can be cropped to fill the screen, as other types of media will always have a natural size."
},
{
"type": "checkbox",
"id": "gallery_zoom",
"label": "Enable image zoom",
"default": true
},
{
"type": "checkbox",
"id": "enable_video_looping",
"label": "Enable video looping",
"default": false
},
{
"type": "header",
"content": "Product gallery"
},
{
"type": "paragraph",
"content": "Automatically create a gallery based on the images uploaded in your product's description."
},
{
"type": "checkbox",
"id": "enable_product_gallery",
"label": "Enable product gallery",
"default": false
},
{
"type": "header",
"content": "Product reviews",
},
{
"type": "checkbox",
"id": "show_reviews",
"label": "Show reviews",
"default": false
},
{
"type": "checkbox",
"id": "show_reviews_badge",
"label": "Show reviews badge",
"default": false
},
{
"type": "header",
"content": "Product tabs"
},
{
"type": "select",
"id": "tabs_style",
"label": "Tabs style",
"options": [
{
"value": "tabs",
"label": "Tabs"
},
{
"value": "toggles",
"label": "Toggles"
}
],
"default": "tabs"
}
]
}
{% endschema %}