Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How to make country field not mandatory in signup


treeman

Recommended Posts

Posted

Hi,

 

I blanked out the country field in user signup as I do not need this feature. But now users are not able to sign up as the script pickups up this field as unfilled.

How can I make the country not mandatory to sign up? Or prehaps have it default on some country.

 

Thanx for any tips

Posted

Actually I noticed my shipping modules will not work well if there is no country specified at all, so the best solution would be to have a country autoset on some country and remove the field from the user. So when they sign up they automatically get assigned a country but don't see the field. Its probably not too hard to do if somebody is familiar with the code, I would appreciate any help at all! thanx guys

Posted

Ok guys I found the answer, for those that might want to do the same here is the solution:

 

Edit:

 

create_account.php

 

$country = tep_db_prepare_input($HTTP_POST_VARS['Country']);

 

Change to

 

$country = tep_db_prepare_input($HTTP_POST_VARS['Australia']);

 

 

The default country is now Australia

  • 2 weeks later...
Posted

Correction, you need to set the country variable to the country id

E.g $country = 13;

 

In my case country id for Australia is 13

 

Country id can be found in my sql in country table

Archived

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

×
×
  • Create New...