Developer forum

Forum » Rapido » Country list in Add/Edit Address in Customer Center

Country list in Add/Edit Address in Customer Center

Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

Hi there,

Where is the country list in Add/Edit address in the customer center come from? I like to limit the list to a few countries and translate the names to the local site's language, but I can't find them in the backend. Should these come from the Internationlization | Countries list instead? Would you ever want an Ecom address that you can't check out to?

Thanks!


Replies

 
Kurt Moskjær Andersen
Kurt Moskjær Andersen
Reply

Hi Imar,

Did you find a solution for this?

--
Best regards
Kurt Moskjaer Andersen

 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

Hi Kurt,

Nope, sorry, I didn't.

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

It is a list of .net cultures

You can use Countryservice.GetCountries() instead - that will give you a list of ecommerce countries only

 
Kurt Moskjær Andersen
Kurt Moskjær Andersen
Reply

Thanks, Nicolai. Works like a charm :)

What if I would like to segment the list of countries, so you have different set of countries to choose from, whether you are on a Norwegian or a Danish language layer - both sharing the same shop?

Am I missing a setting here?

--
Best regards
Kurt Moskjaer Andersen

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

Hi Kurt

I am not sure I understand that question.

You can use Pageview.Current().Area.EcomCountryCode to do some checks in the template - that country code will be the ecommerce country set for the current website.

BR Nicolai

 
Kurt Moskjær Andersen
Kurt Moskjær Andersen
Reply

Hi Nicolai,

Sorry, my clumsy explanation :)

I have a website with two languages - the Danish is the website itself and the Norwegian is a language layer. They both share the same shop (Ecommerce).

I've setup a bunch of languages in Settings -> Ecommerce -> Internationalization -> Countries. On the Norwegian version, the customer should only be able to select Norway as a country for shipping, where as Danish customers should be able to select a whole lot more. Is this possible when they share the same shop or is it related to shipping settings?

--
Best regards
Kurt

dw-ecom-countries.jpg
 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

You have to do some logic in the template using the ecomcountry property 

 
Kurt Moskjær Andersen
Kurt Moskjær Andersen
Reply

Okay, thanks :)

/Kurt

 

You must be logged in to post in the forum