Guest Posted May 14, 2007 Share Posted May 14, 2007 A customer of mine just reported getting an error when checking out. After looking over the file indicated, I found a small bug. Around line 30 is the following code: if(!isset($module['rescom'])) { $rate->rescom("RES"); // See the rescom() function for codes } else $rate->rescom(strtoupper($module['rescom'])); // See the rescom() function for codes } There is a missing '{' after the else clause, so the correct code should look like: if(!isset($module['rescom'])) { $rate->rescom("RES"); // See the rescom() function for codes } else { $rate->rescom(strtoupper($module['rescom'])); // See the rescom() function for codes } Quote Link to comment Share on other sites More sharing options...
Guest Posted May 15, 2007 Share Posted May 15, 2007 Thanks AlanT... I was having the same problem. Quote Link to comment Share on other sites More sharing options...
Guest fibernotion Posted May 26, 2007 Share Posted May 26, 2007 Wow, that is amazing!, I'll report this oversight to CC support. Quote Link to comment Share on other sites More sharing options...
Guest AnnPFJ Posted May 30, 2007 Share Posted May 30, 2007 Thank you, that was driving me nuts! Quote Link to comment Share on other sites More sharing options...
Guest jammansf Posted June 13, 2007 Share Posted June 13, 2007 Hi, Read your post, but when looking at my calc.php file I don't see the segment of the code: this is what I have: <?php $module = fetchDbConfig("UPS"); if($module['status']==1){ require("ups.php"); foreach($module as $key => $value){ if(ereg("product_",$key) && $value==1){ $productCode = substr($key,8,3); $rate = new Ups; $rate->upsProduct($productCode); // See upsProduct() function for codes $rate->origin($module['postcode'], countryIso($config['siteCountry'])); // Use ISO country codes! $rate->dest($basket['delInf']['postcode'], countryIso($basket['delInf']['country'])); // Use ISO country codes! $rate->rate("RDP"); // See the rate() function for codes $rate->container($module['container']); // See the container() function for codes $rate->weight($totalWeight); $rate->rescom("RES"); // See the rescom() function for codes switch ($productCode) { case "GND": $desc = $lang['misc']['ground']; break; case "3DS": $desc = $lang['misc']['3daySelect']; break; case "2DA": $desc = $lang['misc']['2ndDayAir']; break; case "1DA": $desc = $lang['misc']['nextDayAir']; break; } $quote = $rate->getQuote(); if($quote>0){ $sum = $quote; $shippingPrice .= $rate->getOpt($sum,$productCode,$desc); $shippingAvailable = TRUE; } } } } unset($module); ?> Quote Link to comment Share on other sites More sharing options...
kinetic Posted June 27, 2007 Share Posted June 27, 2007 my question is why hasnt this been updated in the 3.0.16 download? at least it wasnt up till a few days ago... Quote Link to comment Share on other sites More sharing options...
Guest Jump1979man Posted June 27, 2007 Share Posted June 27, 2007 nice find....cant believe it was overlooked. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.