Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save dinhkhanh/07ad25b9cdb884d6bf65 to your computer and use it in GitHub Desktop.
Save dinhkhanh/07ad25b9cdb884d6bf65 to your computer and use it in GitHub Desktop.
Magento Remove decimal in price if needed
<?php
/**
* File: /app/code/core/Mage/Directory/Model/Currency.php
* Function: formatTxt
* Do: Add this before return;
*/
if (($price - intval($price)) == 0) {
$options['precision'] = 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment