Manual Order Maker tep_get_address_format_id error fix

when I choose create order -> I can select a customer (or create a new one..) but when I hit the save button I get the following error message:

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:

Here is fix solution:

Change this line:


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.

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *