If this is your first visit, check our documentation. To post, register or login.
Forums / Built-in Shipping and Payment Modules / Correct FedEx rates, but radio buttons inoperative!

Correct FedEx rates, but radio buttons inoperative!

Locked

Started by xylene on 22 May 2009, 9:05 PM · Views: 1,052

Results 1 to 5 of 5
This thread is locked. New replies are disabled.
22 May 2009, 9:05 PM
#1
xylene avatar

xylene

New Zenner

Join Date:
May 2009
Posts:
3
Plugin Contributions:
0

Correct FedEx rates, but radio buttons inoperative!

Hi All,

Have searched but not found an answer for this one.

Zen Cart v.1.3.8a
New install
FedEx module installed (downloaded from this site)
FedEx Express as only enabled shipping option

The FedEx module seems to be working fine, in that it is returning the (list) pricing correctly in checkout step 1 of 3.

HOWEVER, regardless which of the radio buttons are selected for the different shipping options, once the "Continue Checkout" button is pressed taking the user to step 2 of 3 the shipping price used to calculate the order total is ALWAYS the FedEx Priority Overnight price.

I offer up this sacrifice to the Zen Cart gods!

22 May 2009, 9:51 PM
#2
bunyip avatar

bunyip

Totally Zenned

Join Date:
Sep 2004
Location:
Western Massachusetts
Posts:
2,361
Plugin Contributions:
1

Re: Correct FedEx rates, but radio buttons inoperative!

Which module did you download: Fedex or Fedex XML?

Neville
An assumption is what you arrive at when you get tired of thinking...

22 May 2009, 11:01 PM
#3
xylene avatar

xylene

New Zenner

Join Date:
May 2009
Posts:
3
Plugin Contributions:
0

Re: Correct FedEx rates, but radio buttons inoperative!

The XML module.

23 May 2009, 12:24 AM
#4
bunyip avatar

bunyip

Totally Zenned

Join Date:
Sep 2004
Location:
Western Massachusetts
Posts:
2,361
Plugin Contributions:
1

Re: Correct FedEx rates, but radio buttons inoperative!

There is an error in that file that stops the selection of anything other than the overnight option from being carried forward to the payment page.

Edit includes/modules/shipping/fedexexpress.php - find this section of code (at about line 198):```php
//Setup the quotes array
$rates = array();

	//Loop Through Services set up above and return the quotes
	foreach($fedexService as $service => $serviceName){
		//Is the Service a Freight Service?
		if (($service == 'FEDEX1DAYFREIGHT') || ($service == 'FEDEX2DAYFREIGHT') || ($service == 'FEDEX3DAYFREIGHT')){
			$this->weight = $total_weight;
			//$this->resFlag = false;
		}
			$rates[] = $this->getPrice($service);
			
	}

and replace it with this:
```php
			//Setup the quotes array
		$rates = array();

        if (zen_not_null($method)) {
          $service = $method;
          $rates[] = $this->getPrice($service);
        
		} else {
		
		   //Loop Through Services set up above and return the quotes
		   foreach($fedexService as $service => $serviceName){
			 //Is the Service a Freight Service?
			 if (($service == 'FEDEX1DAYFREIGHT') || ($service == 'FEDEX2DAYFREIGHT') || ($service == 'FEDEX3DAYFREIGHT')){
				$this->weight = $total_weight;
				//$this->resFlag = false;
			 }
				$rates[] = $this->getPrice($service);
		   }
        
		}			 

Neville
An assumption is what you arrive at when you get tired of thinking...

23 May 2009, 1:05 AM
#5
xylene avatar

xylene

New Zenner

Join Date:
May 2009
Posts:
3
Plugin Contributions:
0

Re: Correct FedEx rates, but radio buttons inoperative!

Works flawlessly. Much appreciated comrade.