Developer forum

Forum » Templates » Switching currency

Switching currency

Nikki Strømsnes
Reply
I'm working on an international shop, and the client wants the user to be able to switch between different currencies on the go. For example, on the products and the cart on their Scandinavian site, they would like to change between NOK, DKK and SEK in a select box, and on the English site, they want to change between EUR and GBP.

I know it possible to type in prices in different currencies, but is it possible at all to switch between the currencies on the frontend as described? If not, do any of you have an idea how to make a workaround?

Replies

 
Nikki Strømsnes
Reply
I figured out, that you could just add a CurrencyCode=[xxx] to the query. However, some times I get this error message: "Attempt to aritmatic with two prices of different currency". Anyone seen that before, or know what it means?
 
Nicolai Høeg Pedersen
Reply
That happens some times when you add a product to cart and then changes currency.

I've asked QA to reproduce the issue and register a bug so we can get it fixed.

Thanks!

 
Anders Ebdrup
Reply

That happens some times when you add a product to cart and then changes currency.

I've asked QA to reproduce the issue and register a bug so we can get it fixed.

 

Hi Nicolai,

 

Has this bug been fixed as it still seems to exist?

 

Best regards, Anders

 
Merethe Nielsen
Reply

Hi Anders.

We have had this "Attempt to aritmatic with two prices of different currency" in different scenarios and solved it, but unfortunately we have one issue at the moment: 14774: Aritmatic error if changing currencycode when logged in. When changing currencycode without being logged in should work as intended. Otherwise we would like you to create a case that describes the steps how to reproduce it.

Kind regards,
Merethe

 
Anders Ebdrup
Reply

Hi Merethe,

 

I think that I have now "succeeded" in reproducing the error which happens when using the CartLoaded notifier, where the right Context or Currency not is set on the order. Please also see this: http://developer.dynamicweb-cms.com/forum.aspx?ThreadID=35905

 

Best regards, Anders

 
Umar Farooq
Reply

Hi,

I am using price module and all the prices for different currencies are defined there. When i change the Curency on product page it returns the correct price but the when the product is added to the cart and you change the currency in the cart it returns the wrong orderline price ? It seems like it converts the price which is added to the basket based on the currency convertion rate defined in the management center.  Is this is a bug ? if yes, What could be the possible work arounds?

 

Best Regards,

Umar

 
Umar Farooq
Reply

Any Information regarding my last post?

 

 

 
Nicolai Høeg Pedersen
Reply

Hi Umar

We are looking into to it - and check what happens and if it is behaving as it should. It seems like a bug thatshould be fixed.

BR Nicolai

 
Christian Rud Skovgaard
Reply

Hi Umar,

I just did a test of this, and as you can see in the attached image it seems to work in this simple case:

The product without a price matrix entry gets converted to USD, while the product with a price matrix entry uses the USD price matrix price.

Maybe you can givfe us a URL to the site, make a screencast, or create a support case for the problem.

Kind regards

Christian

PriceMatrixCurrency.jpg
 
Umar Farooq
Reply

Hi Christian,

Thanks alot for your Feed back you are right its also working for me as in simple scenario but we would like to show the prices from the prices tab on product see my screen cast.

http://screencast.com/t/oAMnPm

/Umar

 

 
Christian Rud Skovgaard
Reply

Hi Umar,

Maybe we need to take a look at a copy of the site. It would be best if you can make a support case through our case system, and we will try to solve the problem as fast as possible.

Kind regards

Christian

 

You must be logged in to post in the forum