Developer forum

Forum » Ecommerce - Standard features » Currency conversion quantity prices

Currency conversion quantity prices

Vincent Gercke
Reply

Is it possible for DW to convert quantity prices based on the rates set up in Currencies, if the selected currency doesn't have any prices?

In the example above the price returned is 0 if I try to show prices in DKK, since the Price productfield is 0.

 


Replies

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply
This post has been marked as an answer

Currently not.

If not price is found for a currency in the matrix, it will fall back to the price on the product it self (also in default currency) and convet that.

A workaround is to create a custom priceprovider that calls DefaultPriceProvider.FindPrice with the default currency (EUR) instead of the currency set on price context passed to your custom priceprovider.FindPrice.

You can do that if you know you never have DKK prices. 

Alternatively you can call DefaultPriceProvider.FindPrice twice - with the default currency (EUR) and the context.currency - and then somehow make the decission which one to return. After you converted to the currency of the context.

Easy, eh?

Votes for this answer: 1
 
Vincent Gercke
Reply

I see! I'll see if I can manage with a price provider. Thanks!

 

You must be logged in to post in the forum