How can I hide product prices when sold out in Impulse Theme?

Hello Guys,

We have a site utilizing impulse theme. We are looking to hide price of the product if the product is sold out. Anyways to do this?

Thank you so much,

Sam

Hi There!

Pretty straightforward to do, would you mind sharing the Product-template.liquid code so that I can amend it as it should be? Cheers!

Hi, Could you please make the same adjustment to my store.

Just Need to hide all the prices.

Thanks.

Hi! I would like to make the same change and hide prices when item is sold out on the collection page as well as the product page.

Here is my product-template.liquid

{%- unless thumbnail_position -%}
{%- assign thumbnail_position = ‘beside’ -%}
{%- endunless -%}

{%- unless description_style -%}
{%- assign description_style = ‘full’ -%}
{%- endunless -%}

{%- assign product_img_structure = product.featured_media | img_url: ‘1x1’ | replace: ‘1x1.', '{width}x.’ -%}

{%- include ‘product-template-variables’ -%}

{%- if image_position == 'left' -%}
{% include 'product-images', section_id: section_id, isModal: isModal, thumbnail_arrows: thumbnail_arrows, thumbnail_position: thumbnail_position, video_looping: video_looping, video_style: video_style %}
{%- endif -%}
{%- if settings.show_breadcrumbs and isModal != true -%} {%- include 'breadcrumbs' -%} {%- endif -%}

{%- 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 isModal -%}

{{ product.title }}

{% else %}

{{ product.title }}

{%- endif -%}

{%- if settings.enable_product_reviews and settings.reviews_layout == ‘full’ -%}
{%- if isModal -%}
{%- assign review_link = product.url | within: collection | append: ‘#Reviews-’ | append: product.id -%}
{% else %}
{%- assign review_link = ‘#Reviews-’ | append: product.id -%}
{%- endif -%}



{%- endif -%}

{%- if settings.sku_enable -%}

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

{%- endif -%}

{%- assign hide_sale_price = true -%}
{%- if product.compare_at_price_max > product.price -%}
{%- if current_variant.compare_at_price > current_variant.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 -%}


{{ current_variant.price | money }}

{%- if settings.product_save_amount -%}
{%- if settings.product_save_type == ‘dollar’ -%}
{% capture saved_amount %}{{ current_variant.compare_at_price | minus: current_variant.price | money }}{% endcapture %}
{%- else -%}
{% capture saved_amount %}{{ current_variant.compare_at_price | minus: current_variant.price | times: 100.0 | divided_by: current_variant.compare_at_price | round }}%{% endcapture %}
{%- endif -%}

{{ ‘products.general.save_html’ | t: saved_amount: saved_amount }}

{%- endif -%}

{%- 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 -%}

{%- if settings.inventory_enable or settings.inventory_transfers_enable -%}
{%- assign variants_with_inventory_tracking = product.variants | where: ‘inventory_management’, ‘shopify’ -%}

{% comment %}
If loaded in quick view, it might be from a JS-loaded function
that loads recommended products. If that’s the case, the above
JS will not set the variant inventory. Add it to an accessible
data div to read later instead.
{% endcomment %}
{%- if isModal -%}

{%- for variant in variants_with_inventory_tracking -%}
{%- endfor -%}
{%- endif -%} {%- endif -%}

{%- unless isModal -%}
{% comment %}
Shopify’s product form attaches a number of tracking
scripts that cause slower load times and false statistics.
Quick view modals request these on-demand.
{% endcomment %}
{% include ‘product-form’, section_id: section_id %}
{%- else -%}

{%- endunless -%}

{%- if settings.trust_image != blank -%}

{%- assign img_url = settings.trust_image | img_url: '1x1' | replace: '_1x1.', '_{width}x.' -%} {{ settings.trust_image.alt }} {{ settings.trust_image.alt }}
{%- endif -%}

{%- unless description_style == ‘full’ -%}

{{ product.description }}
{% include 'product-additional-content', section_id: section_id %}
{%- endunless -%}

{%- if social -%}
{% include ‘social-sharing’, share_title: product.title, share_permalink: product.url, share_image: product %}
{%- endif -%}

{%- unless image_position == ‘left’ -%}

{% include 'product-images', section_id: section_id, isModal: isModal, thumbnail_position: thumbnail_position, thumbnail_arrows: thumbnail_arrows %}
{%- endunless -%}

{%- if description_style == ‘full’ -%}

{{ product.description }}
{% include 'product-additional-content', section_id: section_id %}
{%- endif -%}

I need to do the same on Impulse. Can you share the code change we need to make?

Hello @LW

The solution is to find the code used to render the price and wrap it between the following

{% if product.available %}

Money Code

{%endif%}

This should work on most themes! Let me know if this works

Hi @JHKCreate we have the Impulse theme and need to hide ALL prices from category pages / featured product listings - not just if they have a zero value- is there an easy way for me to do this I’m a novice! Huge thanks in advance.

Hi,
Same question, for our shop using impulse theme:
https://achetezdelart.shop
We offer a premium print to the one who will help us resolve this issue! :blush:
Cheers

Hi @achetezdelart ,

Should be pretty straightforward, let us know if we can request store access and implement the change, we’ll let you know where this is activated.

Thanks!

Hi,
I’m actually preparing my pages for an upgrade of our Impulse theme from version 4 to 7.
Can you request access on the theme not yet published?
Thank you for your help!
Regards

Yes not a problem, fixes need to be done on unpublished themes before deploying this in all cases. You shall receive a request soon!

Thank you, approved!

Well received, are we looking at hiding all prices for sold out items only then? Just so we’re aligned, thanks!

TYSM :folded_hands: Actually I have also a topic with the collections list limited to 50, which I’d like to increase on the collections list page: https://community.shopify.com/topic/2048324 :sweat_smile:

C’est bon pour les prix :wink: Collections & Page Produit.

As for the 50 Limit, this is a hardcoded limit, we can extend this by adding another 50 collection list, but we would advise to no go over the limit to be honest.

You are amazing! TYSM you for the hidden prices of sold products, it’s exactly what we needed and it works perfectly.

Our pleasure!

For the 50 limit I’ll follow your no go advice. Can you add another collections list to the page?
I will also DM you for the print I’m offering you for your help :blush:

Do you mean this page? Collections – Achetez de l’Art (achetezdelart.shop)

I can see you can add more collections there, just let me know

Yes, this is the page showing all of our artists; we can organize them differently with another collections list within the page.