Along with defining countries in the Commerce module, we also need a settings form that allows us to update availability. This settings form will need to list countries with checkboxes for each instance of an addressfield widget governed by DC determining availability... and some way to determine default country. Damien had an idea for a new form element to do this mimicking the Languages List in the International settings on Mac OS X:

Only local images are allowed.

Comments

Bojhan’s picture

So suggested was in the case of shipping and payment differences to have just two lists rather than combining one. However I would suggest having a checkbox. My billing is in the same country, kind of thing?

rszrama’s picture

Ahh, that would be quite helpful. : D

redben’s picture

Are the countries going to be defined in commerce module ? I think theres an function in d7 core includes that returns the list of countries ? couldn't that be used ?

rszrama’s picture

It could be, but we'll need more information than core defines. I suppose we can use hook_countries_alter(), though, as defined by country_get_list(). The only problem is if we alter that array to include extra information, I'm not sure what else it'd break... so it might not be possible.

tr’s picture

+1

joachim’s picture

As far as helper modules go, there's http://drupal.org/project/countries for D7, and the more basic http://drupal.org/project/countries_api (still D6 only).

joshuabud’s picture

As per this post information utilizing the Address Field settings here http://drupal.org/node/1176408 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?

1kenthomas’s picture

@JoshuaBud:

I have no problem restricting both billing & shipping fields to the US (single country). FWIW.

quardz’s picture

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

tim.plunkett’s picture

Issue summary: View changes

Fixing input format.

bojanz’s picture

Status: Active » Closed (outdated)