Download & Extend

Re-evaluate installation of all countries

Project:UberDrupal
Version:6.x-1.x-dev
Component:Code
Category:task
Priority:normal
Assigned:Unassigned
Status:needs work

Issue Summary

I don't think it's a good idea to install all countries on install because of the message spam and the fact that most stores use a select few countries. Because we're allowing users to set their address up front, it would be nice to give them the option of which countries to install on a step before the address configuration. I'm envisioning a tableselect that lists out all available countries and uses the "select all" box in case someone does indeed want every country installed.

Comments

#1

Actually, I updated the country import API func to not display any messages and simply return TRUE or FALSE to indicate the success of an import. UberDrupal has been modified to use uc_country_import() to avoid any sort of submit messages, but we should still consider allowing the user to specify his countries instead of installing them all at once.

#2

Yeah this is a problem.
Small business setups (which an install profile is appropriate for compared to multinationals) are pretty likely to just ship or provide services locally.
Now I've got 200 buttons to press just to turn them all off.

... Ah, I see that maybe they were preloaded just to support the storefront setup form. Those country defs needed to be preloaded for that to even work.
Chicken & egg.
Hm. Can we DISABLE all those extras later?

#3

Status:active» needs review

Choose region before adding store location

... and we can choose to only import relevant country options.

Here's apatch that adds that extra step. It's a bore that we need an extra step, but for the store location details on the next page to make sense, it has to be inserted there.



For now it does not make the effort to remove the default (US) zone while adding new ones, but at least it's not adding Andorra + 113 others etc unless you want it.

AttachmentSize
uberdrupal-optional_countries-20091113.patch 5.7 KB
uberdrupal_country_selection.png 62.69 KB
uberdrupal_country_store_address.png 15.72 KB
uberdrupal_country_configuration.png 41.48 KB

#4

Assigned to:Anonymous» thill_

This is an old issue but I will review before the "final" 1.0 is released.

#5

Assigned to:thill_» Anonymous
Status:needs review» needs work

I am getting the following if I select United States because it is already installed.

user warning: Duplicate entry '840' for key 1 query: INSERT INTO uc_countries (country_id, country_name, country_iso_code_2, country_iso_code_3, version) VALUES (840, 'United States', 'US', 'USA', 1) in /Applications/MAMP/htdocs/uberdrupal/profiles/uberdrupal/modules/ubercart/uc_store/countries/united_states_840_1.cif on line 6.

I am not sure if this should hold up this feature, or if there is a good work around.

nobody click here