Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

2nd Address Line Contribution


Guest

Recommended Posts

I have installed the 2nd address line contribution which appears to work fine. The customer can enter an additional address line, but when you get to the checkout, the shipping address is not showing and an error occurs.

 

Fatal error: Call to undefined function: tep_get_address_format_id() in /home/ablemail/public_html/shop/includes/functions/general.php on line 497

 

The line it's referring to is this:

$format_id = tep_get_address_format_id($address['country_id']);

 

I had not changed this line at all and am wondering why the error is ocurring. When I take the whole line out, then there is no shipping address or the error.

 

Anyone know how to fix this please?

 

This is the contributions I used: http://www.oscommerce.com/community/contri...ra+address+line

Link to comment
Share on other sites

I fixed it!

I missed out this:

// 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';

}

}

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...