nat8100 Posted April 28, 2006 Posted April 28, 2006 Hi.. When I put a price in a product and press 'preview' it just shows '0' in the preview, not even the ?. Then on the catalog side it rounds the product to the nearest pound, yet showign the correct decimal places.. i.e. ?32.99 would show as ?33.00 and ?32.49 would show as ?32.00 The decimals are correct in the currencies and in the configuration>my store. I think the rounding is done in the file includes/functions/general.php: // Wrapper function for round() function tep_round($number, $precision) { if (strpos($number, '.') && (strlen(substr($number, strpos($number, '.')+1)) > $precision)) { $number = substr($number, 0, strpos($number, '.') + 1 + $precision + 1); if (substr($number, -1) >= 5) { if ($precision > 1) { $number = substr($number, 0, -1) + ('0.' . str_repeat(0, $precision-1) . '1'); } elseif ($precision == 1) { $number = substr($number, 0, -1) + 0.1; } else { $number = substr($number, 0, -1) + 1; } } else { $number = substr($number, 0, -1); } } return $number; } But I don't really know PHP and have come unstuck for options to try.. any suggestions? anyone had the same problem? Seen similar problems but usually to do with the decimal places. Thanks in advance!
nat8100 Posted April 28, 2006 Author Posted April 28, 2006 Solved now! - silly mistake - didn't have a default currency set.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.