Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

States not appearing in addresses.


Guest

Recommended Posts

From the various places where addresses can be entered or modified (account & checkout) the state does not show up in the database table nor in the resulting address shown on the .php page (which makes sense since it is usually not in the db). However, even when manually adding the state to the db - the state still does not show up in the address shown on the .php page.

Link to comment
Share on other sites

Look to the configuration file in catalog and admin. And also look in the database for address format. Second find admin/configuration/shipping and make sure your country of origin is set correctly. Next in configuration/customer details make sure 'state' is set to 'true'. And make sure in admin/configuration/my store the country and state are set correctly. Post again if you have problems

Link to comment
Share on other sites

I did not have the problem with the state not showing on the php pages -- it should pull from the zone_id ?? But, I did want the state showing in the database. The original code adds the zone_id, not the state, to the address book unless the zone id is '0'

 

To make it add the state regardless, change in catalog/create_account.php, checkout_payment_address.php, and checkout_shipping_address.php (and catalog/create_account_process.php if you have that file):

 

 if (ACCOUNT_STATE == 'true') {
? ? ? ?if ($zone_id > 0) {
? ? ? ? ?$sql_data_array['entry_zone_id'] = $zone_id;
? ? ? ? ?$sql_data_array['entry_state'] = '';
? ? ? ?} else {
? ? ? ? ?$sql_data_array['entry_zone_id'] = '0';
? ? ? ? ?$sql_data_array['entry_state'] = $state;
? ? ? ?}
? ? ?}

 

to

 ? ? ?if (ACCOUNT_STATE == 'true') {
? ? ? ?if ($zone_id > 0) {
? ? ? ? ?$sql_data_array['entry_zone_id'] = $zone_id;
? ? ? ? ?$sql_data_array['entry_state'] = $state;
? ? ? ?} else {
? ? ? ? ?$sql_data_array['entry_zone_id'] = '0';
? ? ? ? ?$sql_data_array['entry_state'] = $state;
? ? ? ?}
? ? ?}

 

As far as I can tell this has not caused any problems...and maybe it will solve both of yours.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...