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

Revenue Chart showing wrong currency #792

Closed
salahaa1 opened this issue Mar 18, 2019 · 11 comments
Closed

Revenue Chart showing wrong currency #792

salahaa1 opened this issue Mar 18, 2019 · 11 comments

Comments

@salahaa1
Copy link

Description

The revenue Chart on the Commerce plugin on the orders page and also the gadget showing ($) as the currency where the correct on is the (SAR) .

Regards

Steps to reproduce

1.In the settings of the commerce plugin we have only one currency which is (SAR) - Saudi Riyal (Primary).
2.The system will change to (SAR) except the revenue chart.

Additional info

  • Craft version: Craft Pro 3.1.15
  • PHP version: 7.2.16
  • Database driver & version: MySQL 5.5.5
  • Plugins & versions: Craft Commerce 2.1.2
    Screen Shot 2019-03-18 at 9 27 57 AM
@lukeholder
Copy link
Member

Are the amounts correct? Is it just the symbol?

@salahaa1
Copy link
Author

The amount is correct but the decimal numbers are truncated ,
You can see that there is amount on 22nd with price ( SAR296.80 ) on the graph is truncated to : (296.00) and yes the symbol is also wrong on the tooltip as you can see on the screenshot.

image

@janhenckens
Copy link
Contributor

We have the same issue but with 2 different currencies :) The install is set to € but the graph detail shows $.

@lukeholder lukeholder changed the title Revenue Chart showing wrong currancy Revenue Chart showing wrong currency May 28, 2019
@kevadamson
Copy link

Same. Widget works for my admin user, but user with reduced permissions gets it in $

@bymayo
Copy link
Contributor

bymayo commented Jul 9, 2019

Similar, we have the store currency set to GBP but it's showing a $ on the points on the chart.

Also, the revenue widget also shows in $ when we have GBP set.

Not sure if this is an issue from upgrading to Commerce 2 from Commerce 1.

@engram-design
Copy link
Contributor

Not sure if its applicable, but I've had similar issues before where the user account currently logged in has their language set to something else. This can happen on Craft 2 > 3 upgrades, or just setting the default language after install.

Make sure to go to your account and check your language is correct. For some locales, you might not see them in the dropdown, and you might have to include them manually.

For example, Australian English doesn't appear in that dropdown, so I need to add:

'defaultCpLanguage' => 'en_au',

To my general.php file. This is the default language for my site. Then I can select it from the list, and can help solve it.

@bymayo
Copy link
Contributor

bymayo commented Aug 6, 2019

@engram-design That does work and fix the problem. The site I had the issue on was a Craft 2 > Craft 3 build.

Is this missing somewhere when upgrading from Craft 2 > Craft 3 then?

@engram-design
Copy link
Contributor

engram-design commented Aug 6, 2019

@bymayo Possibly more of a Craft core issue, maybe @brandonkelly might have some insight?

@lukeholder
Copy link
Member

Taking a look at this today, think it is to do with locale being supplied to the D3 charting lib by Craft.

@lukeholder
Copy link
Member

Thanks @nfourtythree !

@nfourtythree
Copy link
Contributor

nfourtythree commented Aug 19, 2019

Hey all,

A fix for this has been pushed for the next release.

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

7 participants