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
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!

AttachmentSize
uc_price_remove_decimals.patch922 bytes
uc_store_admin_remove_decimals.patch681 bytes

#1

TR - November 9, 2009 - 01:01

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

Carlitus - November 9, 2009 - 16:06

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?

 
 

Drupal is a registered trademark of Dries Buytaert.