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 %}
Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025Discover opportunities to improve SEO with new guidance available from Shopify’s growth...
By Jacqui May 1, 2025