Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Remove the "Select Countries" option!


Ohem

Recommended Posts

Hi!

 

I'm trying to get rid of the option to choose a country, which i successfully did by editing creating_account.php and some other files where the country "list" shows. Unfortunately it gave one consequence, apparently when no country "id" is filled within the member info - no adress shows up on some areas such as checkout_shipping_adress (i think it was).

 

I don't want the option for users to choose a country nor want the country to be "pre-selected" when creating account, changing adress etc etc. But I'm fine, if it can be done, to let Sweden be pre-selected and let the code automatically send info to the database - but not to appear in adress info, invoice or a members account.

 

I have no reason to have an option where customers can choose countries when the business only will be within Sweden.

Link to comment
Share on other sites

You could delete all the countries from the db except Sweden.

 

Here are some extracts from previous post that might be of use

 

In catalog/create_account.php

change:

 

 

CODE

tep_get_country_list('country')

 

to

 

CODE

tep_get_country_list('country', '150')

change 150 (Netherlands) to 222 for UK or to 223 for US etc etc

 

You can do the same for (if people want to change address at checkout):

catalog/includes/modules/checkout_new_address.php

 

My client wanted his three top countries moved to the top of the country selected, the US, Canada, and the UK.

 

This is what I did:

 

in includes/functions/general.php

 

right after the country array is loaded from the db:

 

while ($countries_values = tep_db_fetch_array($countries)) {

$countries_array[] = array('countries_id' => $countries_values['countries_id'],

'countries_name' => $countries_values['countries_name']);

}

 

 

add the following code:

 

array_unshift($countries_array,

array('countries_id' => 223, 'countries_name' => "United States"),

array('countries_id' => 38, 'countries_name' => "Canada"),

array('countries_id' => 222, 'countries_name' => "United Kingdom"));

 

Another couple of threads might be of interest

 

http://addons.oscommerce.com/info/4473 (UK & Overseas Postage Methods)

http://www.oscommerce.com/forums/index.php?showtopic=277269 (Only if you plan to post to UK only! Removing Country Selection on Register.)

Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile

 

Virus Threat Scanner

My Contributions

Basic install answers.

Click here for Contributions / Add Ons.

UK your site.

Site Move.

Basic design info.

 

For links mentioned in old answers that are no longer here follow this link Useful Threads.

 

If this post was useful, click the Like This button over there ======>>>>>.

Link to comment
Share on other sites

Hi!

 

I'm trying to get rid of the option to choose a country, which i successfully did by editing creating_account.php and some other files where the country "list" shows. Unfortunately it gave one consequence, apparently when no country "id" is filled within the member info - no adress shows up on some areas such as checkout_shipping_adress (i think it was).

 

I don't want the option for users to choose a country nor want the country to be "pre-selected" when creating account, changing adress etc etc. But I'm fine, if it can be done, to let Sweden be pre-selected and let the code automatically send info to the database - but not to appear in adress info, invoice or a members account.

 

I have no reason to have an option where customers can choose countries when the business only will be within Sweden.

 

Use "Force Customer Country" Contribution

Link to comment
Share on other sites

Well i finally solved the issue, by deleting the name "Sweden" (not the id, only the name) in the table "countries" the Force customer contrib works perfectly combined - along with some country field removing, it looks more "professional". When forcing a country the name would still appear in the checkout but when removed in the table leaving only the necessary id for osC to use, saves a row and shows less info.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...