Remove Trailing Zeros From Storefront Price

Topic summary

Goal: Remove trailing “.00” from whole-number product prices on a Shopify storefront (Debut theme), inspired by an example site’s product recommendations.

Solution provided: Edit theme.liquid (Online Store > Themes > Actions > Edit code) and paste a snippet immediately before the closing tag. The helper noted a cleaner, theme-integrated approach via Liquid (Shopify’s templating language) would be ideal.

Outcome: The original requestor confirmed the snippet worked.

Follow-ups and issues:

  • Other themes: Users on Optimal and Minimal reported trouble. One couldn’t find where to place the code; another said the snippet didn’t work and shared their theme.liquid code for review (code snippet is central to their request).
  • Dynamic updates: A user observed that changing a product variant (e.g., size) causes the “.00” to reappear, likely due to JavaScript-driven price updates that bypass the initial formatting.

Status: Partially solved. Works on Debut for static load, but unresolved for:

  • Implementations on Optimal and Minimal themes.
  • Preserving formatting during variant changes.
    No final fix or instructions for these cases were posted; assistance was requested and the discussion remains open.
Summarized with AI on January 13. AI used: gpt-5.

Hi there! I’m using the Debut theme and would like to remove the trailing zeros from my whole number product prices in the storefront. Here’s an example of another brand doing it successfully in their product recommendation section.

Can anyone advise how to tackle this?

Hello,

Thank you for your question.

Please share your store URL, page URL and also password (if your store has one), I’ll help you out to the best of my ability.

Kind regards,
Diego

Hey,

  1. In your Shopify Admin go to online store > themes > actions > edit code
  2. In your theme.liquid file, find the (press CTRL + F or command + F on Mac)
  3. paste this code right above the tag:

Ideally you’d want to get a developer to code it in a cleaner way into your theme via Liquid, but this will do the trick.

Please let me know whether it works.

Kind regards,
Diego

4 Likes

Diego, thank you so much. It worked beautifully!

@scedelstein hey, glad to hear. You’re welcome!

Next time you need something feel free to contact me personally via e-mail, I’ll be happy to help.

Kind regards,
Diego

Hi Diego,

Thanks for the solution! But on the theme Optimal I don’t see the codes over there. Can you maybe help me where to find the and copy paste this code?

Cheers! :slightly_smiling_face:

Hi Diego
Ive tried the above step but didn’t work for my store, I am working with minimal theme and below is my code, please let me know if its adjustable to remove those two extra zeros from the prices.. thanks a lot in advance.

{% if settings.favicon %}

{% endif %} {{ page_title }}{% if current_tags %}{% assign meta_tags = current_tags | join: ', ' %} – {{ 'general.meta.tags' | t: tags: meta_tags }}{% endif %}{% if current_page != 1 %} – {{ 'general.meta.page' | t: page: current_page }}{% endif %}{% unless page_title contains shop.name %} – {{ shop.name }}{% endunless %}

{% if page_description %}

{% endif %}

{% include ‘social-meta-tags’ %}

{{ ‘timber.scss.css’ | asset_url | stylesheet_tag }}
{{ ‘theme.scss.css’ | asset_url | stylesheet_tag }}

{{ content_for_header }}

{{ ‘jquery-2.2.3.min.js’ | asset_url | script_tag }}

{% comment %}
If you store has customer accounts disabled, you can remove the following JS file
{% endcomment %}
{% if request.page_type contains ‘customers/’ %}
{{ ‘shopify_common.js’ | shopify_asset_url | script_tag }}
{% endif %}

{%- render ‘asl_snippet’ -%}

{% section ‘header’ %}

{{ content_for_layout }}

{% section ‘footer’ %}

{%- if request.page_type == ‘index’ -%}

{{- 'home_page.slideshow.navigation_instructions' | t -}}

{%- endif -%}

{% if request.page_type == ‘product’ or request.page_type == ‘index’ %}
{{ ‘option_selection.js’ | shopify_asset_url | script_tag }}
{% endif %}

  • {{ 'general.accessibility.refresh_page' | t }}
  • {{ 'general.accessibility.new_window' | t }}
  • {{ 'general.accessibility.new_window_and_external' | t }}

{{ ‘theme.js’ | asset_url | script_tag }}

My god man, you’re a freaking life saver !

Hey Diego,

i wanted to add that when i choose another size for example from my website, the extra two zeros are added again at the end of the price.

is there a way to avoid that ?