Developer forum

Forum » Ecommerce - Standard features » How to handle exception PriceInfoCurrencyException

How to handle exception PriceInfoCurrencyException

Lars Larsen
Lars Larsen
Reply

Hi

We have a solution running v9.6.9. If you add products to the cart on one website that uses Euro and then switches to a website that uses eg. DKR we get this exception:

Dynamicweb.Ecommerce.Prices.PriceInfoCurrencyException: Attempt to aritmatic with two prices of different currency

How can we handle this so that the user does not see this errormessage?


Replies

 
Nicolai Pedersen
Reply

Hi Lars

Upgrade is the best way of course.

Otherwise I remember this issue to be an issue with different currency code on orderlines and order object. So something in your stack of that has the wrong currency.

You need to listen to the correct notification to get hold of the objects early in the rendering process. currencycode=eur is handled by Dynamicweb in a PageLoaded subscriber and you have to get in front of that to get rid of the error - if you cannot upgrade.

BR Nicolai

 
Lars Larsen
Lars Larsen
Reply

Hi Nicolai
I have been trying subscribing to different notifications but without any luck. Which notification would you suggest?

 

You must be logged in to post in the forum