5ummer5 Posted February 6, 2009 Share Posted February 6, 2009 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 More sharing options...
TropischBruin Posted February 6, 2009 Share Posted February 6, 2009 Use the search, this has been asked before and answered by the PS-team.The answer is that PS was intended to be used only for one country and therefore the address layout is as it is. Link to comment Share on other sites More sharing options...
5ummer5 Posted February 6, 2009 Author Share Posted February 6, 2009 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 More sharing options...
TropischBruin Posted February 6, 2009 Share Posted February 6, 2009 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:NameAddressPostcode CityState (if a state is present)CountryThanks! :cheese: Link to comment Share on other sites More sharing options...
5ummer5 Posted February 6, 2009 Author Share Posted February 6, 2009 Sure, no problem at all. I will get something written up over the weekend (probably tomorrow) and I will post it here. Link to comment Share on other sites More sharing options...
5ummer5 Posted February 9, 2009 Author Share Posted February 9, 2009 Ok the document is nearly ready. I will have it up later this afternoon. I will attach it as a word document. Thanks. :-) Link to comment Share on other sites More sharing options...
5ummer5 Posted February 9, 2009 Author Share Posted February 9, 2009 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 More sharing options...
jhnstcks Posted February 9, 2009 Share Posted February 9, 2009 I just changed the order of the address in the authentication.tpl worked a treat, although I dont think it changes the pdf invoices. Link to comment Share on other sites More sharing options...
5ummer5 Posted February 9, 2009 Author Share Posted February 9, 2009 Im glad you made use of it! :-)you will need to follow the section about the PDF.php to change the order on all of the PDF's. Let me know how you get on. Link to comment Share on other sites More sharing options...
ukbill69 Posted April 14, 2009 Share Posted April 14, 2009 Ive looked at your guide and im stumped. I need to show address as:Line 1Line 2TownCountyPostcodeAs 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 More sharing options...
5ummer5 Posted April 14, 2009 Author Share Posted April 14, 2009 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 More sharing options...
ukbill69 Posted April 14, 2009 Share Posted April 14, 2009 I see you site, looks good. could you send me your php files and templates at all how you done it at all?Thanks. Link to comment Share on other sites More sharing options...
babyewok Posted April 22, 2009 Share Posted April 22, 2009 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 More sharing options...
5ummer5 Posted April 22, 2009 Author Share Posted April 22, 2009 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 More sharing options...
babyewok Posted April 24, 2009 Share Posted April 24, 2009 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 More sharing options...
5ummer5 Posted April 24, 2009 Author Share Posted April 24, 2009 Thats good! Glad you got it sorted! Im going to amend the guide and re-upload. Thanks for pointing that out! If you hadn't of cut and pasted then more people would be going wrong! :-) Link to comment Share on other sites More sharing options...
5ummer5 Posted April 24, 2009 Author Share Posted April 24, 2009 Here is the new one! NEW GUIDE to change the order of the address.doc Link to comment Share on other sites More sharing options...
Jalux Posted June 22, 2009 Share Posted June 22, 2009 Hi 5ummer5I know it has been a while since your post, however I have been having some issues namely that city is repeated twiceAddress 1CityCountyCityPostcodeCountryI think it may have something to do with addresses.tplas 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 More sharing options...
Matthieu Biart Posted May 25, 2010 Share Posted May 25, 2010 Hi everyone!We are aware of that issue and plan to solve it (I cannot tell you exactly when as I do not know myself) but in order to keep this important thread on the top of our issue list, I quoted it on its reserved thread that you can read right here: Data formating issue Link to comment Share on other sites More sharing options...
Recommended Posts