Developer forum

Forum » Development » product prices

product prices


Reply

The prices on the products in different currency are not related to the currency rate.

I need to sett different prices for different countries and depending on witch currency is used show the right price.

How do I do this?


Replies

 
Nicolai Høeg Pedersen
Reply
paul wrote:

The prices on the products in different currency are not related to the currency rate.

I need to sett different prices for different countries and depending on witch currency is used show the right price.

How do I do this?


 

Hi Paul

 

Currencies can be handled in 2 different ways:

1) Using currency rates which will calculate the price in a currency based on the price and the rate. Using this approach you need to set the price in your default currency on the product and in the currency module handle the rates. In the Language/Area module on the ecom tab you can set the currency that should be used. You can also add a currency picker in the frontend.

 

2) Explicit specifying the price for a product in each currency. When the currencies are created type a price for each product in each currency on the price tab on the product. This way nothing is calculated.

 

Countries and prices are not linked. Countries has something to do with delivery and will control fees on delivery and payment. VAT is/can also controled by delivery country.

 

So, lets say you have a product in two languages: Swedish and English. This product is for sale in Sweden, Denmark and England. to do this you need 3 different currencies, SEK, DKK and GBP

 

You would have 3 language/areas each of which have a currency and language attached.

- Swedish shop: Swedish currency, Swedish language

- Danish shop: Danish currency, English language

- English shop: English currency, English language

 

Countries is delivery.

 

So if a custom in the danish shop wants things delivered to Norway, this is where its used. Can be used for controlling shipping fees and VAT if needed.

 

So in you situation what you want is using the currency where you insert the price on the price tab of the product for each currency.

 

Hope this clarifies things a little.

 
Reply

Hi  Nicolai

 

if I want ONE language Area (English) that can have USD, GBP and CAD so we only need to change the product once wven if it's to 3 diferent prices, how can I accomplish this?

 

Is there any way to extend / override some function to get this working, imagine for example that we can have the currency from a cookie

 

as an example:

 

in the website the user has the possibility to select a language:

Great Britain (English)
United States (English)
Canada (English)

 


I only want to have ONE Language Area/ID so any change in a page has to be done just once instead of 3 times (one per language/currency)

 

Now, if the user selects CAnada (English) for example, I will set a cookie with the value "CAD"

 

My question is, is there any way to Override some method in order to:


Single price = 0;


   // get product object from product ID

 

try

{

   String currency =

HTTPContext.Current.Resquest.Cookie["eCommerce-Currency"].ToString();

   if ( currency.Length > 0 )

   {

      switch(currency.ToLower())

      {

            case "cad" : price = product.ColumnCAD; break;

            case "usd" : price = product.ColumnUSD; break;

            case "gbp" : price = product.ColumnGBP; break;

      }

   }

}

catch( Exception ex )

{ }

 

if ( price == 0 ) price = product.Price;

 

return Template.Output();

 

--------------

 

is this possible for some how? how can I do this?

I'm a newbie at the DW API (only 2 weeks on it) but I hope you guys can put me in the right path to accomplish something like this. Thank you.

 

And by the way, is there any way to get documentation on each method on each class for the DynamicWeb API?

 

Thank you very much

 

 

--

Bruno Alexandre

Valby, Danmark

 
Reply

You can pass a currency code as a querystring parameter, e.g.

http://MySite.com/Default.aspx?ID=1&CurrencyCode=EUR

 

This allows you to change the currency to another of the registered currencies in eCom.

 

You must be logged in to post in the forum