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>
By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024Thanks to everyone who participated in our AMA with 2H Media: Marketing Your Shopify St...
By Jacqui Sep 6, 2024