Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Reorder Address Fields


revenson

Recommended Posts

While creating an account, the default order of address fields is:

Street

Post Code

City

State

Country

 

I would like to move the Postal Code field to come after the State field. This is a more 'natural' entry order.

 

Is there a way to do this?

 

Thanks.

Link to comment
Share on other sites

Each country has an address format id.

 

This I believe controls the field order.

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

Inside catalog/create_account.php ...

 

Look for this block of code (red) and copy ...

 

<?php

if (ACCOUNT_SUBURB == 'true') {

?>

<tr>

<td class="main"><?php echo ENTRY_SUBURB; ?></td>

<td class="main"><?php echo tep_draw_input_field('suburb') . ' ' . (tep_not_null(ENTRY_SUBURB_TEXT) ? '<span class="inputRequirement">' . ENTRY_SUBURB_TEXT . '</span>': ''); ?></td>

</tr>

<?php

}

?>

<tr>

<td class="main"><?php echo ENTRY_POST_CODE; ?></td>

<td class="main"><?php echo tep_draw_input_field('postcode') . ' ' . (tep_not_null(ENTRY_POST_CODE_TEXT) ? '<span class="inputRequirement">' . ENTRY_POST_CODE_TEXT . '</span>': ''); ?></td>

</tr>

<tr>

<td class="main"><?php echo ENTRY_CITY; ?></td>

<td class="main"><?php echo tep_draw_input_field('city') . ' ' . (tep_not_null(ENTRY_CITY_TEXT) ? '<span class="inputRequirement">' . ENTRY_CITY_TEXT . '</span>': ''); ?></td>

</tr>

 

Locate this

if (tep_not_null(ENTRY_STATE_TEXT)) echo ' <span class="inputRequirement">' . ENTRY_STATE_TEXT;

?> <--After this ...

Insert/Paste block of code(red) here and delete the above block of code (red).

 

------

Backup file before making any edits.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...