Jonj1611 Posted August 5, 2004 Posted August 5, 2004 Hi, I live in the UK and would like the address field in the customer section to more represent UK addresses, does anyone know where I change the fields because I cannot see where to do it. Thanks.
Jonj1611 Posted August 6, 2004 Author Posted August 6, 2004 Hi, anyone know or can point me in the right direction? thanks.
siavash Posted August 6, 2004 Posted August 6, 2004 hi i'm actaually looking for te same thing. anybody any ideas? need to move the post code field to right above the country field. Did you try? Did you fail? No matter! Try again. Fail again! But fail better!
Jonj1611 Posted August 8, 2004 Author Posted August 8, 2004 Hi, I know this probably isn't a really important subject but I have searched and I get a load of irrelevant results, can please some help. Thanks.
siavash Posted August 8, 2004 Posted August 8, 2004 anybody? Did you try? Did you fail? No matter! Try again. Fail again! But fail better!
Jonj1611 Posted August 8, 2004 Author Posted August 8, 2004 Hi, I know this probably isn't a really important subject but I have searched and I get a load of irrelevant results, can please some help. Thanks. Sorry, that should say can please someone help. Doh!!
ashleypb Posted August 8, 2004 Posted August 8, 2004 hi, im stuck aswell, i need to change Company: to Referer ID:
Jonj1611 Posted August 8, 2004 Author Posted August 8, 2004 *BUMP* Sorry I really need this to complete my site, I am sure it can't be that difficult a question? The search feature is next to useless, over 30 pages or irrelevant information.
Guest Posted August 8, 2004 Posted August 8, 2004 Hi Jonj, I am a newcomer to osC and I am learning my way around an would like to pass on a tip that will help you. I open my osC in my web editor and when i find something that i want to change i do a search. For your problem i did a search for "State/Province:" which shows in the "Create Account" page. Only one page showed up.. catalog/includeds/languages/english.php and the "State/Province:" shows on line 194 define('ENTRY_STATE', 'State/Province:'); All the fields in the Create Account page are shown here.
Guest Posted August 8, 2004 Posted August 8, 2004 To test the above, i just changed "Suburb:" to "Address 2" and it worked.
Jonj1611 Posted August 8, 2004 Author Posted August 8, 2004 Thanks Reg, I will try that now, maybe it is that simple ;)
Jonj1611 Posted August 8, 2004 Author Posted August 8, 2004 Don't suppose you know how to change the order in which it is displayed or is that just a case of moving the defines around? Thanks
Guest Posted August 8, 2004 Posted August 8, 2004 I would think so.. I am trying to figure out how to add new fields to the customer data.. I want them to be able to specify trip dates, passport numbers, and a couple of other fields.
Jonj1611 Posted August 8, 2004 Author Posted August 8, 2004 Thanks Reg, some extra fields would be handy!!
Jonj1611 Posted August 8, 2004 Author Posted August 8, 2004 hmm, could change the text but even though I changed the define positions, post code is still in the 'wrong' place.
Guest Posted August 8, 2004 Posted August 8, 2004 hmm, could change the text but even though I changed the define positions, post code is still in the 'wrong' place. Do a search in contributions for create_account.php state and zip flip Perhaps this is what you need.
Jonj1611 Posted August 9, 2004 Author Posted August 9, 2004 Unfortunately that file seemed to relate to an older version of oscommerce, does anybody know of a way to change the order of the address fields and how the date of birth is displayed, ie I want it like this 24/01/2000. Thanks
siavash Posted August 10, 2004 Posted August 10, 2004 to change the address fields to appear into BRITISH format you need to do two small modifications as follows: two files need changing: catalog/create_account.php catalog/includes/modules/address_book_details.php in both files you need to find this bit of code: <tr> ? ? ? ? ? ?<td class="main"><?php echo ENTRY_POST_CODE; ?></td> ? ? ? ? ? ?<td class="main"><?php echo tep_draw_input_field('postcode', $entry['entry_postcode']) . ' ' . (tep_not_null(ENTRY_POST_CODE_TEXT) ? '<span class="inputRequirement">' . ENTRY_POST_CODE_TEXT . '</span>': ''); ?></td> ? ? ? ? ?</tr> and simple move it to the appropriate place. for instance i just place it between state and country fields and it'd look like this: <tr> ? ? ? ? ? ?<td class="main"><?php echo ENTRY_STREET_ADDRESS; ?></td> ? ? ? ? ? ?<td class="main"><?php echo tep_draw_input_field('street_address', $entry['entry_street_address']) . ' ' . (tep_not_null(ENTRY_STREET_ADDRESS_TEXT) ? '<span class="inputRequirement">' . ENTRY_STREET_ADDRESS_TEXT . '</span>': ''); ?></td> ? ? ? ? ?</tr> <?php ?if (ACCOUNT_SUBURB == 'true') { ?> ? ? ? ? ?<tr> ? ? ? ? ? ?<td class="main"><?php echo ENTRY_SUBURB; ?></td> ? ? ? ? ? ?<td class="main"><?php echo tep_draw_input_field('suburb', $entry['entry_suburb']) . ' ' . (tep_not_null(ENTRY_SUBURB_TEXT) ? '<span class="inputRequirement">' . ENTRY_SUBURB_TEXT . '</span>': ''); ?></td> ? ? ? ? ?</tr> <?php ?} ?> ? ? ? ? ?<tr> ? ? ? ? ? ?<td class="main"><?php echo ENTRY_CITY; ?></td> ? ? ? ? ? ?<td class="main"><?php echo tep_draw_input_field('city', $entry['entry_city']) . ' ' . (tep_not_null(ENTRY_CITY_TEXT) ? '<span class="inputRequirement">' . ENTRY_CITY_TEXT . '</span>': ''); ?></td> ? ? ? ? ?</tr> <?php ?if (ACCOUNT_STATE == 'true') { ?> ? ? ? ? ?<tr> ? ? ? ? ? ?<td class="main"><?php echo ENTRY_STATE; ?></td> ? ? ? ? ? ?<td class="main"> <?php ? ?if ($process == true) { ? ? ?if ($entry_state_has_zones == true) { ? ? ? ?$zones_array = array(); ? ? ? ?$zones_query = tep_db_query("select zone_name from " . TABLE_ZONES . " where zone_country_id = '" . (int)$country . "' order by zone_name"); ? ? ? ?while ($zones_values = tep_db_fetch_array($zones_query)) { ? ? ? ? ?$zones_array[] = array('id' => $zones_values['zone_name'], 'text' => $zones_values['zone_name']); ? ? ? ?} ? ? ? ?echo tep_draw_pull_down_menu('state', $zones_array); ? ? ?} else { ? ? ? ?echo tep_draw_input_field('state'); ? ? ?} ? ?} else { ? ? ?echo tep_draw_input_field('state', tep_get_zone_name($entry['entry_country_id'], $entry['entry_zone_id'], $entry['entry_state'])); ? ?} ? ?if (tep_not_null(ENTRY_STATE_TEXT)) echo ' <span class="inputRequirement">' . ENTRY_STATE_TEXT; ?></td> ? ? ? ? ?</tr> <?php ?} ?> ? ? ? ? ?<tr> ? ? ? ? ? ?<td class="main"><?php echo ENTRY_POST_CODE; ?></td> ? ? ? ? ? ?<td class="main"><?php echo tep_draw_input_field('postcode', $entry['entry_postcode']) . ' ' . (tep_not_null(ENTRY_POST_CODE_TEXT) ? '<span class="inputRequirement">' . ENTRY_POST_CODE_TEXT . '</span>': ''); ?></td> ? ? ? ? ?</tr> ? ? ? ? ?<tr> ? ? ? ? ? ?<td class="main"><?php echo ENTRY_COUNTRY; ?></td> ? ? ? ? ? ?<td class="main"><?php echo tep_get_country_list('country', $entry['entry_country_id']) . ' ' . (tep_not_null(ENTRY_COUNTRY_TEXT) ? '<span class="inputRequirement">' . ENTRY_COUNTRY_TEXT . '</span>': ''); ?></td> ? ? ? ? ?</tr> To change STATE to COUNTY simply modify catalog/includes/languages/english.php in admin disable SUBURB. and you are done with the address bit. to change the date to BRITISH format follow my instructions in this link: http://www.oscommerce.com/forums/index.php?showtopic=103656&hl= good luck Did you try? Did you fail? No matter! Try again. Fail again! But fail better!
Jonj1611 Posted August 10, 2004 Author Posted August 10, 2004 Hi Siavash, your a star, now at least my site address are starting to look OK, many thanks and many thanks for restoring my faith in the community. :D
siavash Posted August 10, 2004 Posted August 10, 2004 Not at all. Did you try? Did you fail? No matter! Try again. Fail again! But fail better!
siavash Posted August 10, 2004 Posted August 10, 2004 if you want your country field (country drop down) in the address show United Kingdom in catalog/includes/functions/html_output.php, about the end of it, look for: PULL_DOWN_DEFAULT and replace it by the following 'United Kingdom' result: instead of Please Select you will have United Kingdom as default country! Did you try? Did you fail? No matter! Try again. Fail again! But fail better!
Jonj1611 Posted August 10, 2004 Author Posted August 10, 2004 Thanks siavash, your really helping me out!! Well at least the address look ok now and the default UK is much better.
siavash Posted August 11, 2004 Posted August 11, 2004 NOT DONE! we are not done yet, i just realized!!! if you have changed the address fields to British you need to also modify the postcode bit of code in at least two other files similar to what we did before. they are: catalog/checkout_shipping_address.php and catalog/checkout_payment_address.php catalog/includes/modules/checkout_new_address.php also in all of the modified files including the previous ones i have aslo moved all instances of postcode to the right place i.e. after the state for example compare this code with the original code in the checkout_shipping_address.php (nearly in the end): $addresses_query = tep_db_query("select address_book_id, entry_firstname as firstname, entry_lastname as lastname, entry_company as company, entry_street_address as street_address, entry_suburb as suburb, entry_city as city, entry_state as state, entry_zone_id as zone_id, entry_postcode as postcode, entry_country_id as country_id from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . (int)$customer_id . "'"); ALSO THERE's A PROBLEM WITH PRE-SELECTED "UNITED KINGDOM" IN COUNTRY DROPDOWN IN ADDRESS! i realized that even tho' united kingdom is preselected there's a pop up that says please enter the country!! and you have to choose united kingdon from the list again! not good, eh? i'm working on this one. if you found out quicker let me know please. Did you try? Did you fail? No matter! Try again. Fail again! But fail better!
Recommended Posts
Archived
This topic is now archived and is closed to further replies.