Zen Cart Logo
Forums / Built-in Shipping and Payment Modules / USPS Ship - add second handling fee for international orders

USPS Ship - add second handling fee for international orders

Locked

Views: 2,434

Results 1 to 2 of 2
This thread is locked. New replies are disabled.
22 May 2006, 8:43 PM
#1
jmcdog avatar

jmcdog

New Zenner

Join Date:
Apr 2006
Posts:
29
Plugin Contributions:
0

USPS Ship - add second handling fee for international orders

I need to charge a higher handling fee for international orders.
Domestic: $2.95
International: $6.00

Would it be as "simple" as adding a conditional to:
includes/modules/shipping/usps.php

And it wouldn't matter to me if I had to hard code it in somewhere.

Does ZC figure that its international or is this returned by USPS?

Maybe someone has another way that I could add extra just for intn'l orders?

5 Jun 2006, 9:09 PM
#2
jmcdog avatar

jmcdog

New Zenner

Join Date:
Apr 2006
Posts:
29
Plugin Contributions:
0

Re: USPS Ship - add second handling fee for international orders

I'm using the usps module and I wanted to have the same handling fee for Canada and US (which comes from the admin configuration for usps module) but a higher fee for international orders. I couldn't get an override folder to work so I had to change the core file. I think this is because some files can't be overridden???

This is my solution:

includes/modules/shipping/usps.php
Around line 199:

Changed:
$methods[] = array('id' => $type,
'title' => $title,
'cost' => ($cost + MODULE_SHIPPING_USPS_HANDLING) * $shipping_num_boxes);

To:
/// ADDED Extra Handling Fee for International Orders
if ($order->delivery['country']['id'] == SHIPPING_ORIGIN_COUNTRY || $order->delivery['country']['id'] == 38) { // 38 = Canada
$modified_usps_handling = MODULE_SHIPPING_USPS_HANDLING;
} else {
$modified_usps_handling = (MODULE_SHIPPING_USPS_HANDLING + 2.05);
}
///
$methods[] = array('id' => $type,
'title' => $title,
'cost' => ($cost + $modified_usps_handling) * $shipping_num_boxes);