Guest Posted May 7, 2008 Posted May 7, 2008 Hi, I have added a contribution to my store which changes the layout of the account_history_info.php page to look like an invoice which can be printed out (I can not remember the name of the contribution) However when the address displays like this: Mr B Jones 1 My Street My Surburb, My Town, ZZ1 3PU My State, U As you can see the suburb, town and postal code are all on the same line and the 'U' should say 'United Kingdom' Now my question is how do I change the format of the address to look like: Mr B Jones 1 My Street My Surburb My Town My State ZZ1 3PU United Kingdom I look forward to your response Thanks in advance Aran
Guest Posted May 7, 2008 Posted May 7, 2008 BACKUP YOUR DATABASE! Run the following through your database program for example PHPMyAdmin and it should do as you want it to do: UPDATE `address_format` SET `address_format` = '$firstname $lastname$cr$streets$cr$city$cr$state$cr$postcode$cr$country' WHERE `address_format_id` =1 LIMIT 1;
Guest Posted May 7, 2008 Posted May 7, 2008 BACKUP YOUR DATABASE! Run the following through your database program for example PHPMyAdmin and it should do as you want it to do: UPDATE `address_format` SET `address_format` = '$firstname $lastname$cr$streets$cr$city$cr$state$cr$postcode$cr$country' WHERE `address_format_id` =1 LIMIT 1; cheers dude, it worked a treat :thumbsup: Now just the issue of the why the country only shows as 'U' and not 'United Kingdom' Aran
Guest Posted May 7, 2008 Posted May 7, 2008 Try the following: Open includes\functions\html_output.php Find the following code: //// // Creates a pull-down list of countries function tep_get_country_list($name, $selected = '', $parameters = '') { $countries_array = array(array('id' => '', 'text' => PULL_DOWN_DEFAULT)); $countries = tep_get_countries(); for ($i=0, $n=sizeof($countries); $i<$n; $i++) { $countries_array[] = array('id' => $countries[$i]['countries_id'], 'text' => $countries[$i]['countries_name']); } return tep_draw_pull_down_menu($name, $countries_array, $selected, $parameters); } Replace that code with the following: //// // Creates a pull-down list of countries function tep_get_country_list($name, $selected = '', $parameters = '') { $countries_array = array(array('id' => '222', 'text' => 'United Kingdom')); $countries = tep_get_countries(); for ($i=0, $n=sizeof($countries); $i<$n; $i++) { $countries_array[] = array('id' => $countries[$i]['countries_id'], 'text' => $countries[$i]['countries_name']); } return tep_draw_pull_down_menu($name, $countries_array, $selected, $parameters); }
Guest Posted May 7, 2008 Posted May 7, 2008 Try the following: Open includes\functions\html_output.php Find the following code: //// // Creates a pull-down list of countries function tep_get_country_list($name, $selected = '', $parameters = '') { $countries_array = array(array('id' => '', 'text' => PULL_DOWN_DEFAULT)); $countries = tep_get_countries(); for ($i=0, $n=sizeof($countries); $i<$n; $i++) { $countries_array[] = array('id' => $countries[$i]['countries_id'], 'text' => $countries[$i]['countries_name']); } return tep_draw_pull_down_menu($name, $countries_array, $selected, $parameters); } Replace that code with the following: //// // Creates a pull-down list of countries function tep_get_country_list($name, $selected = '', $parameters = '') { $countries_array = array(array('id' => '222', 'text' => 'United Kingdom')); $countries = tep_get_countries(); for ($i=0, $n=sizeof($countries); $i<$n; $i++) { $countries_array[] = array('id' => $countries[$i]['countries_id'], 'text' => $countries[$i]['countries_name']); } return tep_draw_pull_down_menu($name, $countries_array, $selected, $parameters); } Sorry mate that did not work the 'U' is still present and not 'United Kingdom' Aran
Guest Posted May 8, 2008 Posted May 8, 2008 Am not too sure which file is used for the drop down menu, I would suggest downloading a clean copy from osCommerce and replace a few files (of course keep a backup!) and each time you replace a file check to see if it has fixed the U issue, once you find the file which is causing the problem you should then be able to compare the file you downloaded and your own file to see what is different. I would start with the file I said in my last post.
Guest Posted May 9, 2008 Posted May 9, 2008 Am not too sure which file is used for the drop down menu, I would suggest downloading a clean copy from osCommerce and replace a few files (of course keep a backup!) and each time you replace a file check to see if it has fixed the U issue, once you find the file which is causing the problem you should then be able to compare the file you downloaded and your own file to see what is different. I would start with the file I said in my last post. I wish I had that luxury, the store is super highly modified and the option of replacing files is not there. Aran
Recommended Posts
Archived
This topic is now archived and is closed to further replies.