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 08-09-2013 08:17:58

JDLS88
Member
From: Maryland, USA
Registered: 07-06-2011
Posts: 102
Website

Declared value of package for FedEx?

Is there a way to add a declared value to the shipping cost of a package? Most of our products are pretty pricey and it's beneficial for both parties to have insurance on them.


Jeremy D.

Offline

 

#2 08-12-2013 08:09:55

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19798
Website

Re: Declared value of package for FedEx?

You could likely mod {private}/apps/ecom/ECOM_Ship/ext/fedex.php to get the declared value into the rate submission.  I'm not sure what the syntax would be, but FedEx I'm sure has documented it on their site.


Nick Hendler

Offline

 

#3 08-12-2013 08:43:47

JDLS88
Member
From: Maryland, USA
Registered: 07-06-2011
Posts: 102
Website

Re: Declared value of package for FedEx?

I'm trying to grab the documentation for shipping rates from FedEx and I see two options available- Rates and Rates Available Services. Any idea which of the two I should be looking at?


Jeremy D.

Offline

 

#4 08-12-2013 10:55:22

JDLS88
Member
From: Maryland, USA
Registered: 07-06-2011
Posts: 102
Website

Re: Declared value of package for FedEx?

Alternatively, is there a way I could create a custom shipping script that is fed the estimated shipping from FedEx and then adds a percentage-based fee to it?


Jeremy D.

Offline

 

#5 08-13-2013 08:35:44

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19798
Website

Re: Declared value of package for FedEx?

Here's a custom script that uses FedEx and adds $10 to every service:

Code:

<?php 

$info     = $this->globals('ecom.customship');
$custom   = array();

$upcharge = 10;

$delinfo = array('stateprov'     => $info['stateprov'],
                 'country'       => $info['country'],
                 'postalcode'    => $info['postalcode'],
                 'rescom'        => $info['rescom'],
                 'shipstateprov' => $info['shipstateprov'],
                 'shipcountry'   => $info['shipcountry'],
                 'shipzip'       => $info['shipzip'],
                 'shipmethods'   => 'FEDEX',
                 'shiptype'      => 'R');

$result = $this->include_namespace('ecom','shiprealtime',array('delinfo'  => $delinfo,
                                                               'packages' => $info['packages']));

foreach ($result as $num => $service) {

     $custom[$service['name']] = $service['amount'] + $upcharge;

} // End of foreach statement.

$this->globals('ecom.customship_response',$custom);

?>

Nick Hendler

Offline

 

#6 08-14-2013 10:03:37

JDLS88
Member
From: Maryland, USA
Registered: 07-06-2011
Posts: 102
Website

Re: Declared value of package for FedEx?

I set that up like a custom ship method, right? Because when I do, the shipping defaults to the value I set for when shipping fails.


Jeremy D.

Offline

 

#7 08-15-2013 09:26:18

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19798
Website

Re: Declared value of package for FedEx?

Correct.  Set this up as a custom shipping method, assign all products to use custom shipping and select the new script as a custom shipping script, then test after deleting all items from your cart and adding items with the new parameters.


Nick Hendler

Offline

 

#8 08-15-2013 09:41:32

JDLS88
Member
From: Maryland, USA
Registered: 07-06-2011
Posts: 102
Website

Re: Declared value of package for FedEx?

Hmm tried it again and it's still giving me the default $40 amount I set for when the shipping doesn't calculate correctly.
I have the shipping method set to that on two of the products (it was quicker than popping the entire prod table into excel and mass-changing it) and neither one is calculating at all. Just defaulting to $40.



Cleared my shopping cart and all that.


Jeremy D.

Offline

 

#9 08-16-2013 07:00:57

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19798
Website

Re: Declared value of package for FedEx?

Have you set up your FedEx connection?  Are you sure it's accurate and working? Ie. - test using FedEx as a realtime method without the custom shipping script.


Nick Hendler

Offline

 

#10 08-18-2013 20:01:37

JDLS88
Member
From: Maryland, USA
Registered: 07-06-2011
Posts: 102
Website

Re: Declared value of package for FedEx?

Yup. Prior to this it was setup to calculate shipping through the stock FedEx shipping method and was doing so accurately. Aside from the insurance of course.


Jeremy D.

Offline

 

#11 08-19-2013 09:47:51

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19798
Website

Re: Declared value of package for FedEx?

Please open a ticket here with a reference to this forum post and I'll take a look at it:

https://kryptronic.com/cms-dynform/TECHTICKET.html


Nick Hendler

Offline

 

#12 08-19-2013 09:51:49

JDLS88
Member
From: Maryland, USA
Registered: 07-06-2011
Posts: 102
Website

Re: Declared value of package for FedEx?

done.


Jeremy D.

Offline

 

#13 12-18-2014 15:15:36

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

Re: Declared value of package for FedEx?

The Fedex upcharge script in the 8/13/13 post works for me.

Can you tell me how to modify it so that, instead of adding a set amount ($10 in your example), it adds a certain percentage of the product value, for example 2% of the item subtotal?

TIA,
Nathan

Offline

 

#14 12-19-2014 19:09:34

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19798
Website

Re: Declared value of package for FedEx?

Change:

Code:

$upcharge = 10;

To:

Code:

$upcharge = $info['total'] * .02;

Nick Hendler

Offline

 

Board footer