For every field to be captured, if you use a unique session variable name then you can capture as many such rates as coded. In the case of surepost, looks like only 92 or 93 will provide a non-zero rate based on weight. At least it would appear that way... Would test, but basically could use something like:
At the point where the rate is returned, using the variables specific to UPS, after setting that session variable to 0 and also put within an if statement like Ajeh suggested.Code:if($service_code == 92 || $service_code == 93) { $_SESSION['shipping_rate_surepost'] = $rate; }
The only thing overall that I see that *might* be an issue is if the shipping contents/rate change after the initial data collection. It might not be/probably isn't an issue, but I would recommend testing that scenario to see if something more has to be done...


Reply With Quote
