How can I remove trailing zeros from product prices in Prestige Theme?

Topic summary

Goal: Display integer prices without trailing decimals (e.g., 50€ instead of 50.00€) while preserving cents when present (e.g., 50.95€) in the Prestige theme.

Proposed change: Edit the theme file snippets/price-list.liquid and replace the existing price output block.

Logic: Calculate price_in_cents and derive has_cents via modulo 100. If has_cents > 0, render the price normally. If has_cents == 0, render the price and strip the “.00” using the remove filter.

Coverage: Works for both settings.currency_code_enabled states, using money_with_currency when enabled and money when disabled.

Status: A concrete Liquid-based solution is provided; no confirmation of implementation success yet, so outcome remains unconfirmed.

Note: The provided code snippet is central to applying the fix in Shopify’s Liquid templates.

Summarized with AI on December 14. AI used: gpt-5.

Hello,

I want to remove the trailing zeros for products with a price like “50€”. I don’t want “50.00€”.

However I still want the decimals to show if a product is “50.95€” obviously.

Can someone please help me add this to my store? I am using the Prestige Theme.

in your snippets/price-list.liquid file

find
{%- if settings.currency_code_enabled -%} {{- variant.price | money_with_currency -}} {%- else -%} {{- variant.price | money -}} {%- endif -%}

and replace it with

{%- assign price_in_cents = variant.price | times: 100 -%}
{%- assign has_cents = price_in_cents | modulo: 100 -%}

{%- if settings.currency_code_enabled -%}
{%- if has_cents > 0 -%}
{{- variant.price | money_with_currency -}}
{%- else -%}
{{- variant.price | money_with_currency | remove: ‘.00’ -}}
{%- endif -%}
{%- else -%}
{%- if has_cents > 0 -%}
{{- variant.price | money -}}
{%- else -%}
{{- variant.price | money | remove: ‘.00’ -}}
{%- endif -%}
{%- endif -%}