Skip to content

Conversation

@magpieuk
Copy link
Contributor

Admin order index page doesn't reflect the stores currency.

Summary

Changed admin orders index page to use display_total rather than number_to_currency(order.total) this displays the correct currency for the order rather than defaulting to USD

Checklist

Check out our PR guidelines for more details.

The following are mandatory for all PRs:

The following are not always needed:

  • 📖 I have updated the README to account for my changes.
  • 📑 I have documented new code with YARD.
  • 🛣️ I have opened a PR to update the guides.
  • ✅ I have added automated tests to cover my changes.
  • 📸 I have attached screenshots to demo visual changes.

@codecov
Copy link

codecov bot commented Nov 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.82%. Comparing base (8334e9c) to head (50ceba8).
Report is 5 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5929   +/-   ##
=======================================
  Coverage   88.82%   88.82%           
=======================================
  Files         835      835           
  Lines       18149    18149           
=======================================
  Hits        16121    16121           
  Misses       2028     2028           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@kennyadsl
Copy link
Member

@magpieuk thanks for the contribution. Can you please post a screenshot of the issue to understand where this happen exactly?

@kennyadsl kennyadsl changed the title Update component.rb Update Admin Order Index Component.rb Nov 15, 2024
@kennyadsl kennyadsl changed the title Update Admin Order Index Component.rb Display the store's currency in the Admin Order Index Component Nov 15, 2024
@magpieuk
Copy link
Contributor Author

image

@magpieuk
Copy link
Contributor Author

There is also another similar issue here: components/solidus_admin/orders/show/summary/component.html.erb

Not sure when this component is displayed yet to verify though.

@tvdeyen tvdeyen added the type:bug Error, flaw or fault label Nov 18, 2024
Copy link
Member

@tvdeyen tvdeyen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Can you add a test as well?

@tvdeyen tvdeyen force-pushed the solidus-order-index-fix branch from f01bacb to eb422d2 Compare February 18, 2025 15:26
@tvdeyen
Copy link
Member

tvdeyen commented Feb 19, 2025

@chaimann can you take this over please?

@chaimann
Copy link
Contributor

@tvdeyen sure!

magpieuk and others added 4 commits February 20, 2025 19:40
Admin order index page doesn't reflect the stores currency. Use
"money_method" `:display_total` that handles correct formatting of
 the money values, taking into account order's currency.
@chaimann chaimann force-pushed the solidus-order-index-fix branch from eb422d2 to 50ceba8 Compare February 20, 2025 18:55
@github-actions github-actions bot added the changelog:solidus_core Changes to the solidus_core gem label Feb 20, 2025
Copy link
Member

@tvdeyen tvdeyen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Many thanks

@tvdeyen tvdeyen merged commit 5f24fcf into solidusio:main Feb 20, 2025
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog:solidus_admin changelog:solidus_core Changes to the solidus_core gem type:bug Error, flaw or fault

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants