jillbalkus Posted June 20, 2007 Posted June 20, 2007 Hello! I'm using the Quantity Price Breaks Per Product Price Table Formatter contribution found here. I managed to mess around with includes/classes/PriceFormatter.php to change '% savings' to 'total' by adding this function: function getTotal($qty, $discount_price) { $total = '$' . $qty * $discount_price; return $total; } Now, how do I modify that function to always show 2 decimal places, instead of 1 or 0 like it does now? See my site here. Thanks!! Quote
Guest Posted June 20, 2007 Posted June 20, 2007 use the osc functions function getTotal($qty, $discount_price) { global $currencies; $total = $currencies->display_price($discount_price,0, $qty); return $total; } hard-coding currencies only give you trouble. And you may want to change the 0 to the tax amount depends how you've setup your store. Quote
jillbalkus Posted June 22, 2007 Author Posted June 22, 2007 use the osc functions function getTotal($qty, $discount_price) { global $currencies; $total = $currencies->display_price($discount_price,0, $qty); return $total; } hard-coding currencies only give you trouble. And you may want to change the 0 to the tax amount depends how you've setup your store. Enigma, thank you so much!!! Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.