Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.
Ruby b2b-commercee-commerceecommerceecommerce-apiecommerce-frameworkecommerce-platformheadlessheadless-commerceheadless-ecommercemarketplacemulti-tenantmulti-vendormulti-vendor-ecommerceopen-sourcespree-commerce
Do not use currency from the session in the admin panel (#12214)
Damian Kaczmarczyk3c0c51197ec9
diff --git a/admin/app/controllers/spree/admin/base_controller.rb b/admin/app/controllers/spree/admin/base_controller.rbindex 50e2e7a76b..f06ab5f952 100644--- a/admin/app/controllers/spree/admin/base_controller.rb+++ b/admin/app/controllers/spree/admin/base_controller.rb@@ -73,6 +73,16 @@ module Spree@current_timezone ||= current_store.timezoneend+ def current_currency+ @current_currency ||= if params[:currency].present? && supported_currency?(params[:currency])+ params[:currency]+ elsif current_store.present?+ current_store.default_currency+ else+ Spree::Store.default.default_currency+ end&.upcase+ end+def current_vendornilend