Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple Currency Handling Improvements #41

Closed
adetia9 opened this issue Jul 20, 2015 · 3 comments
Closed

Multiple Currency Handling Improvements #41

adetia9 opened this issue Jul 20, 2015 · 3 comments
Assignees
Milestone

Comments

@adetia9
Copy link

adetia9 commented Jul 20, 2015

From client: Ticket link

I know I can change the currency in WHCMS..right now I have it setup like this:
CAD $ 1.29782
EUR € 0.91836
USD$ 1.00000

Now the main currency in WHMCS is always the one that is set as 1.0 Now if I change my currency to Canadian, all my enom prices will be messed up because of the exchange rate and because your plugin pulls the price from the currency set as 1. So if I set it to Canadian dollars as the currency, then if my domain is 14.95 at enom it will show as 14.95 canadian....when i fact it should be more like 19.42 CAD alsmost a difference of 5 dollars....

@CarolynCircleTree and @bobbravo2 conversation

bobbravo2 9:15 AM right now, the default behavior is to detect the default WHMCS currency,
bobbravo2 9:16 AM yep. looking over the code now, we check the first currency, which is the default/base in whmcs
carolynb 9:16 AM Right that makes sense. But our guy is Canadian and he says if he changes it that the price doesn't change accordingly or something that's if it marked 12.95 that if he goes to CAD that it stays the same as USD
bobbravo2 9:16 AM so if that user has USD as their base, and CAD as a secondary, that'll be the problem
bobbravo2 9:17 AM really we should refactor that logic to check if WHMCS # of currencies > 1, and if so, display a drop-down
carolynb 9:17 AM So he has to basically go one way or another but not both, for now, and we should add something to address that
bobbravo2 9:17 AM right now, it default to checking isNonUSDinWHMCS() (Checks if the current WHMCS base currency is USD or not)
indeed
it'd be a PITA I'd imagine for him to change his base currency
so we should address the base issue
bobbravo2 9:19 AM let's work up a GitHub issue together, and assign to Anatoliy when he's got the tests up & running

Summary

We need to handle multiple currencies instead of just checking for one, for our customers who need to have more then one currency option set in WHMCS and have the plugin adapt accordingly.

Current vs. new process overview

enom pro - currency conversion - new page

TODO

  • Are there test helpers to create / destroy currencies in WHMCS?
  • Do our current tests cover code for the current enom_pro::isNonUSDinWHMCS() and enom_pro::getDefaultCurrencyCode()?
  • The goal will be to have a drop-down to select the user's preferred currency to convert from USD -> INTO target currency
@adetia9
Copy link
Author

adetia9 commented Jul 20, 2015

note while working on currencies, here's another issue that may or may not be related or make sense to do at the same time:
#25

@bobbravo2
Copy link
Member

@CarolynCircleTree is going to ask the client for a mysqldump of his whmcs.tblcurrencies table so we can reproduce the exact config he's using

@bobbravo2 bobbravo2 added this to the 3.1 milestone Jul 20, 2015
@adetia9
Copy link
Author

adetia9 commented Jul 20, 2015

Requested from client 7/20/2015.

@bobbravo2 bobbravo2 closed this as not planned Won't fix, can't repro, duplicate, stale Mar 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants