Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Changing Address Order


Nobby B

Recommended Posts

Posted

Does anybody know where I can change the order of the address details that appear when viewing My Personal Address Book. I have configured the form field to the order I would like when the user inputs their information, but when viewing the address the order is not the same. I would like the Postcode (this is UK) to appear after the County, before the Country. At the moment it's after the city and before the county!

 

Please help anybody....

 

Thanks in advance

 

Carl

Posted
Does anybody know where I can change the order of the address details...

This problem is a right royal pain in the rear. I'm afraid there is no simple solution; you need to hack the code to jiggle the fields about. It took me ages to do - you need to do it in the login page, the address book and a couple of other places too. And you probably ought to move the error checking round (ie - "you have not filed in the following fields....") so that it is in the correct order when presented to the customer. Not to mention the admin pages!

 

I'm only surprised that more people don't seem to cite this as a problem! It's really really crap that the address format is (very) hard coded like this.

 

Some time back, I think someone was going to put together a 'UK' contribution (there was definitlely some discussion about it) that would address all this stuf. Might be worth huntimg about to see what came of it, if anything.

 

Good luck.

 

Rich.

Posted
This problem is a right royal pain in the rear. I'm afraid there is no simple solution; you need to hack the code to jiggle the fields about. It took me ages to do - you need to do it in the login page, the address book and a couple of other places too. And you probably ought to move the error checking round (ie - "you have not filed in the following fields....") so that it is in the correct order when presented to the customer. Not to mention the admin pages!

 

I'm only surprised that more people don't seem to cite this as a problem! It's really really crap that the address format is (very) hard coded like this.

 

Some time back, I think someone was going to put together a 'UK' contribution (there was definitlely some discussion about it) that would address all this stuf. Might be worth huntimg about to see what came of it, if anything.

 

Good luck.

 

Rich.

I have this problem, I have managed to get the address entry how I would like it but I cant see how to change the way the address is displayed in the invoice.

 

Any help would be appreciated.

 

Rick

Posted
I have this problem, I have managed to get the address entry how I would like it but I cant see how to change the way the address is displayed in the invoice.

 

Any help would be appreciated.

 

Rick

You do this by adjusting the "address format" database table strings. Really easy, eh ?

 

Rich.

Posted
You do this by adjusting the "address format" database table strings. Really easy, eh ?

 

Rich.

 

Can you elaborate?

Is this something I need to do with phpmyadmin? I havent used it in a while.

Posted
Can you elaborate?

Is this something I need to do with phpmyadmin? I havent used it in a while.

 

Modify the 'address_format' table to match the following. This table contains two columns; a long format and a short format. The entry marked with a 'x' is probably ok and does not need changing.

Use phpMyAdmin to do this

 

1 $firstname $lastname$cr$streets$cr$city$cr$state$cr$postcode$cr$country | $city / $country

x 2 $firstname $lastname$cr$streets$cr$city, $state $postcode$cr$country | $city, $state / $country

3 $firstname $lastname$cr$streets$cr$city$cr$statecomma$postcode$cr$country | $state / $country

4 $firstname $lastname$cr$streets$cr$city$cr$postcode$cr$country | $postcode / $country

5 $firstname $lastname$cr$streets$cr$city$cr$postcode$cr$country | $city / $country

 

Here's an alternative entry for the last entry...

 

This sets the last line (no. #5) to be the same as the first line. This was because format #5 tends to get used for invoice / packing slip and this did not include the county (which isn't correct). The reason for this is that format #5 is the one specified in the customer details (why, I have no idea). So...

 

5 $firstname $lastname$cr$streets$cr$city$cr$state$cr$postcode$cr$country | $city / $country

  • 3 weeks later...
Posted
Modify the 'address_format' table to match the following. This table contains two columns; a long format and a short format. The entry marked with a 'x' is probably ok and does not need changing.

Use phpMyAdmin to do this

 

1 $firstname $lastname$cr$streets$cr$city$cr$state$cr$postcode$cr$country | $city / $country

x 2 $firstname $lastname$cr$streets$cr$city, $state $postcode$cr$country | $city, $state / $country

3 $firstname $lastname$cr$streets$cr$city$cr$statecomma$postcode$cr$country | $state / $country

4 $firstname $lastname$cr$streets$cr$city$cr$postcode$cr$country | $postcode / $country

5 $firstname $lastname$cr$streets$cr$city$cr$postcode$cr$country | $city / $country

 

Here's an alternative entry for the last entry...

 

This sets the last line (no. #5) to be the same as the first line. This was because format #5 tends to get used for invoice / packing slip and this did not include the county (which isn't correct). The reason for this is that format #5 is the one specified in the customer details (why, I have no idea). So...

 

5 $firstname $lastname$cr$streets$cr$city$cr$state$cr$postcode$cr$country | $city / $country

 

It's been a while since this was posted, but can anyone go back a step here and explain how to 'Modify the 'address_format' table?' I went to phpMyAdmin, and I can see a listing on the left side with 'address_format'. Now what? How do I modify it? Excuse the newbie, but so far the database is like Greek to me.

 

Thanks in advance.

 

Linda

Posted
Modify the 'address_format' table to match the following. This table contains two columns; a long format and a short format. The entry marked with a 'x' is probably ok and does not need changing.

Use phpMyAdmin to do this

 

1 $firstname $lastname$cr$streets$cr$city$cr$state$cr$postcode$cr$country | $city / $country

x 2 $firstname $lastname$cr$streets$cr$city, $state $postcode$cr$country | $city, $state / $country

3 $firstname $lastname$cr$streets$cr$city$cr$statecomma$postcode$cr$country | $state / $country

4 $firstname $lastname$cr$streets$cr$city$cr$postcode$cr$country | $postcode / $country

5 $firstname $lastname$cr$streets$cr$city$cr$postcode$cr$country | $city / $country

 

Here's an alternative entry for the last entry...

 

This sets the last line (no. #5) to be the same as the first line. This was because format #5 tends to get used for invoice / packing slip and this did not include the county (which isn't correct). The reason for this is that format #5 is the one specified in the customer details (why, I have no idea). So...

 

5 $firstname $lastname$cr$streets$cr$city$cr$state$cr$postcode$cr$country | $city / $country

 

 

I haven't gotten as far as invoices and packing slips yet, and I've never used phpMyAdmin... I'm trying to fix the address book entry page. After I enter my address it displays in the right order, but I want the entry fields themselves to be in the correct order. Post code shouldn't be before city. It should be after state/province but before country. The way it is now it looks retarded and I don't want my customers to think I'm that stupid. How do I fix the order the entry fields are displayed on the page?

 

And since it looks like I'll probably need to know later, how do I use phpMyAdmin? In the examples above, what does cr mean? The only thing I could guess was carriage return, but I wouldn't want a return after all of those things, so I'm not sure. I'd like to know what it means before I make changes.

 

TIA.

  • 3 months later...
Posted
It's been a while since this was posted, but can anyone go back a step here and explain how to 'Modify the 'address_format' table?' I went to phpMyAdmin, and I can see a listing on the left side with 'address_format'. Now what? How do I modify it? Excuse the newbie, but so far the database is like Greek to me.

 

Thanks in advance.

 

Linda

 

I changed the line to

$firstname $lastname$cr$streets$cr$city$cr$postcode

This is what you need if you are in the UK

 

If you look i the osc admin area under localization/taxes-countries, you will note there are 5 address formats to choose from, adjust one of these using php my admin and make sure the address format values are the same.

Posted
Modify the 'address_format' table to match the following. This table contains two columns; a long format and a short format. The entry marked with a 'x' is probably ok and does not need changing.

Use phpMyAdmin to do this

 

1 $firstname $lastname$cr$streets$cr$city$cr$state$cr$postcode$cr$country | $city / $country

x 2 $firstname $lastname$cr$streets$cr$city, $state $postcode$cr$country | $city, $state / $country

3 $firstname $lastname$cr$streets$cr$city$cr$statecomma$postcode$cr$country | $state / $country

4 $firstname $lastname$cr$streets$cr$city$cr$postcode$cr$country | $postcode / $country

5 $firstname $lastname$cr$streets$cr$city$cr$postcode$cr$country | $city / $country

 

Here's an alternative entry for the last entry...

 

This sets the last line (no. #5) to be the same as the first line. This was because format #5 tends to get used for invoice / packing slip and this did not include the county (which isn't correct). The reason for this is that format #5 is the one specified in the customer details (why, I have no idea). So...

 

5 $firstname $lastname$cr$streets$cr$city$cr$state$cr$postcode$cr$country | $city / $country

Thanks for that, just what I was looking for.

Posted

:-)

Monika

 

addicted to writing code ... can't get enough of databases either, LOL!

 

my toolbox: Textpad - Compare and Merge - phpMyAdmin - WS_FTP - Photoshop - How to search the forum

 

Interactive Media Award July 2007 ~ category E-Commerce

my advice on the forum is for free, PMs where you send me work are considered consultation which I charge for ...

Archived

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

×
×
  • Create New...