An interesting client request created delimna using Ubercart, USPS & FedEX
A very important client of ours requested that USPS be used when under 70 lbs (as their limits are really 70-75 lbs) and at that point the FedEX module be used then and only then (Above 70 lbs - as their limits are really HIGH and not necessarily "pinpointable"...) After a max is reached a message would be displayed to tell the prospective client to call in and no quotes be displayed. With workflow-ng it sounds simple enough right? Not even close...
Turns out the USPS and FedEX and their respective services measure weight and calculation of such completely different! 8 packages of the same time are calculated quite differently by both modules, so my pass off point, 70 lbs... fails to pass off at all.
Now if you just offer both services simultaneously you should have no problems. Tried many different combinations, but workflow-ng just straight fails any time you mess with the order weight or order of rules etc... very screwy and wasn't worth it for us to majorly overhaul.
The max weight message is easy enough with some php, say it's 150 lbs, put it in a block and it will work:
<?php
$items = uc_cart_get_contents();
foreach($items as $item) {
$weights += ($item->qty * $item->weight);
}
$total_weight = $weights;
if(
$total_weight > '150') {
drupal_set_message("ALERT: Your shopping cart is over 150 lbs and our online shipping services require you call in to get the best rates. Please call Paula at 209-932-5005 to place your order.", 'error');
}
?>


Comments
Post new comment