I've been trying to utilize Tea Commerce on my site, I installed the package and looking into the started kit and documentation.
I need a way for users to be able to change currency, I didn't find it in the started kit and looking at the documentation, but it doesn't seem to be working.
I'm displaying current currency on the page using Razor:
Have you tried to use the TC.SetCurrentCurrency, from the documentation it says: SetCurrentCurrency: Changes the current currency of the customer's session. The currency is also changed for the customer's current order if present.
Both of these variables are GBP, and changing id in metod call doesn't change anything, if I try TC.SetCurrentCurrency(storeId, 42); it's still GBP, no errors or anything. I'm using Tea Commerce 2.3.1 with Umbraco 6.1.6
Is the currency allowed in the payment country that your order has at the moment (the default country is specified at the store settings). If the currency isnt allowed, it wont change.
How to change currency?
Hi!
I've been trying to utilize Tea Commerce on my site, I installed the package and looking into the started kit and documentation.
I need a way for users to be able to change currency, I didn't find it in the started kit and looking at the documentation, but it doesn't seem to be working.
I'm displaying current currency on the page using Razor:
Then I try to change it using javascript:
currency
javascript variable seem to be set to the right currency, but after I refresh the page it's still default one.How ca I do it? Btw, is the method name correct?
Thank you.
Hi Zakhar,
I have only played a litlle bit with Tea Commerce starter kit some while ago. But maybe this can help you.
http://rune.gronkjaer.dk/en-US/2011/07/15/tea-commerce-languages-countries-and-currencies/
Have you tried to use the TC.SetCurrentCurrency, from the documentation it says: SetCurrentCurrency: Changes the current currency of the customer's session. The currency is also changed for the customer's current order if present.
You can find the documentation for SetCurrentCurrency here: http://documentation.teacommerce.net/razor-api/currency/setcurrentcurrency/
Hope this can help you.
/Dennis
Hi Zakhar
@Dennis is right - THANKS!
Kind regards
Anders
Hi guys,
Thanks, I tried that too, but it doesn't work either.
I currently have 2 currencies, GBP (id = 2) and USD (id = 3)
I have this code on my page:
Both of these variables are GBP, and changing id in metod call doesn't change anything, if I try
TC.SetCurrentCurrency(storeId, 42);
it's still GBP, no errors or anything. I'm using Tea Commerce 2.3.1 with Umbraco 6.1.6Zakhar.
Is the currency allowed in the payment country that your order has at the moment (the default country is specified at the store settings). If the currency isnt allowed, it wont change.
Kind regards
Anders
is working on a reply...