You appear to want to save the lowest cost of each shipping module to your order ...
For USPS you could customize the code:
/includes/modules/shipping/usps.php
around line 380 to include the code in RED:
Then around line 566 include the code in RED:Code:// bof: save lowest cost to $_SESSION['shipping_rate_usps'] $_SESSION['shipping_rate_usps'] == 0; // eof: save lowest cost to $_SESSION['shipping_rate_usps'] for ($i=0; $i<$PackageSize; $i++) {
Maybe this will help you on the other shipping modules ...Code:$cost += (MODULE_SHIPPING_USPS_HANDLING_METHOD == 'Box') ? $usps_handling_fee * $shipping_num_boxes : $usps_handling_fee; // bof: save lowest cost to $_SESSION['shipping_rate_usps'] if ($_SESSION['shipping_rate_usps'] == 0 || $_SESSION['shipping_rate_usps'] > $cost) { $_SESSION['shipping_rate_usps'] = $cost; } // eof: save lowest cost to $_SESSION['shipping_rate_usps'] // set the output title display name back to correct format $title = str_replace(array('RM', 'TM', '**'), array('®', '™', ''), $type_rebuilt);
NOTE: I have not tested this code


Reply With Quote
