BeerCan -
YOU ARE AMAZING :cool:!!!! ONCE AGAIN, I have to say, THIS FORUM IS PRICELESS!!
Your fix of the two // saved the day! :yes:
Thank you Thank you Thank you Thank you
Printable View
BeerCan -
YOU ARE AMAZING :cool:!!!! ONCE AGAIN, I have to say, THIS FORUM IS PRICELESS!!
Your fix of the two // saved the day! :yes:
Thank you Thank you Thank you Thank you
I am having the same problem with Fedex disappearing as an option on the checkout screen, so I would like to make this edit, but I am a little confused.
Do I make this edit (changing "title1" to "title") in both files in BOTH the shipping folders under /modules/ and /languages/? So I edit a total of four files? And change all instances of "title1"?
Also, does anyone know what the code in the tpl_footer.php does? Right above the legal blurb it has this code:
Thanks a bunch!!Quote:
<?php if ($_GET['main_page'] == 'checkout_shipping' || 'checkout') { ?>
Jeanne
DrByte's fix worked for me... im on 1.3.8a
:clap:
Ok, looks like I'm talking to myself here but I'll lay it out for others who may be having this same odd issue. Here's what I've got so far:
I updated the SHIPPING_MAX_WEIGHT to "150" (lbs in my case), which is the cutoff for Fedex Ground. Now, it's returning Ground availability on my packages EVEN WHEN THEY'RE SPLIT UP--but only for SOME zipcodes...insanity. I'm going to keep digging
UPDATE: Ok, it has nothing to do with the zipcodes. Fedex Home Delivery, which is chosen by default when there is no "Company" specified, has a maximum weight of 70lbs. So, it appears that the bug is 70+lbs and no "Company" will yield an empty Ground return...I'm going to look into includes/modules/shipping/fedexground.php and see where it's sending the request, perhaps there is a "service type" component that needs to be automatically switched to "Ground" instead of "Home Delivery" based on the weight of the packages. I'll keep everyone posted
Ok, looks like the problem is a conflict between Fedex's business rules and ZC's.
Fedex says:
Maximum weight for Home Delivery = 70lbs
Maximum weight for Ground = 150lbs
HOWEVER: You CAN ship a 150lbs package to a residence! It just has to ship via GROUND, not HOME DELIVERY.
So, the business rule SHOULD be: If the weight of the package is between 70lbs and 150lbs, and the address is "residential", ie; no $order->delivery['company'], then the requested service should be GROUND, not HOME DELIVERY
Zen Cart says:
Choose the maximum weight of the package your company will ship, if the total weight of your items exceeds this limit, divide by the maximum and ship that many separate boxes.
I suppose you could just set the max weight in Admin->Configuration->Shipping/Packaging to 70lbs, as this would ensure that you'd always get a rate returning for Home Delivery, however, this solution is less than ideal for merchants who ship heavy packages as their customers will see insanely high pricing for Home Delivery, when they could be seeing decent rates for GROUND.
I'm going to work on it for a little while longer and see if I can find a more robust solution that would encompass the business rules of Fedex.
I've been closely following your "exploits"(:laugh::laugh:) because I have a client in a similar business as yours. (http://www.kdezines.com) While it's not been an issue YET (their site JUST launched), I see that this shipping weight business and rates could very much become an issue for them.. Please continue to keep us posted on your progress and findings..
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:
To:Code:var $code, $title, $description, $sort_order, $icon, $tax_class, $enabled, $meter, $intl;
Code:var $code, $title, $description, $sort_order, $icon, $tax_class, $enabled, $meter, $intl, $max_homedelivery_weight;
around line 37:
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;Code:/*if ($order->delivery['company'] == '') {
$this->icon = DIR_WS_IMAGES . 'fedex-images/HOME.gif';
} else {
$this->icon = DIR_WS_IMAGES . 'fedex-images/GROUND.gif';
} */
add:
Code://max Home Delivery Weight
$this->max_homedelivery_weight = 70;
around line 156
change:
To:Code:case 90:
if ($order->delivery['company'] != '') {
$skip = true;
}
break;
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:
To:Code:if ($order->delivery['company'] == '') {
$skip = true;
}
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:
around line 546: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';
}
change:
To: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
}
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
}
If you tried posting the full code as part of your post, the forum software may not let you, but you may be able to attach your modded file to your post as a file attachment (zipping the file may help if filesize is an issue) .. BTW, thanks for the dedication and the work on this..:clap: Gonna make these changes and give it a shot on my dev site before pushing this live on my client's site....