Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Error after adding contributions


ajpeters

Recommended Posts

I am running a test site and creating a a sample store. I have added the Admin Levels and option type feature contributions. I have no products loaded.

 

I now get

Warning: Missing argument 2 for tep_get_zone_name() in/home/httpd/html/OTG-DSS/su/catalog/admin/includes/functions/general.php on line270

 

Warning: Missing argument 3 for tep_get_zone_name() in/home/httpd/html/OTG-DSS/su/catalog/admin/includes/functions/general.php on line270

 

I have viewed the code and see that general.php in a stock store and this one are the same.

 

I believe this is the area refernced.

 

function tep_get_zone_name($country_id, $zone_id, $default_zone) {

$zone_query = tep_db_query("select zone_name from " . TABLE_ZONES . " where zone_country_id = '" . (int)$country_id . "' and zone_id = '" . (int)$zone_id . "'");

if (tep_db_num_rows($zone_query)) {

$zone = tep_db_fetch_array($zone_query);

return $zone['zone_name'];

} else {

return $default_zone;

}

}

 

How can I track the $zone_id? Where is this function called from? configuration.php?

 

John

Link to comment
Share on other sites

  • 4 weeks later...

function tep_get_zone_name($zone_id) {

$zone_query = tep_db_query("select zone_name from " . TABLE_ZONES . " where zone_id = '" . $zone_id . "'");

 

if (!tep_db_num_rows($zone_query)) {

return $zone_id;

} else {

$zone = tep_db_fetch_array($zone_query);

return $zone['zone_name'];

 

the above should replace this

 

function tep_get_zone_name($country_id, $zone_id, $default_zone) {

$zone_query = tep_db_query("select zone_name from " . TABLE_ZONES . " where zone_country_id = '" . (int)$country_id . "' and zone_id = '" . (int)$zone_id . "'");

if (tep_db_num_rows($zone_query)) {

$zone = tep_db_fetch_array($zone_query);

return $zone['zone_name'];

} else {

return $default_zone;

 

and error = Warning: Missing argument 2 for tep_get_zone_name() in/home/httpd/html/OTG-DSS/su/catalog/admin/includes/functions/general.php on line270

is gone, cheers

Link to comment
Share on other sites

  • 3 weeks later...

I have modified the general.php file in the manner suggested - the error codes for missing arguments 2 & 3 persist.

 

Additionally, while in admin looking at configuration my zone_code is not populated on the screen. Though it is when I look to edit the section.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...