Comments (3)
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.
@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.
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)
- Incorrect Rates HOT 5
- UPS > get_delivery_date_estimates > need one more tag called TotalPackagesInShipment HOT 2
- Issue with fetching UPS rates for Bermuda
- FedEx insured value HOT 1
- Error when app starts
- Catch ActiveUtils::ResponseError during CanadaPostPWS receipt request HOT 1
- FedEx Negotiated Rates returning nil HOT 2
- testing the endpoint HOT 1
- cancel fedex shipment
- can you clarify 1.x vs 2.x? HOT 7
- fedex find_rates not returning all service_types HOT 1
- Negotiated Shipping Rates - UPS HOT 1
- Removing UPS integration HOT 10
- ActiveShipping::ResponseError (ERROR - 691: The PurposeOfShipmentType is null, empty or invalid.):
- Incorrect rates from API and UPS website
- Tests failing with Correios HOT 1
- Getting Authentication Failed HOT 1
- Add Shipment Notification Services to ServicesRequest node for FedEx HOT 1
- [Feature] FedEx Batch Tracking
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from active_shipping.