Post by npn2531 » Thu Jun 04, 2009 12:56 am

On the checkout/confirm page. The address appears as:
First
Last
Street
City, State, Zip

That is, with 'First' on top of 'Last'

How would you change this to:

First Last
Street
City, State, Zip

ie with First and Last on the same line?

Thanks!

http://www.niora.com


New member

Posts

Joined
Tue May 19, 2009 11:56 am

Post by phpuk » Thu Jun 04, 2009 6:00 am

Which version are you using as it is all on one line for me.

Global Moderator

Posts

Joined
Wed Mar 25, 2009 10:57 am

Post by npn2531 » Thu Jun 04, 2009 8:51 am

version 1.2.8, however I have been modifying things a bit. If I knew where or how one would put them on one line or on two, I could go back and see what happened.

Everything else on Opencart seems to be well thought out and how you would expect things to be, so I suspect I have changed a margin or added a space or something 'somewhere'.

http://www.niora.com


New member

Posts

Joined
Tue May 19, 2009 11:56 am

Post by Daniel » Thu Jun 04, 2009 9:06 am

Put this in the country address format:

{firstname} {lastname}
{address_1}
{city}, {State}, {zip}

User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm

Post by phpuk » Thu Jun 04, 2009 9:10 am

I would start with looking at catalog/controller/account/address.php.

Global Moderator

Posts

Joined
Wed Mar 25, 2009 10:57 am

Post by phpuk » Thu Jun 04, 2009 9:13 am

Daniel must have posted whilst I was looking.

Where is the country address format stored?

Global Moderator

Posts

Joined
Wed Mar 25, 2009 10:57 am

Post by Qphoria » Thu Jun 04, 2009 9:34 am

Admin menu

Configuration->localization->country->edit country

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by phpuk » Thu Jun 04, 2009 9:46 am

Thanks Qphoria,

I had found it not long after posting :-[

Broke one of my rules look first then post ah well.

Global Moderator

Posts

Joined
Wed Mar 25, 2009 10:57 am

Post by gavin m » Thu Jun 04, 2009 6:03 pm

Daniel wrote:Put this in the country address format:

{firstname} {lastname}
{address_1}
{city}, {State}, {zip}
Is there a list of address formats for other countries anywhere?

Active Member

Posts

Joined
Thu Jun 04, 2009 3:23 pm

Post by npn2531 » Fri Jun 05, 2009 4:37 am

Thank you for your responses:

I still have firstname on top of lastname in checkout/shipping

I have gone through your suggestions and have this:

format in Configuration->localization->country->edit country seems to be as it should be:
{firstname} {lastname}
{company}
{address_1}
{address_2}
{city}, {zone} {postcode}
{country}

and in catalog/controller/account/address.php. I have this, which seems ok

foreach ($results as $result) {
if ($result['address_format']) {
$format = $result['address_format'];
} else {
$format = '{firstname} {lastname}' . "\n" . '{company}' . "\n" . '{address_1}' . "\n" . '{address_2}' . "\n" . '{city} {postcode}' . "\n" . '{zone}' . "\n" . '{country}';
}

Perhaps I need to check and see where ['address_format'] above is defined? I looked in system/library/customer.php and there is this about line 49, 'address_format' => $result['address_format'], but that doesn't seem to me to be quite the place.

Any more suggestions?, or perhaps a checklist I should work through?

Thanks!

http://www.niora.com


New member

Posts

Joined
Tue May 19, 2009 11:56 am

Post by Qphoria » Fri Jun 05, 2009 4:41 am

it only applies to new orders from now on. Existing orders aren't changed

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by npn2531 » Fri Jun 05, 2009 6:33 am

actually, I have entered a new test account and the first name still appears over the last name, and it does so everywhere the address_format appears. For example, in the account/address page

http://www.niora.com


New member

Posts

Joined
Tue May 19, 2009 11:56 am

Post by npn2531 » Fri Jun 05, 2009 12:31 pm

I have installed a fresh new opencart, and with no modifications, the first name always appears over the last name, regardless of where the 'address_format' appears. Can this be changed?

http://www.niora.com


New member

Posts

Joined
Tue May 19, 2009 11:56 am

Post by jfn99 » Mon Apr 12, 2010 10:19 am

Anyone knows how to add the customers phone number to address?

{firstname} {lastname}
{company}
{address_1}
{address_2}
{city}, {zone} {postcode}
{telephone}
didn't work...

New member

Posts

Joined
Thu Feb 25, 2010 5:14 pm

Post by Qphoria » Mon Apr 12, 2010 10:46 am

telephone is stored at the customer level, not the address level, so that's not really supported
Telephone should already be listed on its own line in all places that the address formatting is used

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by jfn99 » Mon Apr 12, 2010 11:51 pm

when I open an Invoice from the ADMIN - orders - Print Invoice
it doesn't show the customer phone number.
what file should I edit, what line should I change?

I tried
admin/controller/sale/order.php
$format = '{firstname} {lastname}' . "\n" . '{company}' . "\n" . '{address_1}' . "\n" . '{address_2}' . "\n" . '{city} {postcode}' . "\n" . '{zone}' . "\n" . "<br><b>Phone:</b> " . '{telephone}' . "\n" . "<b>Customer Email:</b> " . '{email}';
it didn't change anything
thanks a lot for your attention...

New member

Posts

Joined
Thu Feb 25, 2010 5:14 pm

Post by oclollo » Wed Dec 29, 2010 2:35 pm

I have change the adress format to this:

{förnamn} {efternamn}
{adress_1}
{adress_2}
{postnummer} {ort}
Land = {land}

but also, this is what I get in front end: see attached. What is the reason?

Attachments

Untitled-5.png

Untitled-5.png (485.83 KiB) Viewed 8800 times


Newbie

Posts

Joined
Thu Dec 16, 2010 2:58 pm

Post by oclollo » Wed Dec 29, 2010 3:09 pm

Also, where do I change the format of this - see attached - the address listing when changing/adding address?

Attachments

Untitled-6.png

Untitled-6.png (83.18 KiB) Viewed 8797 times


Newbie

Posts

Joined
Thu Dec 16, 2010 2:58 pm

Post by Qphoria » Thu Dec 30, 2010 3:03 am

oclollo wrote:I have change the adress format to this:

{förnamn} {efternamn}
{adress_1}
{adress_2}
{postnummer} {ort}
Land = {land}

but also, this is what I get in front end: see attached. What is the reason?
Those tags are code values and not meant to be translated. You must use the actual supported english tags:
{firstname} {lastname} etc

The format doesn't apply to the address select page.. only the invoice

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by oclollo » Thu Dec 30, 2010 1:40 pm

Thanks. How about changing the order of address in address select page - where is it done? I want "name, address, postcode, city, country" (for Sweden)

Newbie

Posts

Joined
Thu Dec 16, 2010 2:58 pm
Who is online

Users browsing this forum: No registered users and 67 guests