Some stores does not ship international, or ship to limited set of countries only.

DC needs a setting of allowed countries.

Only set of allowed countries should appear on checkout page.
If only one country is allowed, country select widget should be not shown on checkout page.

Comments

rfay’s picture

Commerce core doesn't do shipping... Is this an issue for shipping or for commerce in general?

xy2’s picture

Status: Active » Closed (won't fix)
Issue tags: +addressfield

Found this setting here:

/admin/commerce/customer-profiles/types/billing/fields/commerce_customer_address

This is addressfield setting.

joachim’s picture

Component: Checkout » Developer experience
Status: Closed (won't fix) » Active

> Commerce core doesn't do shipping... Is this an issue for shipping or for commerce in general?

For Commerce in general, since Commerce provides a billing customer profile.

> This is addressfield setting.

Having to set this within the field settings doesn't feel very sturdy, or discoverable. Also, it means that modules that provide further address-y things (eg shipping) don't pick up on it and have to be configured too.

I can see a case here for a store-wide setting.

rszrama’s picture

Status: Active » Closed (duplicate)

The Address field setting will be the right place to make restrictions, but what I'd like to see is a global store setting that we then use to alter the available countries in address fields used on customer profiles. There's actually another issue with a screenshot and a few notes about an interface we'd like to copy, so let's stick with that one for now (and maybe finally address it ; ): #842082: Implement country availability settings

summit’s picture

Hi, this was great information:

/admin/commerce/customer-profiles/types/billing/fields/commerce_customer_address

Now I can control that the order is only from my own country.

greetings, Martijn

joshuabud’s picture

I managed to implement this as well but for some reason it doesn't work properly for the shipping address field.

On the cart page I was able to limit the drop down to 2 countries on the Billing Address section but the Shipping Address section of the same page displays all countries. Any suggestions?

BrendanP’s picture

@JoshuaBud

Same problem here, please let post a solution if you find one, will do the same.

Cheers
Brendan

1kenthomas’s picture

@JoshuaBud, BrendanP:

No problem here AFAICT, FWIW.

ludde_t’s picture

The shipping and billing are different fields so for the shipping address the link would be:

/admin/commerce/customer-profiles/types/shipping/fields/commerce_customer_address

mihai_brb’s picture

Issue summary: View changes

Hello,

Manage fields is quite confusing for clients. I had to provide a simple UI where a shop manager can limit the countries.
Here's a small module that exposes only the country list selector for shipping. It also has a config form where an admin can setup what addressfield from what customer profile to use.

https://www.drupal.org/sandbox/mihai_brb/2308211

Mihai