Jump to content

Order of the Address GUIDE UPLOADED


Recommended Posts

Hi all,

This is something that has been bugging me and possible other UK prestashop store owners. The order of the addresses!
I have seperated it out to read as a UK address should throughout the system apart from the order screen!

Why does the postcode and city group together in the class="address_city". It looks odd for the UK consumer that the address isnt in the correct order.

Has anyone else fiddled with this?

Thanks everyone for any help,

Link to comment
Share on other sites

I did use the search but did not find any information to answer my question.

Anyway after a productive morning I have been able to re-write the code used so that the address displays as a standard UK address layout. Problem solved!

If anyone would like to know how to do it then just post here and I will be happy to write out a description. (There is a fair amount to write so I didnt want to write it all out now just incase it wasn't any use to anyone) :-)

Link to comment
Share on other sites

I did use the search but did not find any information to answer my question.

Anyway after a productive morning I have been able to re-write the code used so that the address displays as a standard UK address layout. Problem solved!

If anyone would like to know how to do it then just post here and I will be happy to write out a description. (There is a fair amount to write so I didnt want to write it all out now just incase it wasn't any use to anyone) :-)


Please do so as this is a wanted change.

If you could explain also how to change the address into the following layout:

Name
Address
Postcode City
State (if a state is present)
Country

Thanks! :cheese:
Link to comment
Share on other sites

Ok its up!

This guide will help you to change the format of the address throughout the front end including any PDF’s the user sees.

However it will remain the same in the backend (apart from generated PDF’s). I felt no need to change it in the backend as I am not bothered about the order of the address that I see. I just wanted to change it all for the users perspective.

You can adapt this method to arrange the address however you like. If you plan the format and follow the guide you will be ok.

I hope this is clear and helps, I’m not the best at explaining things! :blank:

If I have missed anything please let me know!!

Thanks :-)

NEW GUIDE to change the order of the address.doc

Link to comment
Share on other sites

  • 2 months later...

Ive looked at your guide and im stumped. I need to show address as:

Line 1
Line 2
Town
County
Postcode

As this is how the UK address should be formatted and I want to use postcode software so it has to be right.

How do I do I add extra field?

Thanks for your help.

Link to comment
Share on other sites

Hi,

At first I was also considering adding an extra field but I decided that I could cope without it and so I didnt look into how this is done. I just changed the order in which the address is displayed and renamed some of the existing fields. I havent looked into how more fields can be added im afraid.

Sorry I can't be more help.

Link to comment
Share on other sites

Hi, I followed the guide and everything works except the PDF file. When I upload the edited file, my PDFs don't work. When I re-upload the original, they work fine again. There must be something wrong with the code you suggest for PDF

Link to comment
Share on other sites

Hi, I followed the guide and everything works except the PDF file. When I upload the edited file, my PDFs don't work. When I re-upload the original, they work fine again. There must be something wrong with the code you suggest for PDF


Your absolutely right! Sorry about that! There is a section of code which shouldnt be there!

Directly above the heading "Themes/yourtheme/address.tpl"

remove the code

$pdf->Cell($width, 10, Tools::iconv('utf-8', self::encoding(), $delivery_address->city), 0, 'L');
$pdf->Cell($width, 10, Tools::iconv('utf-8', self::encoding(), $invoice_address->city), 0, 'L');
$pdf->Ln(5);
$pdf->Cell($width, 10, .Tools::iconv('utf-8', self::encoding(), $delivery_address->postcode), 0, 'L');
$pdf->Cell($width, 10, .Tools::iconv('utf-8', self::encoding(), $invoice_address->postcode), 0, 'L');



Try that and let me know how you get on!

Link to comment
Share on other sites

Hi, thanks for getting back to me. After posting here, I looked elsewhere in the forum for editing the PDF files and came across something that worked - it was pretty much the same as what you did, so I assume that extra bit of code was causing it. Serves me right for being lazy and cutting and pasting!!

Link to comment
Share on other sites

  • 1 month later...

Hi 5ummer5

I know it has been a while since your post, however I have been having some issues namely that city is repeated twice

Address 1
City
County
City
Postcode
Country

I think it may have something to do with addresses.tpl

as in your index this is omitted but is mentioned under "Files you will need access to"

If it is not much trouble could you please include this as well as the only other method I am aware of did not have the desired effect.

If it is easier perhaps you could post the modified files on this message board, and I could go over with it in notepad++.

Link to comment
Share on other sites

  • 11 months later...
×
×
  • Create New...