Child pages
  • [in-commerce] Default Country Setup
Skip to end of metadata
Go to start of metadata

Hi guys,

I've discovered that core/units/helpers/site_helper.php is handling default country parameter, and it's overriding in-commerce order_config unit.

All happens in line 31: $country = 'USA';

I propose either to put this as a config parameter from admin, or simply remove it completely, and display a blank country dropdown when user need to select a country.

Talking about this country dropdown, I must admit that I'm used -for years- to manually remove from DB unwanted countries, to have a shorter list. I suggest that we could display only available countries, as setup in admin shipping countries.

Additionally, we may inspect if default country declarations in order_config are still needed. 

phil.

6 Comments

  1. This country is used in case if:

    • no site domains are used
    • there is no default country specified for billing/shipping/user address on current site domain

    Adding this fallback country as a system setting (with "USA" value by default) should do no harm and make country setup more flexible in future.

     

    P.S.

    Phil Banks, please use dedicated "Create" button on top for page creation to ensure, that all page labels are set correctly.

    1. In-Portal being a real multi-language platform, I'm proposing to be able to setup this fallback country in admin, instead of having it hardcoded.

      What about a new way to avoid this too long country list we have by default? Dmitry, are you used to keep the list that long on all projects?

      1. In-Portal being a real multi-language platform, I'm proposing to be able to setup this fallback country in admin, instead of having it hardcoded.

        That's what I said in my comment.

        What about a new way to avoid this too long country list we have by default? Dmitry, are you used to keep the list that long on all projects?

        We can add Status field for countries/states (if it's not there already), like we have for Currencies to be able to selectively disable unneeded countries/states.

      2. I would say having a Status field for Countries and States records would help.

        Phil Banks do you know if we have one right now by any chance?

  2. I don't think we have, because otherwise having this Status field and not using would be a shame.

  3. Sadly we don't have it, checked on 521 RC1.