How to change currency from USD to INR?

Topics related to running, modifying, or working with the Broadleaf Commerce Demo application

Moderator: jocanas

gowthamgutha
Intermediate
Intermediate
Posts: 98
Joined: Sat Mar 01, 2014 6:19 am

How to change currency from USD to INR?

Postby gowthamgutha » Thu May 01, 2014 4:57 am

I would like to update the currency of my site from USD to INR.

I even want the dollar symbol to be replaced by the symbol of Indian Rupee.

The BLC_CURRENCY table contains the USD 1 US Dollar and even if I change that USD to INR and US Dollar to Indian Rupee, but how should I change that symbol?

phillipuniverse
Team Member
Team Member
Posts: 1563
Joined: Tue Dec 20, 2011 12:11 pm

Re: How to change currency from USD to INR?

Postby phillipuniverse » Thu May 01, 2014 11:02 am

Try changing the default locale in the BLC_LOCALE table. The dollar sign is output via the PriceTextDisplayProcessor which is invoked in Thymeleaf with something like:

Code: Select all

<span blc:price="*{retailPrice}"></span>

gowthamgutha
Intermediate
Intermediate
Posts: 98
Joined: Sat Mar 01, 2014 6:19 am

Re: How to change currency from USD to INR?

Postby gowthamgutha » Mon May 05, 2014 5:29 am

Thank you. I just added the INR to BLC_CURRENCY table also to BLC_LOCALE table and set that to default while making others 0 (non-default).

I automatically got the Rs. symbol instead of $

rakshith_d9
Newbie
Newbie
Posts: 10
Joined: Wed Apr 22, 2015 2:04 am

Re: How to change currency from USD to INR?

Postby rakshith_d9 » Wed Apr 22, 2015 2:08 am

I have changed from $ to Rs but ONLY from $ to Rs symbol not the convertion from dollar to rupees,
Please help me how to do that.

rakshith_d9
Newbie
Newbie
Posts: 10
Joined: Wed Apr 22, 2015 2:04 am

Re: How to change currency from USD to INR?

Postby rakshith_d9 » Wed Apr 22, 2015 2:10 am

phillipuniverse wrote:Try changing the default locale in the BLC_LOCALE table. The dollar sign is output via the PriceTextDisplayProcessor which is invoked in Thymeleaf with something like:

Code: Select all

<span blc:price="*{retailPrice}"></span>



I have changed from $ to Rs but ONLY from $ to Rs symbol not the convertion from dollar to rupees,
Please help me how to do that.

arunmrao
Newbie
Newbie
Posts: 10
Joined: Mon Apr 20, 2015 3:57 pm

Re: How to change currency from USD to INR?

Postby arunmrao » Wed Apr 22, 2015 9:13 am

You will need to write some currency conversion code using exchange rates and such

rakshith_d9
Newbie
Newbie
Posts: 10
Joined: Wed Apr 22, 2015 2:04 am

Re: How to change currency from USD to INR?

Postby rakshith_d9 » Wed Apr 22, 2015 10:20 am

arunmrao wrote:You will need to write some currency conversion code using exchange rates and such


where exactly or in which class i need to add the code....

arunmrao
Newbie
Newbie
Posts: 10
Joined: Mon Apr 20, 2015 3:57 pm

Re: How to change currency from USD to INR?

Postby arunmrao » Wed Apr 22, 2015 10:30 am

I would write a scheduled job that runs nightly and updates the entire catalog pricing based on the exchange rate for that day

rakshith_d9
Newbie
Newbie
Posts: 10
Joined: Wed Apr 22, 2015 2:04 am

Re: How to change currency from USD to INR?

Postby rakshith_d9 » Wed Apr 22, 2015 11:42 am

arunmrao wrote:I would write a scheduled job that runs nightly and updates the entire catalog pricing based on the exchange rate for that day


Please share that code..

shivprakash_sp
Newbie
Newbie
Posts: 1
Joined: Mon Jan 25, 2016 3:30 am

Re: How to change currency from USD to INR?

Postby shivprakash_sp » Mon Jan 25, 2016 3:52 am

I am trying to run site project in eclipse with tomcat and mysql. and trying to add new currency and locale, so i added below row to corresponding table
blc_currency table:New row: currency_code='IND', default_flag='1'
blc_locale table : New row :new locale "en_IN" and currency_code "INR", default_flag='1'

And added new message_IN properties in source code of site project.

For table blc_currency, made default_flag as 0 other than currency_code='IND' and for table blc_locale, made default_flag as 0 other than locale_code='en_IN'

And after restarting server, getting defaultSku.onSale related error in productListItem.html/productItemList.html as IllegalArgumentException. It may be because of null defaultSku value.

Can anybody please help on this.

Thanks in advance.


Return to “Broadleaf Commerce Demo”

Who is online

Users browsing this forum: No registered users and 2 guests