Manual order maker tep_get_address_format_id error fix
March 29, 2012
Add Comment
Fatal error: Call to undefined function tep_get_address_format_id() in /xxx/xxx/xxxxx/catalog/admin/create_order_process.php on line 42
Here is line 42 of my create_order_process.php: $format_id = tep_get_address_format_id($country_id);
Contribution link: http://addons.oscommerce.com/info/4829
Here is fix solution:
Change this line:
tep_get_address_format_id($country_id);
To this:
$format_id = "1";
///////////////////////
To complete this fix you would need to copy the function "tep_get_address_format_id" from catalog/includes/functions/general.php to catalog/admin/includes/functions/general.php.
Here is the function:
////
// Returns the address_format_id for the given country
// TABLES: countries;
function tep_get_address_format_id($country_id) {
$address_format_query = tep_db_query("select address_format_id as format_id from " . TABLE_COUNTRIES . " where countries_id = '" . (int)$country_id . "'");
if (tep_db_num_rows($address_format_query)) {
$address_format = tep_db_fetch_array($address_format_query);
return $address_format['format_id'];
} else {
return '1';
}
}
Thanks for visit my blog.
Genrerating Link.... 15 seconds.
Your Link is Ready.


0 Response to "Manual order maker tep_get_address_format_id error fix"
Post a Comment