beeonline Posted December 6, 2003 Share Posted December 6, 2003 Hi I am trying to change the position of the post code on all the address forms from... Gender: Male Female * First Name: * Last Name: * Date of Birth: * (eg. 05/21/1970) E-Mail Address: * Company Details Company Name: Your Address Street Address: * Suburb: Post Code: * from here City: * State/Province: * Post Code: * to this position Country: I have searched all over the forum for the past 4 hours to no avail...:wacko: Can any one help on this one .... Please Cheers Malc :wacko: Link to comment Share on other sites More sharing options...
moonstone Posted December 6, 2003 Share Posted December 6, 2003 I presume you are referring to the address form when creating an account. first backup the file catalog/create_account.php. Next open this file with a text editor. Around lines 403 - 406, search for: <tr> <td class="main"><?php echo ENTRY_POST_CODE; ?></td> <td class="main"><?php echo tep_draw_input_field('postcode') . ' ' . (tep_not_null(ENTRY_POST_CODE_TEXT) ? '<span class="inputRequirement">' . ENTRY_POST_CODE_TEXT . '</span>': ''); ?></td> </tr> cut this piece of code, and proceed to lines 436 - 439. Search for: <tr> <td class="main"><?php echo ENTRY_COUNTRY; ?></td> <td class="main"><?php echo tep_get_country_list('country') . ' ' . (tep_not_null(ENTRY_COUNTRY_TEXT) ? '<span class="inputRequirement">' . ENTRY_COUNTRY_TEXT . '</span>': ''); ?></td> </tr> Paste your code before this. That's it! Hope this helps... Link to comment Share on other sites More sharing options...
beeonline Posted December 6, 2003 Author Share Posted December 6, 2003 Hi Thanks for your reply.... This was the 1st thing I tried, unfortunately this only changes the form on that page. I have also changed the form on other pages in the catalog and admin too... But when I check the invoice or the packing slip the address still shows in the old format... This is driving me nuts...is there a easier way that I am missing???????????... Help please Malc :blink: Link to comment Share on other sites More sharing options...
moonstone Posted December 6, 2003 Share Posted December 6, 2003 You are right to say that this only affects the form on that page. For invoice and packing slip, it is dependent on the address format set for your country. You can change the address format through osCommerce Admin. Just look under Locations/Taxes then Countries, and pick your country. You should be able to see an Address Format: (Certain Number) associated with your country. If you want to know what the number means, you will have to goto phpMyAdmin and look under address_format table. I'll list the format here just for your reference: 1. $firstname $lastname$cr$streets$cr$city, $postcode$cr$statecomma$country 2. $firstname $lastname$cr$streets$cr$city, $state $postcode$cr$country 3. $firstname $lastname$cr$streets$cr$city$cr$postcode - $statecomma$country 4. $firstname $lastname$cr$streets$cr$city ($postcode)$cr$country 5. $firstname $lastname$cr$streets$cr$postcode $city$cr$country 6. $firstname $lastname$cr$streets$cr$country $postcode If I am not wrong, format 2 should be what you are looking for. Let me know if this helps. Link to comment Share on other sites More sharing options...
beeonline Posted December 6, 2003 Author Share Posted December 6, 2003 Hi Patrick Thanks.... this did the trick. Darn that was mind bender :wacko: Now on to the next prob... my client wants extra pages added and now I have to figure that one out... The problem is the Invision search is terrible... so if you have angle on creating pages it would be muchly appreciated... Thanks once again Malc Link to comment Share on other sites More sharing options...
moonstone Posted December 7, 2003 Share Posted December 7, 2003 Hi Malc, I am sorry but I don't really understand what you are look for. Are you saying that you need to create a new page from scratch? Link to comment Share on other sites More sharing options...
beeonline Posted December 7, 2003 Author Share Posted December 7, 2003 Hi Yes I am trying to create a new page from scratch Cheers Malc Link to comment Share on other sites More sharing options...
moonstone Posted December 8, 2003 Share Posted December 8, 2003 In that case, look for a contribution by the name of New page template under Template/Themes category. It will help you get started in a less confusing way. Link to comment Share on other sites More sharing options...
beeonline Posted December 8, 2003 Author Share Posted December 8, 2003 Hi Thanks I will take a look at this, although I have manage to add a page using this tutorial which I found last night by accident.... New Page Tutorial Cheers Malc Link to comment Share on other sites More sharing options...
pfaustino Posted March 13, 2004 Share Posted March 13, 2004 I had the same problem with changing the order. I've figured out which files need to be changed: catalog/languages/english.php (I changed 'Post Code' to 'ZIP Code') These are the files that need to be changed where you move the table row for the ZIP Code to go above the Country field: catalog/create_account.php catalog/includes/modules/checkout_new_address.php catalog/includes/modules/address_book_details.php And if you have the osc_affiliates module, you can edit: catalog/includes/modules/affiliate_signup_details.php Link to comment Share on other sites More sharing options...
pbsco Posted April 27, 2004 Share Posted April 27, 2004 Umm I'm still having a little problem with this? Patrick (Moonstone) posted 6 options for the address type, but when I look at my drop down I only show 5 options? Option 6 is the one I want to put in. I'm running the latest version. Any ideas why I got short changed? ;) Link to comment Share on other sites More sharing options...
moonstone Posted April 27, 2004 Share Posted April 27, 2004 Hi Vic, I have no idea why you got short changed. :P However, you can easily add a new address format using phpMyAdmin. Simply create a new entry with the following values in the address_format table, and option 6 should be available to you: address_format_id: 6 address_format: $firstname $lastname$cr$streets$cr$country $postcode address_summary: $country $postcode Hope this helps. ;) Link to comment Share on other sites More sharing options...
pbsco Posted April 27, 2004 Share Posted April 27, 2004 Thanks for the assist! I added the new entry, no problem, but when I check the orders nothing seems to have changed? Will this only work on NEW orders or will it be retroactive? Again thanks for your time and patience. Link to comment Share on other sites More sharing options...
pbsco Posted April 27, 2004 Share Posted April 27, 2004 PS: I should mention that I did go into the countries and change the address format to the new value "6", then looked at previous orders via the packing slip to see if the address changed. Link to comment Share on other sites More sharing options...
moonstone Posted April 27, 2004 Share Posted April 27, 2004 Hi Vic, Unfortunately, this change will only be reflected on new orders. :( However do not despair, as you can easily change the address format for previous orders simply by issuing an SQL statement. Before we do anything, remember to first backup your data. Next, let us understand why the change did not affect previous orders. If you look into table orders, you will notice three fields by the names of customers_address_format_id, delivery_address_format_id and billing_address_format_id. Let's say your previous address format was set to 1. In this case, you will see 1s for all three fields. Similarly, for new orders, you will see 6s for all three fields. These actually determine how the addresses are being displayed for each of the order/invoice. Now, let's go on to changing the address format for previous orders. Assuming you want to change the address format for ALL previous orders to 6, simply issue the following SQL statement: UPDATE `orders` SET `customers_address_format_id` = '6', `delivery_address_format_id` = '6', `billing_address_format_id` = '6'; That's it! Hope that helps. :lol: Link to comment Share on other sites More sharing options...
pbsco Posted April 29, 2004 Share Posted April 29, 2004 Yep, that was it :D Thanks for the assist bud! It displays fine, actually quite easy to set up once you know where to go. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.