I am using the UPSXML shipping module and need to discount all UPS shipping prices by 20%. We only ship 40 lb sacks of live crawfish overnight. The high shipping cost usually equals or exceeds the product cost, thus our shipping discount keeps our prices competitive. At the very least, I would like the price displayed in the shipping estimate to show the discounted shipping price before the customer initiates the checkout process.
Ideally, I would like the shipping estimator to show:
- the higher, original UPS shipping price,
- our 20% discount,
- and the new, discounted UPS shipping price.
I tried to adjust the shipping cost by adding a negative fraction for the handling fee, but this didn't work; it only gave me a blank page during checkout
From upsxml.php line 269:
ORIGINAL-
$methods[] = array('id' => $type, 'title' => $_type, 'cost' => ($this->(handling_fee * $cost) + $cost));
CHANGED TO-
$methods[] = array('id' => $type, 'title' => $_type, 'cost' => ($this->handling_fee + $cost));
Example:
UPS shipping cost is $100
handling_fee is -0.2
(handling_fee * $cost) + $cost)
(-0.2 * $100) + $100)
-20 + $100 = $80
UPS shipping cost with discount is $80
Maybe my php coding is incorrect.
Other possible options include:
- a permanent or default coupon without entering a coupon code,
- a negative tare value,
- or lowering the shipping weight (last resort)
Viewed these threads while looking for answers:
Can you give a % discount on the UPS shipping mod ?
Handling Fee as Percentage?
Adding Percentage Handling fee UPS
Help a Cajun out, please.



