Changing the default currency symol

Hello Everybody, Please How Can I change the default currency symbol on a listing?

I guess you want to change the currency which is used in the marketplace, right? (I mean, not only the symbol?)

Currency is saved to the Community model (communities table in database). The column name is available_currencies.

So hereā€™s a snippet you can run on rails console

com = Community.find(<id>)
com.update_attributes(available_currencies: "<CUR>") # e.g. EUR, USD, JPY, etc.

The available_currencies is a comma-separated string, so in theory you can add multiple currencies. However, thatā€™s a deprecated feature which might not even work, so I wouldnā€™t recommend using multiple currencies.

is this only way to do it? (change currency symbol at ā€œpost a new listingā€ page)
admin panel doesnā€™t support currency changing?

what value are legit to ā€œavailable_currenciesā€?
is there any document?

Kiitos!

All ISO 4217 currency codes should work: https://en.wikipedia.org/wiki/ISO_4217

äøå®¢ę°”ļ¼

1 Like

Hi Mikko,

I have USD as currency on my sharetribe community, the ā€œavailable_currenciesā€ field contains only USD as currency for the community.

I need to use ā€œU$Sā€ symbol instead of ā€œ$ā€ which is the defined symbol to USD. Is there any way to achieve this?

Thanks! Regards,
Pablo.

Iā€™ve solved this adding the following configuration to my config/initializers/money.rb

config.register_currency = {
     :priority            => 1,
     :iso_code            => "USD",
     :name                => "USD con U$S",
     :symbol              => "U$S ",
     :symbol_first        => true,
     :subunit             => "Subcent",
     :subunit_to_unit     => 100,
     :thousands_separator => ".",
     :decimal_mark        => ","
  }

Now I see the USD symbol as U$S.

Thanks!

1 Like

available_currencies is changed to currency in latest version,
You need to update two database tables

1-Communities
2-payment_settings

e.g to change currency to usd

in communities table change ā€˜currencyā€™ column value to ā€˜USDā€™
in payment_settings table change ā€˜minimum_price_currencyā€™ and ā€˜minimum_transaction_fee_currencyā€™ columns values to ā€˜USDā€™

And you are good to go.

Hi! Can you tell where to put this code? I put it in the Javascript field but donā€™t work

Hi, @Franco itā€™s quite possible to change using admin ā†’ advance/custom script using javascript and CSS., or as suggested it can be directly customized at the backend level also.

Let me know how can i help you with this. I have good experience with Sharetribe, you can also check my previous work and feedback here

please connect with me by email (mailtoamanam@gmail.com) I would be happy to assist you with any further enhancements.

Thanks!
Aman