Quote Originally Posted by j0ney3 View Post
Ok, looks like the problem is a conflict between Fedex's business rules and ZC's. ....
Ok, I ended up making some changes to fix the Home Delivery/Ground deficiency, all of the following changes are in:

includes/modules/shipping/fedexground.php, I'm just posting the changes since it won't let me post the entire file, etc

If someone wants to do this in a less hackish fashion, please repost, I'm sick of looking at it and want to be done with it, LOL

around line 23:
Code:
var $code, $title, $description, $sort_order, $icon, $tax_class, $enabled, $meter, $intl;
To:
Code:
var $code, $title, $description, $sort_order, $icon, $tax_class, $enabled, $meter, $intl, $max_homedelivery_weight;

around line 37:
Code:
if ($order->delivery['company'] == '') {
     $this->icon = DIR_WS_IMAGES . 'fedex-images/HOME.gif';
} else {
     $this->icon = DIR_WS_IMAGES . 'fedex-images/GROUND.gif';
}
TO:
Code:
/*if ($order->delivery['company'] == '') {
     $this->icon = DIR_WS_IMAGES . 'fedex-images/HOME.gif';
} else {
     $this->icon = DIR_WS_IMAGES . 'fedex-images/GROUND.gif';
} */
JUST AFTER line 46 (the line after $this->meter = MODULE_SHIPPING_FEDEX_GROUND_METER;
add:
Code:
//max Home Delivery Weight
$this->max_homedelivery_weight = 70;

around line 156
change:
Code:
case 90:
if ($order->delivery['company'] != '') {
     $skip = true;
}
 
break;
To:
Code:
case 90:
// If this is a candidate for GROUND service, either has "Company" 
// OR if the package weight is > max_homedelivery_weight
if ($order->delivery['company'] != '' or $this->pounds > $this->max_homedelivery_weight) {
	$skip = true;
}

break;

around line 170
change:
Code:
if ($order->delivery['company'] == '') {
	$skip = true;
}
To:
Code:
if ($order->delivery['company'] == '' and $this->pounds <= $this->max_homedelivery_weight) {
	$skip = true;
}

JUST BEFORE 226 (if (zen_not_null($this->icon)) $this->quotes['icon'] = zen_image($this->icon, $this->title);)
add:
Code:
// Set the icon based on weight limits AND Company
// This needs to be updated if $shipping_weight > $this->max_homedelivery_weight
if ($order->delivery['company'] == '' and $this->pounds <= $this->max_homedelivery_weight) {
	$this->icon = DIR_WS_IMAGES . 'fedex-images/HOME.gif';
} else {
	$this->icon = DIR_WS_IMAGES . 'fedex-images/GROUND.gif';
}
around line 546:
change:
Code:
if ($order->delivery['company'] == '' && MODULE_SHIPPING_FEDEX_GROUND_RESIDENTIAL == 0) {
	$data .= '440,"Y"'; // Residential address
		
} else {
	$data .= '440,"N"'; // Business address, use if adding a residential surcharge
					
}
To:
Code:
// Company is blank AND it's less weight than $this->max_homedelivery_weight
if ($order->delivery['company'] == '' 
   && MODULE_SHIPPING_FEDEX_GROUND_RESIDENTIAL == 0 
   && $this->pounds <= $this->max_homedelivery_weight) 
{
	$data .= '440,"Y"'; // Residential address
} else {
	$data .= '440,"N"'; // Business address, use if adding a residential surcharge
}