Remove decimals from price if they are zero
Carlitus - November 6, 2009 - 12:04
| Project: | Ubercart |
| Version: | 6.x-2.0 |
| Component: | Code |
| Category: | task |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Description
I'm attaching a patch to include and option to remove the decimals from the price when it is shown if they are zero.
El saludo!
| Attachment | Size |
|---|---|
| uc_price_remove_decimals.patch | 922 bytes |
| uc_store_admin_remove_decimals.patch | 681 bytes |

#1
I think this is a theming issue and does not belong in Ubercart core. You can format the price how you want using the standard Drupal theming mechanism of overriding theme_uc_product_price(), or you can hook into the Ubercart price formatter.
#2
I know, i've made this before with the hooks but i think this can be useful to lot of people, we use it every time.
What is the difference between this and the currency sign in the left or in the right?