Fatal error: Call to undefined function fn_get_shipping_service_data() in /controllers/admin/shippings.php on line 280

Fatal error: Call to undefined function fn_get_shipping_service_data() in /controllers/admin/shippings.php on line 280



Why?

What version are your running? That function should be in core/fn.cart.php,.

Running version 2.1.4



I haven't made any changes to core/fn.cart.php. Just tried to add a shipping method for the first time and got the error.



There is no function fn_get_shipping_service_data in my core/fn.cart.php. Should there be?



I see functions for:

fn_get_shippings

fn_get_shipping_rates

fn_get_shipping_name

fn_get_shipping_taxes



But no fn_get_shipping_service_data





Obviously, CS Cart is looking for that function and not finding it. Could someone take a quick look for that function in their core/fn.cart.php file? Maybe copy/paste for me?

I have it in 2.2.1



function fn_get_shipping_service_data($service_id)
{
static $services = array();

if (!isset($services[$service_id])) {

$service = db_get_row("SELECT intershipper_code, code, module FROM ?:shipping_services WHERE service_id = ?i AND status = 'A'", $service_id);

if (empty($service)) {
$services[$service_id] = false;
return false;
}

if (!empty($service['intershipper_code']) && Registry::get('settings.Shippings.intershipper_enabled') == 'Y') {
$service['module'] = 'intershipper';
$service['code'] = $service['intershipper_code'];
}

$services[$service_id] = $service;
}

return $services[$service_id];
}

Unbelievable! That fixed it right up! Thanks Race.



I just can't imagine what happened to that piece of code…

plink… Here is the version info from my file. What does yours say?



//
// $Id: fn.cart.php 12865 2011-07-05 06:57:22Z 2tl $
//

//
// $Id: fn.cart.php 11174 2010-11-09 12:42:30Z 2tl $
//


Looks like mine's older. I really can't fathom how just that line of code would be missing from my file… makes me wonder what else is missing.



Thanks again for the assist.



And nice site, btw: http://www.racingsolution.com/