Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Upgrade Problem


pgowder

Recommended Posts

I've installed the new Milestone release and pointed it a copy of my live shop db.

 

Everything seems to work, except when I go to My Store in the admin, I get this:

 

Warning: Missing argument 2 for tep_get_zone_name() in /home/virtual/site2/fst/var/www/html/shop2/admin/includes/functions/general.php on line 270

 

Warning: Missing argument 3 for tep_get_zone_name() in /home/virtual/site2/fst/var/www/html/shop2/admin/includes/functions/general.php on line 270

Link to comment
Share on other sites

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;

}

}

Link to comment
Share on other sites

I don't know but here's what mine loosk like:

 

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

   }

 }

Link to comment
Share on other sites

I have the same error problem and the code from above did not fix it. I am using MS2 which I upgraded from a CVS version. I had the problem before I upgraded.

 

The code in MS2 general.php is

// Returns the zone (State/Province) name

// TABLES: zones

 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;

   }

 }



////

// Returns the zone (State/Province) code

// TABLES: zones

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

   $zone_query = tep_db_query("select zone_code 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_code'];

   } else {

     return $default_zone;

   }

 }

 

The same section in CVS:

  function tep_get_country_name($country_id) {

   $country_query = tep_db_query("select countries_name from " . TABLE_COUNTRIES . " where countries_id = '" . $country_id . "'");



   if (!tep_db_num_rows($country_query)) {

     return $country_id;

   } else {

     $country = tep_db_fetch_array($country_query);

     return $country['countries_name'];

   }

 }



 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 = '" . $country_id . "' and zone_id = '" . $zone_id . "'");

   if (tep_db_num_rows($zone_query)) {

     $zone = tep_db_fetch_array($zone_query);

     return $zone['zone_name'];

   } else {

     return $default_zone;

   }

 }

Boom... Big butta boom.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...