Git Product home page Git Product logo

Comments (3)

developingchris avatar developingchris commented on September 27, 2024

If you perform a rate request with 2 packages, it will rate them as being on a single label (sometimes called master label). So you just need to do 2 separate find_rates calls with your separate packages.

Then the per label surcharges will be applied to each and sum the results by the service code to see the overall shipping price.

So yes, the gem supports this, the api's by the carriers don't make it a single api call.

from active_shipping.

johnnncodes avatar johnnncodes commented on September 27, 2024

@developingchris Thanks for the response.

So for example our customer orders 2 pieces of item X, this is what we need to do:

response1 = ups.find_rates(origin, destination, package_x) # quantity of package_x is 1
response2 = ups.find_rates(origin, destination, package_x) # quantity of package_x is 1

# sum the rates of response1 & response2 by service code (Example: UPS Standard)

Is that correct?

Before you responded to my question, this is what we're doing btw:

packages = [package_x, package_x]
response = ups.find_rates(origin, destination, packages)

Since the customer orders 2 pieces of item x, instead of passing packages = [package_x] with quantity of 2, we're passing packages = [package_x, package_x] with package_x having quantity of 1.

Wouldn't it give the same result with your suggestion above?

from active_shipping.

developingchris avatar developingchris commented on September 27, 2024

so if you pass both packages to a single call. Then the shipping company will put both boxes on a single label. The carriers in my experience have a base fee per label. So it depends on how you want to pay for the labels. If the customer needs to pay the base fee on both boxes, then you need to do the merge way. If you want to provide the cheapest options available they can be a single label with "box 1 of 2" "box 2 of 2" labels on them as a set. In that case you would use what you are doing, passing 1 packages into the rate quote.

@jonathankwok has been looking into the idea of a Shipment concept which would make this more clear.

from active_shipping.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.