All things Shopify and commerce
By default , Shopify shows the price of the products as “1499.00 PKR” i want to remove the end zeros and write it as 1499
please tell any solution
You're gonna have to change the code a bit, depending on the theme you're using multiple places or it could be a setting in the theme editor, check settings and currency or change the code like below
From
{{ money_with_currency }}
to this
{{ money_without_trailing_zeros }}
Hi @salman26,
You need to edit the code. Find the file where product prices are displayed. This is often in product-template.liquid, product.liquid, or price.liquid. It can also be in a section like product-template.liquid under the sections folder.
You can try to replace {{ product.price | money }} with {{ product.price | divided_by: 100 | money_without_trailing_zeros }}
Hi,
Locate the Price Display Code
Create a New Snippet ( For Custom Money Filter)
{% comment %}
Snippet to display money without trailing zeros
{% endcomment %}
{% assign formatted_value = amount | divided_by: 100.0 %}
{% if formatted_value contains '.' %}
{% assign amount_parts = formatted_value | split: '.' %}
{{ amount_parts[0] }}
{% else %}
{{ formatted_value }}
{% endif %}
Hey Community 👋 Did you know that March 15th is National Everything You Think Is W...
By JasonH Apr 1, 2025Discover how to increase the efficiency of commerce operations with Shopify Academy's l...
By Jacqui Mar 26, 2025Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025