Changes in FedEx response

37 views
Skip to first unread message

Luke

unread,
Mar 25, 2011, 8:32:44 PM3/25/11
to Satchmo developers
I was having trouble getting rate quotes from FedEx, but changing
EffectiveNetDiscount to TotalDiscount seems to have solved it.
Anybody else have this issue? Should I submit this patch for
inclusion?

Just getting started in Satchmo and not sure if its my mistake in
setting something up right or if this actually needs to be fixed.

Thanks,
Luke

diff -r e3421acd89d9 satchmo/apps/shipping/modules/fedex/shipper.py
--- a/satchmo/apps/shipping/modules/fedex/shipper.py Tue Mar 22
11:28:51 2011 +0100
+++ b/satchmo/apps/shipping/modules/fedex/shipper.py Fri Mar 25
20:24:08 2011 -0400
@@ -242,7 +242,7 @@

if not error:
this_charge =
float(response.documentElement.getElementsByTagName('NetCharge')
[0].firstChild.nodeValue)
- this_discount =
float(response.documentElement.getElementsByTagName('EffectiveNetDiscount')
[0].firstChild.nodeValue)
+ this_discount =
float(response.documentElement.getElementsByTagName('TotalDiscount')
[0].firstChild.nodeValue)
self.delivery_days =
response.documentElement.getElementsByTagName('TimeInTransit')
[0].firstChild.nodeValue

total_cost = this_charge + this_discount

hynekcer

unread,
Mar 26, 2011, 2:28:15 PM3/26/11
to Satchmo developers
I googled about FedEx problem [1]
"EffectiveNetDiscount = The difference between account based rates and
list rates. Only returned when list rates are requested." [2]
Maybe it will help someone who is able to continue and consider the
case.
I do not know, what is fedex :-) need not it.

[1] http://www.google.com/search?q=site%3Afedex.com+EffectiveNetDiscount
[2] http://fedex.com/us/developer/product/WebServices/MyWebHelp/Content/unsecure/images/ShipSchema.html

Legend: There's a large sofware company who likes to correcting errors
in a different place than they arose. I do not like to follow it.

Hynek

mattym

unread,
Mar 29, 2011, 2:41:47 PM3/29/11
to Satchmo developers
Thanks for posting. I am tweaking on a production cart now.
I also noticed it's on line 288 (for not single box)

On Mar 26, 11:28 am, hynekcer <hy...@sdb.cz> wrote:
> I googled about FedEx problem [1]
> "EffectiveNetDiscount = The difference between account based rates and
> list rates. Only returned when list rates are requested." [2]
> Maybe it will help someone who is able to continue and consider the
> case.
> I do not know, what is fedex :-) need not it.
>
> [1]http://www.google.com/search?q=site%3Afedex.com+EffectiveNetDiscount
> [2]http://fedex.com/us/developer/product/WebServices/MyWebHelp/Content/u...
Reply all
Reply to author
Forward
0 new messages