Developer forum

Forum » Development » Choose country to show shippingcost when shopping

Choose country to show shippingcost when shopping


Reply
Hi there,

We are developing a new international webshop. We want the webshopper to be able to select the delivery country so we can show special prices and shippingcosts based on the selected language. The language-list is based on the available countries in the "internationaliseringsmodul".

My question!

How do I get this list in a dropdown menu that sets the webshoppers deliverycountry even before putting stuff into the cart?

We are using Cart V2 and can not do anything unless the cart is NOT empty.

I am looking forward to your replies! :-)

Replies

 
Nicolai Høeg Pedersen
Reply

You need to do a notification subscriber and add a loop to the page template for instance.

In there you can do a loop like this:
For Each c As eCommerce.International.Country In eCommerce.International.Country.getCountries

Next

Then submit the chosen country code and set it also in the notification subscriber:
Dynamicweb.eCommerce.Common.Context.Country = New Dynamicweb.eCommerce.International.Country("DK")

Instead of harcoding "DK" let it come from the post or a querystring variable.
 

 

You must be logged in to post in the forum