Developer forum

Forum » Ecommerce - Standard features » A few Country based restrictions

A few Country based restrictions

Adrian Ursu
Reply

Hi Guys,

I have this case where a single DW solution hosts multiple countries, each country with its own shop.

I need to be able to:

1. Restrict users from creating addresses that are outside of the Country that the shop will deliver to

2. Restrict purchases for addresses outside of the Country that the shop will deliver to.

I don't want to use separate templates (a complete maintenance nightmare to update 20+ templates).

Ideally I would use something that's set(able) to the Shop.

I already tried to read Ecom.Country.Name in Extranet module templates without any luck but maybe I am using the wrong tag.

I probably need to access both Country name and Country code.

Thanks,

Adrian

 


Replies

 
Nicolai Høeg Pedersen
Reply

Hi Adrian

On the website properties you set up the regional settings - i.e. Germany. That gives you a number of global tags - Global:Area.Culture.*, i.e. Global:Area.Culture.CountryCode that you can use for conditional rendering of countries in your template.

If your template is Razor, you can also use the CultureInfo instance of the thread (System.Threading.Thread.CurrentThread.CurrentCulture)

BR Nicolai

 
Adrian Ursu
Reply

Hi Nicolai,

That's fine for single country cases. But what about shops for Benelux? They need to be able to deliver in Netherlands, Belgium and Luxembourg.

The only way I see it now is create an Item Selector for countrie sin the Website Area. But that would be totally disconnected and redundant from the shipping or shop settings.

I have to emphasise that these are real case scenarios coming from a lot of discussions with MBT. I assume there can be other international cases similar with this one.

Thanks,

Adrian

 
Nicolai Høeg Pedersen
Reply

Yes, i get it. But until we have a solution, this is an option.

So a delivery country selector on the cart instance (like with payments) would be an optiion? See dump.

Capture.PNG
 
Adrian Ursu
Reply

Yup. It can be an option. But we also need to connect it (make it available) in the Extranet module. The Addresses that a user can create, should be limited as country options to the ones selected in the cart instance.

Therefore, I would suggest, adding this limitation to the Shop definition, could make more sense and leave the option to select in Cart instance just countries from the list of Delivery countries set on Shop level.

I hope this make sense.Thanks,

Adrian

 
Nicolai Høeg Pedersen
Reply

It does, thank you for clarifying.

 

You must be logged in to post in the forum