Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

postal code move


Guest

Recommended Posts

Do you mean on create_account.php? The postal code and state are around line 400. Move

<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>

to after the entry_state stuff

Link to comment
Share on other sites

Do you mean on create_account.php? The postal code and state are around line 400. Move
<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>

to after the entry_state stuff

 

I changed that, and it changes that one page, but the admin, shipping , etc , did not change.

Ralph

Link to comment
Share on other sites

In the contributions section there is a UK based version of oscommerce. Someone has sat down and altered from US to UK all the main things that require changing, including the date formats and address layouts. Do a search and see.

REMEMBER BACKUP, BACKUP AND BACKUP

Link to comment
Share on other sites

I changed that, and it changes that one page, but the admin, shipping , etc , did not change.

Ralph

 

You have to edit each page manually.

Do, or do not. There is no try.

 

Order Editor 5.0.6 "Ultra Violet" is now available!

For support or to post comments, suggestions, etc, please visit the Order Editor support thread.

Link to comment
Share on other sites

  • 3 weeks later...
When is the sort order for the postal code info, I don't want to keep it before the state.

I had the same issue brought to my attention by a customer creating an account. She said that having the "Post Code" before "State" was throwing her off. This is when I sat down to change it.

 

a) First I changed the file "create_account.php" file in /catalog. In this file the change is simply to move the lines of code containing the "Post Code" below the "State". This is the section of your code that has to be moved:

 

<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>

 

By moving this code in the "create_account.php" script, all new account creation will now have "Post Code: show below "State".

 

b) Second, I changed the /catalog/includes/modules/address_book_details.php file. This file is the one used when the address recorded against a customer account has to be modified or deleted or when a new address entry has to be recorded for an existing customer account. In this file, I moved the following code for "Post Code" below "State".

 

<tr>

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

<td class="main"><?php echo tep_draw_input_field('postcode', $entry['entry_postcode']) . ' ' . (tep_not_null(ENTRY_POST_CODE_TEXT) ? '<span class="inputRequirement">' . ENTRY_POST_CODE_TEXT . '</span>': ''); ?></td>

</tr>

 

This should take care of all the Post Code appearing before State in add, delete, edit addresses for a customer account. Hope this helps. Good luck.

 

JTM

Link to comment
Share on other sites

I had the same issue brought to my attention by a customer creating an account. She said that having the "Post Code" before "State" was throwing her off. This is when I sat down to change it.

 

a) First I changed the file "create_account.php" file in /catalog. In this file the change is simply to move the lines of code containing the "Post Code" below the "State". This is the section of your code that has to be moved:

 

<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>

 

By moving this code in the "create_account.php" script, all new account creation will now have "Post Code: show below "State".

 

b) Second, I changed the /catalog/includes/modules/address_book_details.php file. This file is the one used when the address recorded against a customer account has to be modified or deleted or when a new address entry has to be recorded for an existing customer account. In this file, I moved the following code for "Post Code" below "State".

 

<tr>

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

<td class="main"><?php echo tep_draw_input_field('postcode', $entry['entry_postcode']) . ' ' . (tep_not_null(ENTRY_POST_CODE_TEXT) ? '<span class="inputRequirement">' . ENTRY_POST_CODE_TEXT . '</span>': ''); ?></td>

</tr>

 

c) Third, do exactly the same as above in the /catalog/includes/modules/checkout_new_address.php file. The change made here will move the "Post Code" below "State" during the checkout process.

 

This should take care of all the Post Code appearing before State in add, delete, edit addresses and during checkout for a customer account. Hope this helps. Good luck.

 

JTM

Link to comment
Share on other sites

  • 4 years later...

If you found this discussion when looking for info on how to change the display order of address information (for example in the small box that shows the customer's primary address upon checkout) in osCommerce 2.3.1 (not sure about other versions), this might be helpful.

 

Go to your MySQL/database. Check out the table called 'address_format'. There you'll have a number of rows (probably five). Under column 'address_format' you'll have stuff like "$firstname $lastname$cr$street..." Move those around in the first row, and that should do the trick.

 

For example, if you want the zip code to display before the city and without the comma (i.e. in the European way):

 

Change

 

$city, $postcode

 

To

 

$postcode $city

 

P.S. I don't know if there's a way to do this via the admin panel, so my apologies if this advice is redundant!

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...