Kryptronic Software Support Forum

You are viewing this forum as a guest. Login to an existing account, or create a new account, to reply to topics and to create new topics.

#1 01-20-2009 21:54:29

stage
Member
Registered: 12-12-2005
Posts: 170

Combine usps and custom shipping

Hi All,

I'm using a custom script for shipping, which is value-based.  I want to continue to use this for USA ship addresses, but for other countries I'd like to use live usps rate quotes.

Is there a way to put within my custom script some sort of call to realtime rates method, for country not= USA?

Or can anybody suggest a direction to head in, to accomplish my goal of a weight-based rate for international and a value-based rate for domestic?

Thanks,
Nathan

Offline

 

#2 01-21-2009 08:13:35

rachaelseven
Member
From: Massachusetts, USA
Registered: 01-23-2006
Posts: 3169
Website

Re: Combine usps and custom shipping

Hi Nathan,

The answer is no, there is no way to call the realtime rates from within a custom shipping script in 5.1.  I believe that feature is available in version 6.0 though, so upgrading would be one way to accomplish what you want. 

Another way would be to use  from me and rottenuncle that sets up an option to use realtime rates together with a custom shipping script.  You could disable all the domestic realtime rates and put a check in your custom script so you don't put out any rates for international orders, and you'd then end up with custom script for domestic and realtime for international.  Be careful with that hack though - the original post was non-functional and you will need to apply my corrections from further down the thread.

Finally, you could always just expand your custom shipping script to do weight based calculations for international orders.  You can check if an order is international using the following sort of if statement:

Code:

if ($fd_trackitem_shipcountry eq $site_owner_country) {

And the weight of the package is available in the variable $item_total_weight, so you could in theory bypass the realtime stuff and just expand your custom script.

Good luck!

EDIT: Corrected script example (inserted missing $ and changed operator).

Last edited by rachaelseven (01-21-2009 09:57:39)


Rachael Katz
- Custom Focusing Screens for DSLR Cameras

Offline

 

#3 01-21-2009 09:21:20

stage
Member
Registered: 12-12-2005
Posts: 170

Re: Combine usps and custom shipping

Thanks.  This sounds like a good direction to head in.

(At least one of them will be -- have to ponder a bit to decide which one :-)

Nathan

Offline

 

#4 01-21-2009 09:58:07

rachaelseven
Member
From: Massachusetts, USA
Registered: 01-23-2006
Posts: 3169
Website

Re: Combine usps and custom shipping

You're quite welcome.  Please note that I corrected two errors in my script example in case you decide to use that method.


Rachael Katz
- Custom Focusing Screens for DSLR Cameras

Offline

 

Board footer