Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at

  • Vineeth 67 posts 277 karma points
    May 24, 2019 @ 12:15

    Calculate custom shipping rate from an shipping API

    How can we assign Shipping rate from an external shipping API to tea commerce shipping method? With or without using customShippingCalculator?

  • Matt Brailsford 2576 posts 12723 karma points MVP 7x c-trib
    May 27, 2019 @ 14:32
    Matt Brailsford

    Hi Vineeth,

    You'd want to use a custom ShippingRateCalculator for this. You can find some info on the docs site here

    Ultimately, you'd setup a shipping method, but probably set it's value to 0, then using a custom shipping rate calculator, when the order total is calculated, check to see if they are using your shipping method and if they are, request an actual value from your API and return that from the CalculatePrice method.

    Hope this helps


Please Sign in or register to post replies

Write your reply to: