Removing Decimals site-wide for ALL currencies (Expanse)

Hi all

I am looking for a solution to remove the ,00 and roundup anything over ,00 for all prices site-wide.

I was able to remove the decimals for the main shop currency in the settings, however all converted currencies still have the decimals and I cannot figure out how to remove them.

For example

€100.00 to be displayed as €100

€100.95 to be displayed as €101

Is there a specific code I can add to either the theme.liquid or price.liquid?

my shop: www.inibo.co

password: secret

Any ideas?

Thank you so much.

Hello @saraki
use {{amount_no_decimals}} instead. of ${{amount}} under Currency formatting

Hope this soultions worked for , If this solution didn’t work for you, please let us know. We’re happy to assist further

@ThePixelEdge

Thanks but this is for the main shop currency only. I already did that.

Is there a code to achieve this for ALL converted currencies?

Hi @saraki ,

If you are not familiar with the liquid code I would recommend sharing Collaborator access with us .

For Collection Pages and Featured Collection Section , It would have to be in the grid-product-item under the snippets where the code for Price is located or there might be an entirely seperate Price.liquid file where you would find the

{{ product.price }}

which you would need to replace with

{{ product.price | money_without_trailing_zeros }} .

hope this helps . Let me know if you need our assistance

Thank you @ThePixelEdge , I do have a price.liquid file, I will try to replace it.
does “without trailing zeros” only apply to zeros, or also other numbers after the comma?

Ideally I would want to round up to zero and not see the zeros, you know what I mean?

Never mind, I am not going to touch it because I don’t understand it at all.. there is no {{product.price}}, only {{amount}}, so I don’t know what to do.

My price.liquid looks like this:

{% comment %}
/**

  • @param {number} price - the price
  • @param {shop} shop - the shop object
  • @param {boolean} superscript_decimals - whether to superscript decimals
    */
    {% endcomment %}

{%- assign formatted_price = price | money -%}
{%- unless shop.money_format contains ‘money’ or shop.money_format contains ‘.’ -%}
{%- if superscript_decimals -%}
{%- if shop.money_format contains ‘{{amount}}’ or shop.money_format contains ‘{{ amount }}’ -%}
{% capture formatted_price %}{{ formatted_price | replace: ‘.’, ‘’ | append: ‘’ }}{% endcapture %}
{%- elsif shop.money_format contains ‘{{amount_with_comma_separator}}’ or shop.money_format contains ‘{{ amount_with_comma_separator }}’ -%}
{% capture formatted_price %}{{ formatted_price | replace: ‘,’, ‘’ | append: ‘’ }}{% endcapture %}
{%- endif -%}
{%- endif -%}
{%- endunless -%}

{{ formatted_price }}
{{ price | money }}

There is also price-varies.liquid and price-range.liquid.

How do I give you collaborator access?
Thank you @ThePixelEdge

Hi @saraki

Kindly Message me in the DM so I can explain and you can share the access with me . Its a 4 digit code that should be shared Privately
Here is how you can locate it In Shopify admin > Settings > Users and permissions page of their Shopify admin . You can find collaborator access code .

Done :slightly_smiling_face:
Thank you

Hi @ThePixelEdge can you help with my shop too? I have the main shop currency without 00/decimals, but I want to have it for all converting international currencies as well. Would really appreciate it. :slightly_smiling_face: