PrestaShop Forum

The best place in the world to ask questions about PrestaShop and get advice from our passionate community!

PrestaShop Forum

Jump to content

 

Please help with address layout in Prestashop and State Placement

7 replies to this topic
#1
yebberdog

    PrestaShop Apprentice

  • Members
  • PipPip
  • 41 posts
Please help.

Living in the UK, I have created "States" for all counties in the UK, e.g. "Devon,England", "Somerset, England"

However when the address is printed out it reads wrong:-

First Name,Last Name
Address 1
Address 2
Post Code
United Kingdom (Devon, England)

What I am trying to achieve is

First Name,Last Name
Address 1
Address 2
Devon, England
Post Code
United Kingdom

I have always used Zen Cart and this is never been an issue,so I was interested in the Presta Shop and I am sure there is an easy way around this. The shipping is the only thing that is stopping me using this on a live project.

Hope you can all help with what I am sure is a simple problem that I have over looked.

Best Regards

#2
jhnstcks

    PrestaShop Fanatic

  • Moderators
  • 1913 posts
There are a few files that you need to alter to change the formatting of the address.

If you just want to change from the customers view point then you need to alter athentication.tpl, address.tpl, addresses.tpl, order-address.tpl, these are all in your theme folder. Also address.php which is in the classes folder.

To change the admin aswell you also need to alter adminaddress.php and adminorders.php. These are both in admin>tabs folder.
Helpful hints and tips to Empower your Prestashop site - Join us on Facebook and get involved, tell us the things that help you.
If you think someone's answer helped, please give him/her a Positive Reputation vote by liking their post.
E-commerce hosting from Scotserve, fast, reliable and affordable.

#3
yebberdog

    PrestaShop Apprentice

  • Members
  • PipPip
  • 41 posts
Thank you very much, I am not too good with code but I will give it a go, thank you for the pointer.

#4
yebberdog

    PrestaShop Apprentice

  • Members
  • PipPip
  • 41 posts
I still find it strange that the state is listed after the country, as most countries have counties or provences. All the previous shopping cart systems once the Country is selected allow you to then add the states, counties or provences.

Is this not normal?

#5
goldfoot

    PrestaShop Newbie

  • Members
  • Pip
  • 3 posts
Ok.

Somebody. PLEASE help!

I'm using the latest version of PrestaShop, and about to pull my hair out over getting addresses to appear "American" style.

I've gone ahead and edited:
address.tpl
addresses.tpl
authentication.tpl
order-address.tpl


and even:
order-address.js

The customer now sees their address in the correct format on most of the pages, but for the life of me, I cannot find what file to edit in the "summary" phase of the check-out process! That is the last one I need to fix.

Anyone? Please?

#6
jhnstcks

    PrestaShop Fanatic

  • Moderators
  • 1913 posts
The order summary page is controlled through the order-address.tpl file.

Theres 2 sections in that file you need to change.

First is near the top of the file and the second is lower down at about line 42ish.
Helpful hints and tips to Empower your Prestashop site - Join us on Facebook and get involved, tell us the things that help you.
If you think someone's answer helped, please give him/her a Positive Reputation vote by liking their post.
E-commerce hosting from Scotserve, fast, reliable and affordable.

#7
pneeds

    PrestaShop Apprentice

  • Members
  • PipPip
  • 35 posts
I've done it an easier way:

I went to the BACK PFFICE > TOOLS > TRANSLATIONS > FRONT OFFICE + BACK OFFICE + MODULE + just search through all the options > Click on the American Flag > Then I just swap over the Names

See my site.

x
MODULES NEEDED (WILLING TO PAY )
- Review and Comment Module (together) so that you can add a comment at the same time

- Feedback or Guestbook

#8
goldfoot

    PrestaShop Newbie

  • Members
  • Pip
  • 3 posts
Yep. Got that one...changed code to:


  • {l s='Your delivery address'}





  • {$address.city}, {$address.state} {$address.postcode}



  • {l s='Update'}




Not the code affecting the summary area! :(