06-05-2012, 01:16 PM
[eluser]beaudierman[/eluser]
I am using a slightly modified version of the UPS Rate Tool found on the wiki:
http://codeigniter.com/wiki/UPS_Rate_Tool
I am trying to first ping UPS for the ground rate(03) and echo that out, then ping & echo all other UPS rates. This is if somebody buys regular items + free shipping items I can quote them ground sans the weight of the free shipping and then the other rates including free shipping weight.
The problem is that after the first UPS quote is echo'd out, the script dies and doesn't load anything else in my controller. I have error reporting turned on and it shows no PHP errors or notices at all.
My code:
I'm coming from a custom built platform and to accomplish this I simply instantiate the UPS class a 2nd time and it works fine. I tried to load the library twice with different names(http://ellislab.com/codeigniter/user-gui...oader.html) and get the same problem. I can comment out either of them and the entire controller loads fine. Any ideas?
I am using a slightly modified version of the UPS Rate Tool found on the wiki:
http://codeigniter.com/wiki/UPS_Rate_Tool
I am trying to first ping UPS for the ground rate(03) and echo that out, then ping & echo all other UPS rates. This is if somebody buys regular items + free shipping items I can quote them ground sans the weight of the free shipping and then the other rates including free shipping weight.
The problem is that after the first UPS quote is echo'd out, the script dies and doesn't load anything else in my controller. I have error reporting turned on and it shows no PHP errors or notices at all.
My code:
Code:
$ups_rates = $this->ups_rate->get_rate($destination_zip, '03', $number_of_packages, $weight_of_packages, $residential);
foreach($ups_rates as $value) {
echo '<option value="' . $value['Rate'] . '">' . $value['ServiceName'] . ' - $' . $value['Rate'] . '</option>';
}
$ups_rates = $this->ups_rate->get_rate($destination_zip, '', $number_of_packages, $weight_of_packages, $residential);
foreach($ups_rates as $value) {
echo '<option value="' . $value['Rate'] . '">' . $value['ServiceName'] . ' - $' . $value['Rate'] . '</option>';
}
I'm coming from a custom built platform and to accomplish this I simply instantiate the UPS class a 2nd time and it works fine. I tried to load the library twice with different names(http://ellislab.com/codeigniter/user-gui...oader.html) and get the same problem. I can comment out either of them and the entire controller loads fine. Any ideas?