All things Shopify and commerce
We try with the money filter: "money_without_trailing_zeros" but it only remove .00 with the two decimals zeros, when only the last decimal is zero doesn't remove it, for example in price 23.90, doesn't remove the last zero and the price stay 23.90. How can we remove the second/last decimal if it's zero?
Thanks for you early response but that no solve my problem
can you please share store url?
Hey,
1. In your Shopify Admin go to online store > themes > actions > edit code and search theme.liquid file.
2. In your theme.liquid file, find the </body> (press CTRL + F on Windows or command + F on Mac)
3. paste this code right above the </body> tag:
<script>
function updatePrice(){
var prices = document.querySelectorAll(`.price-item`);
if (!prices)return;
for (var each of prices){
each.innerText = each.innerText.replace('.00', '');
}
}
window.onload = function() {
setTimeout(updatePrice, 50);
}
</script>
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