Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Why does postcode follow county with a comma and not new line?


Becki

Recommended Posts

Hi,

 

On the pages of checkout the address shows, for example:

 

Becki Vidler

23 Testing

test

warkwickshire, cv42 4xx

United Kingdom

 

why does it have a comma separator instead of a new line - this is also the case on my invoice?

 

Does anyone know how to make this a new line throughout the site?

 

Many Thanks

 

Becki

Link to comment
Share on other sites

Hi,

 

On the pages of checkout the address shows, for example:

 

Becki Vidler

23 Testing

test

warkwickshire, cv42 4xx

United Kingdom

 

why does it have a comma separator instead of a new line - this is also the case on my invoice?

 

Does anyone know how to make this a new line throughout the site?

 

Many Thanks

 

Becki

 

 

Becki, how comfortable are you with editing tables in phpmyadmin ?

Link to comment
Share on other sites

 

 

Thanks for this, I do liek the fact you end up with 2 address lines with this, but does it definately make the post code on a new line in the checkout process?

 

Thanks

 

Becki

 

John - I'm sure I could with some instruction! But I'll try this contribution and see if it works so I don't bother you for no reason!

Link to comment
Share on other sites

Thanks for this, I do liek the fact you end up with 2 address lines with this, but does it definately make the post code on a new line in the checkout process?

 

Thanks

 

Becki

 

John - I'm sure I could with some instruction! But I'll try this contribution and see if it works so I don't bother you for no reason!

 

Hi Becki ... I'm pretty sure that the contribution will do the same thing I was going to suggest ... but without the anxiety that can happen when faced with a the exposed underbelly of a database table in front of you.

If it doesn't then just give me a shout and I'll help as best I can.

Being UK based I had similar issues to the one you're having.

 

JK

Link to comment
Share on other sites

Hi Becki ... I'm pretty sure that the contribution will do the same thing I was going to suggest ... but without the anxiety that can happen when faced with a the exposed underbelly of a database table in front of you.

If it doesn't then just give me a shout and I'll help as best I can.

Being UK based I had similar issues to the one you're having.

 

JK

 

OK thanks - i will try it - although the author has emailed me to say they haven't changed what I think is my problem. I.E it will still show with the comma separator - i'll give it a try anyway just incase.

 

It just seems strange to me that the address shows:

 

Test Testing

49 Test Road

Coventry

Warwickshire, CV27 1XX

United Kingdom

 

Why are the county (previously state i think) and postcode separated by the comma - i presume it's an american thing?

 

It must be relatively easy to make the separator a new line instead of the comma?

 

So if you can remember how to do it I'll give it a try - i'll try it on my local install first :) !

 

Thanks

 

Becki

Link to comment
Share on other sites

So if you can remember how to do it I'll give it a try - i'll try it on my local install first :) !

 

Thanks

 

Becki

 

 

open phpmyadmin and run this in a query window (back up the 'address_format' table first just in case

 

UPDATE `address_format` SET `address_format` = '$firstname $lastname$cr$streets$cr$city$cr$state$cr$country$cr$postcode' WHERE `address_format_id` =1 LIMIT 1 ;

 

 

regards

 

JK

 

this will give an address like -

 

First Last

Street

City

State

Country

Postcode

 

if you need a different order just let me know

Link to comment
Share on other sites

open phpmyadmin and run this in a query window (back up the 'address_format' table first just in case

 

UPDATE `address_format` SET `address_format` = '$firstname $lastname$cr$streets$cr$city$cr$state$cr$country$cr$postcode' WHERE `address_format_id` =1 LIMIT 1 ;

regards

 

JK

 

this will give an address like -

 

First Last

Street

City

State

Country

Postcode

 

if you need a different order just let me know

 

Thanks JK, I will give it a go tonight after work and let you know the outcome! Thank you. I presume you have made a similar change and it doesn't effect the running of the store in any way? :) !

I might install the contribution as it renames different fields to the way i have done it meaning i can have 2 address lines which is always better than one! and then make the change you have given me, i'll report back.

 

This is slightly off topic but still concerning the address - I have just noticed if I go into order history and view (logged in obviously) the address which i had entered on checkout shows but only the first letter of the country! I.e U for united Kingdom. I.E

 

First Last

Street

City

State, Postcode

U

 

Any ideas?! I have made a mod so that the United Kingdom is pre-selected on the country select but can't see why this is happening! unless there is a max out of characters occuring?

Link to comment
Share on other sites

I have just looked again and the country is in the database etc - it shows up everywhere else except the order_history_info.php page - the delivery and also the billing address only show the first letter of the country!

 

piece of code i think it's coming from in the file mentioned:

 

<td width="30%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
		  <tr>
			<td class="main"><b><?php echo HEADING_DELIVERY_ADDRESS; ?></b></td>
		  </tr>
		  <tr>
			<td class="main"><?php echo tep_address_format($order->delivery['format_id'], $order->delivery, 1, ' ', '<br>'); ?></td>
		  </tr>

 

Becki

Link to comment
Share on other sites

open phpmyadmin and run this in a query window (back up the 'address_format' table first just in case

 

UPDATE `address_format` SET `address_format` = '$firstname $lastname$cr$streets$cr$city$cr$state$cr$country$cr$postcode' WHERE `address_format_id` =1 LIMIT 1 ;

regards

 

Hi JK,

 

I played around with the query and used in the end:

 

UPDATE `address_format` SET `address_format` = '$firstname $lastname$cr$streets$cr$city$cr$postcode$cr$state$country' WHERE `address_format_id` =1 LIMIT 1;

 

I don't use the state field so doesn't matter where it is - I tried the contribution mentioned above as it uses the state field so we can have an extra address line but couldn't create an account as it kept saying the state hadn't been selected etc - do you use the state field as an address line?

 

 

I have since thought to be absolutely correct the query should be for me:

 

UPDATE `address_format` SET `address_format` = '$firstname $lastname$cr$streets$cr$city$cr$postcode$cr$statecomma$country' WHERE `address_format_id` =1 LIMIT 1;

 

i see that the 'COMMA' was in the database aleady so used the same logic - but what is the difference between $statecomma$Country and $state, $country

 

Many Thanks

 

Becki

Link to comment
Share on other sites

I have just looked again and the country is in the database etc - it shows up everywhere else except the order_history_info.php page - the delivery and also the billing address only show the first letter of the country!

 

Hi there :)

I was having the same problem with only the first letter of the country showing and I found this (Post #4): http://www.oscommerce.com/forums/index.php?s=&...t&p=1037018

 

It solved my problem. Hope it helps you ;)

 

 

 

--

Arnaud

Link to comment
Share on other sites

Hi there :)

I was having the same problem with only the first letter of the country showing and I found this (Post #4): http://www.oscommerce.com/forums/index.php?s=&...t&p=1037018

 

It solved my problem. Hope it helps you ;)

--

Arnaud

 

Thank you - I was just coming back to say that I had fixed it! using the same method in the link you have given above. Thanks for your help.

 

Becki

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...