Needs work
Project:
Support Timer
Version:
7.x-1.x-dev
Component:
User interface
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
23 Sep 2011 at 12:13 UTC
Updated:
2 Nov 2014 at 20:03 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
jeremy commentedWhat are you trying to switch? Are you simply trying to replace the "$" with another symbol? Per-client, or globally?
Comment #2
bavarian commentedbasically ... changing the "$" with "SEK" ....
Comment #3
adiatisI want to change it globally to euro symbol. How?
Comment #4
tisbris commentedsearch and replace '$' with 'xxx' inside support_timer.module
Comment #5
Homotechsual commentedAs this is obviously not a feature of the module I'd like to suggest that it be made into one.
Editing the module files will complicate updates.
Comment #6
Homotechsual commentedAttached patch adds a currency selector to the billing rate page. Currently this is performed with a select list however I'd not be opposed to turning it into a type field if that's deemed appropriate.
Current values are USD, GBP and EUR.
This patch patches three files in your module installation and is designed to be run against the current 7.x-1.x-dev or the 7.x-1.x branch in Git.
Comment #7
Homotechsual commentedRevised patch attached (I missed a line from the dev version it seems)
Comment #8
jeremy commentedPlease follow https://drupal.org/coding-standards -- consistently use spaces instead of tabs.
It would be better if the supported currencies were configurable, and if the default currency were configurable. Even if there's no admin interface for it.
Looking at your patch, it seems this could be accomplished rather trivially, by modifying this:
Making it instead be a variable_get -- so someone could override this array in their settings.php. In this way, they could also change the default currency. Ideally we'd then also add a README.txt explaining how to configure this.
Sorry, I just merged in some code so your patch no longer applies -- please re-base.
Comment #9
jeremy commentedComment #10
Homotechsual commentedI'm not sure about the settings.php route personally. For now I'll rebase this - but I'll look at opening this up so that it's configurable, maybe allow people to add to the list on the settings page or similar, or even make it an input box for a html currency symbol.
Comment #11
Homotechsual commentedSorry bout the title change
Comment #12
Homotechsual commentedAs far as I can see the most recent changes are only to the 6.x branch whereas this is a patch for the 7.x branch - I don't use D6 anywhere so I can't develop patches for it atm.
Edit: NVM - I can use git, honest!
Comment #13
Homotechsual commentedNew patch against latest in 7.x-1.x :-)
I'll be working on making this more configurable over the next few days as time allows.
Comment #14
Homotechsual commentedChanging branch/version.
Comment #15
Homotechsual commentedStill working on making this more configurable however this has taken a backseat to Support Views, Token and Dashboard development. It is still a priority so expect something to happen relatively soon.
Comment #16
cewoj commentedThere is a lot undefined $currency and total['currency'] variables in the patch code - any clue ?