Important Notice from AspDotNetStorefront
It is with dismay that we report that we have been forced, through the action of hackers, to shut off write-access to this forum. We are keen to leave the wealth of material available to you for research. We have opened a new forum from which our community of users can seek help, support and advice from us and from each other. To post a new question to our community, please visit: http://forums.vortx.com
Results 1 to 8 of 8

Thread: Real Time Shipping Rate with FedEx

  1. #1
    e12ic is offline Junior Member
    Join Date
    Sep 2008
    Posts
    15

    Default Real Time Shipping Rate with FedEx

    Hi there,

    Is there a way in the store that will allow to display the non-discounted RT shipping rate versus the discounted RT shipping rate for my account?

    Please advise and thanks before hand

  2. #2
    ASPDNSF Staff - Jon's Avatar
    ASPDNSF Staff - Jon is offline Senior Member
    Join Date
    Sep 2004
    Posts
    11,419

    Default

    The FedEx Rating Service can return "list rate courtesy quotes" (see pg 19 of their XML Specification) if the optional < ListRate > element is set to true or 1. We always want the "lowest cost" rate, so we don't ask for the "list rate".

    You have a couple of options:

    • You can set the < ListRate > element to true or 1, then extract one of the < ListCharges > from their response. You have the choice of "Base Charge", "Net Charge", or "Total Customer Charge" depending on what surcharges or discounts you want applied. This method would require source code modifications to the RTShipping class.
    • You can use the "RTShipping.MarkupPercent" AppConfig to "add back in" the discount percentage. For example, if you receive a discount of 30% off list rates, you could markup the Discounted Rate by 42% to get back to the List Rate.
    Jon Wolthuis

  3. #3
    e12ic is offline Junior Member
    Join Date
    Sep 2008
    Posts
    15

    Default

    John,

    I have the source code for my storefront, and I've found this code on the RTShipping class
    FedExRequest.Append("<ListRate>false</ListRate>")

    Question, since this classes are not uploaded to the web server, what do I need to do after changing the <ListRate> to true?

    Please help...

    Thanks

  4. #4
    ASPDNSF Staff - Jon's Avatar
    ASPDNSF Staff - Jon is offline Senior Member
    Join Date
    Sep 2004
    Posts
    11,419

    Default

    The second mod is to grab a different rate from FedEx's reply.

    Once you're done with that, recompile to create a new DLL for that project, and copy the DLL to your \web\bin folder on your server. Restart the server, and you should be good.

    Whenever you make changes, it's always good to make a backup first, just in case.
    Jon Wolthuis

  5. #5
    sha87 is offline Member
    Join Date
    Oct 2010
    Posts
    31

    Default

    I'm sorry to bump this old thread, but I thought it was probably better than making a new one..

    I am trying to do the same thing as the original poster. FedEx for some reason is giving me a discount on a few shipping methods, which is nice, but I always pay the "regular" price when I ship.

    I was able to find and change the ListRate line to true in RTShipping.cs, but upon saving the change / restarting the server, the RTSRequest going out still says <ListRate>false</ListRate>. I'm not sure what Jon meant about compiling the changes as I haven't worked with the source code before. All the other files I've changed take effect after simply saving them. Any help please?

    Also, if anyone knows where to insert the <ListCharges> to get the non-discounted rates, it would be very helpful... Thank you!
    Last edited by sha87; 02-22-2011 at 09:21 AM.

  6. #6
    sha87 is offline Member
    Join Date
    Oct 2010
    Posts
    31

    Default

    I figured this out on my own! Ended up being very simple

  7. #7
    dcurtis603 is offline Junior Member
    Join Date
    Jan 2010
    Posts
    10

    Default

    sha87,

    Can you share what the easy fix was? I'm having the exact same issue as you -- FedEx rates coming back way too low (discounted) while I pay list.

    If you have any info, it'd be much appreciated. I'm sure there are others that are having the same issue.


    dan c
    daniel.curtis@gmail.com

  8. #8
    sha87 is offline Member
    Join Date
    Oct 2010
    Posts
    31

    Default

    Sure,

    All I had to do was edit the RTShipping.cs class (which is in the AspDotNetStorefrontCore "package") and I found the lines (I think 3 or 4) where it had the following:

    Code:
    FedExRequest.Append("<ListRate>false</ListRate>");
    And replace them with

    Code:
    FedExRequest.Append("<ListRate>true</ListRate>");
    Then, I found the lines (3) that have the following:

    Code:
    String Sx = nodeEntry.SelectSingleNode("EstimatedCharges/DiscountedCharges/NetCharge").InnerText;
    And replaced those with

    Code:
    String Sx = nodeEntry.SelectSingleNode("EstimatedCharges/ListCharges/NetCharge").InnerText;
    I then re-compiled the ASPDotNetStoreFrontCore.dll, copied it to my local web folder, restarted the server and it was working I haven't tried changing the NetCharge portion of the last line to "TotalCustomerCharge" like Jon mentioned, but it's working great just by making the changes I put in red.
    Last edited by sha87; 02-28-2011 at 08:13 AM. Reason: Clarification