I really need to show price as 1000.00 (no $ and no comma). Is it possible to modify this module to do this?

CommentFileSizeAuthor
#1 exportable-price-formatters.patch1.51 KBpebosi

Comments

pebosi’s picture

Status: Active » Needs review
StatusFileSize
new1.51 KB

Created a patch for adding two new formats:

First, examples:
1000
1000.49

Second with currency code, examples:
1000 EUR
1000.49 EUR

ikos’s picture

Title: Create new format » Allow number format to be specified and make currency symbol optional
Assigned: Unassigned » ikos

Hi pebosi,

Thanks for your feedback on the module and for your patch.

I'm not going to commit this one as I think it seems a very specific scenario and we could probably achieve the same result in a different way.

I propose that instead we provide an option to specify the number format in the formatter and also indicate whether or not to use a currency symbol. This could be common for all formatters.

I've updated the issue title accordingly.

kind regards

Richard

ikos’s picture

Status: Needs review » Needs work
xano’s picture

Currency 7.x-2.x offers a user interface and API to perform customizable locale-specific price formatting. Using the format requested by @jbsc is perfectly possible. Currency for Drupal Commerce already brings this functionality to Commerce. Maybe Drupal Commerce Extra Price Formatters can benefit from Currency as well?