Welcome, Guest. Please login or register.
Login with username, password and session length


It's a release candidate! VirtueMart 2.0 RC - the next generation VirtueMart - is available! Read more....

  Advanced search

247038 Posts in 67506 Topics- by 258314 Members - Latest Member: aniketana
Pages: 1 ... 22 23 [24] 25 26 ... 29   Go Down
Print
Author Topic: USPS v5 - Bundled and Unbundled shipping  (Read 62671 times)
lowmips
Global Moderator
Hero Member
*
Posts: 1134


WWW
« Reply #345 on: January 09, 2011, 12:49:06 PM »

Reggie, thanks for covering my behind on the password! I should not post on forums before 2 cups of cofee :-). Also thanks for helping me yesterday. I know you're busy with projects but I wanted to let others know that you are a great asset and I was happy to PAY you for your help. I hope that people using your mod are donating because your work is excellent and you deserve to be compensated. Open source works because there are guys like you willing to share your knowledge for "free" but no one can pay their bills by working for free too much... so this note is to everyone else that has found your forum support so helpful... even a small donation adds up and keeps these great assets available to us! When I find great supporters like Reggie I visit their websites to find their donate buttons - if I don't find one I email them and ask them for an email where I can send money via PayPal... just sayin'....

Thanks for the kind words (and financial support)!
Logged

Visit my website at www.lowmips.com
View my newsletters Here (sign up for newsletters on the front page of my website)
BenjaminR
Newbie
*
Posts: 19


« Reply #346 on: January 09, 2011, 13:04:12 PM »


What does the XML reply say about it?

Code:
<?xml version="1.0"?>
<IntlRateResponse><Package ID="0"><Error><Number>-2147218046</Number><Source>IntlPostage;clsIntlPostage.GetCountryAndRestirctedServiceId;clsIntlPostage.CalcAllPostageDimensionsXML;IntlRate.ProcessRequest</Source><Description>Invalid Country Name</Description><HelpFile></HelpFile><HelpContext>1000440</HelpContext></Error></Package></IntlRateResponse>
Logged
lowmips
Global Moderator
Hero Member
*
Posts: 1134


WWW
« Reply #347 on: January 09, 2011, 13:19:50 PM »

Makes sense.  International requests use the country name, and anything other than France for French addresses will not work.

You might want to consider removing that 'country' from the database.
Logged

Visit my website at www.lowmips.com
View my newsletters Here (sign up for newsletters on the front page of my website)
BenjaminR
Newbie
*
Posts: 19


« Reply #348 on: January 09, 2011, 13:31:13 PM »

Makes sense.  International requests use the country name, and anything other than France for French addresses will not work.

You might want to consider removing that 'country' from the database.

Wonder how many other countries aren't compatible with the standard input of the USPS api? There's a few that have odd looking names which could potentially not be accepted. Thoughts? There's 246 countries in VM. Too many to test one by one, but if there were a list from USPS, could easily compare.
Logged
lowmips
Global Moderator
Hero Member
*
Posts: 1134


WWW
« Reply #349 on: January 09, 2011, 13:37:32 PM »

Finding a comprehensive list for anything on USPS's web site is...a pain.  I'd guess anything that isn't ISO 3166-1 "English Short Name" would trigger an error.
Logged

Visit my website at www.lowmips.com
View my newsletters Here (sign up for newsletters on the front page of my website)
BenjaminR
Newbie
*
Posts: 19


« Reply #350 on: January 10, 2011, 13:07:17 PM »

Amber @ USPS just sent the API technical guide, I can email it to you if you need a copy.

Right now I'm trying to figure out how to calculate some products as large packages and the rest as regular parcels. Seems I have to choose for all orders and not by product.

Wonder what it would take to add the parcel size to the product properties table and pass it back into the USPS V5?

Logged
lowmips
Global Moderator
Hero Member
*
Posts: 1134


WWW
« Reply #351 on: January 10, 2011, 13:11:43 PM »

If you're shipping one product per package, you could create a package type flag per each product and set each product as unbundled (ship alone).  Then pass the product flag per each package when requesting the rate.

If you're looking to stuff multiple products into the same package, you'll probably want to go with some other method (volume, count, etc). 
Logged

Visit my website at www.lowmips.com
View my newsletters Here (sign up for newsletters on the front page of my website)
BenjaminR
Newbie
*
Posts: 19


« Reply #352 on: January 10, 2011, 15:46:11 PM »

What I need is a Regular, Large, Oversize ddl on the product description page that when bundling the largest will be used to submit that bundle for usps quote.

What do you think?
Logged
lowmips
Global Moderator
Hero Member
*
Posts: 1134


WWW
« Reply #353 on: January 10, 2011, 15:47:28 PM »

Sounds like it's starting to get complicated  Wink
Logged

Visit my website at www.lowmips.com
View my newsletters Here (sign up for newsletters on the front page of my website)
BenjaminR
Newbie
*
Posts: 19


« Reply #354 on: January 10, 2011, 16:21:03 PM »

Cool, so let me know when it's ready?

he he.

Actually I'm thinking I might give it a go. I just need the time to do it.
Logged
BenjaminR
Newbie
*
Posts: 19


« Reply #355 on: January 13, 2011, 14:57:03 PM »

Actually the V4 API reference requires dimensions to be passed for size = LARGE
How about checking for any measurement >12" in the product dimensions and passing the product dimensions in the XML request?

Width:
Value must be numeric. Units are inches. Required
when RateV4Request/Size is LARGE.
For example: <Width>5.5</Width>

Length:
Value must be numeric. Units are inches. Required
when RateV4Request/Size is LARGE.
For example: <Length>11</Length>

Height:
Value must be numeric. Units are inches. Required
when RateV4Request/Size is LARGE.
For example: <Height>11</Height>

What do you think Reggie?
Logged
lowmips
Global Moderator
Hero Member
*
Posts: 1134


WWW
« Reply #356 on: January 13, 2011, 14:59:02 PM »

that would work for unbundled items.  bundled, not so much.  how will you determine the dimensions?

Not an easy task, if you allow different sized products to be bundled together.
Logged

Visit my website at www.lowmips.com
View my newsletters Here (sign up for newsletters on the front page of my website)
BenjaminR
Newbie
*
Posts: 19


« Reply #357 on: January 13, 2011, 15:13:56 PM »

that would work for unbundled items.  bundled, not so much.  how will you determine the dimensions?

Not an easy task, if you allow different sized products to be bundled together.

I've always wondered how that get's calculated anywhere. It does explain why Amazon ships pens in a 12" square box though..


In my case, I can always combine the smaller items in the largest box. I just need to combine the weight into the largest package size. 

Logged
lowmips
Global Moderator
Hero Member
*
Posts: 1134


WWW
« Reply #358 on: January 13, 2011, 15:55:14 PM »

Believe me, when I find an open source box-stuffing algorithm, I'll be a happy programmer. There is no complete solution to the problem, only near-solutions.  And I have been unable to find any 3-D algorithms, only 2-D.  I'm sure Amazon and the like had some very smart people design their algorithms, and the algorithms are highly guarded secrets.

I have an idea of how to "brute force" the answer, but I know it would involved a lot of computation time, and probably a lot of database space to implement it. Eventually I'd like to test the theory out Wink.
Logged

Visit my website at www.lowmips.com
View my newsletters Here (sign up for newsletters on the front page of my website)
norman kaui
Newbie
*
Posts: 14


« Reply #359 on: January 13, 2011, 16:19:51 PM »

Hi, reading the previous threads I think we're having a similar issue.  A few days ago we started receiving the following error: "We are unable to ship via USPS at this time. System Error"

After setting VM into debug mode we found the following:
Quote
Debug: Starting Shipping module: uspsv5
Debug: uspsv5::list_rates() - Starting
Debug: Shipment::addPackage() Adding a new unbundled package
Debug: Shipment::addPackage() - Package Number: 1
Debug: Shipment::addPackage() - Package is Unbundled
Debug: Shipment::addPackage() - Maxweight: 70
Debug: Package::addItem() - ***** Adding item 86 (1LB) to package #1 *****
Debug: Package::addItem() - Package weight is now: 1.56
Debug: Shipment::addPackage() Adding a new unbundled package
Debug: Shipment::addPackage() - Package Number: 2
Debug: Shipment::addPackage() - Package is Unbundled
Debug: Shipment::addPackage() - Maxweight: 70
Debug: Package::addItem() - ***** Adding item 86 (1LB) to package #2 *****
Debug: Package::addItem() - Package weight is now: 1.56
Debug: Shipment::addPackage() Adding a new unbundled package
Debug: Shipment::addPackage() - Package Number: 3
Debug: Shipment::addPackage() - Package is Unbundled
Debug: Shipment::addPackage() - Maxweight: 70
Debug: Package::addItem() - ***** Adding item 86 (1LB) to package #3 *****
Debug: Package::addItem() - Package weight is now: 1.56
Debug: Shipment::addPackage() Adding a new unbundled package
Debug: Shipment::addPackage() - Package Number: 4
Debug: Shipment::addPackage() - Package is Unbundled
Debug: Shipment::addPackage() - Maxweight: 70
Debug: Package::addItem() - ***** Adding item 86 (
 1LB) to package #4 *****
Debug: Package::addItem() - Package weight is now: 1.56
Debug: Package::query_rates() - Querying for Source: US/96816 , Destination: US/96830, Weight: 1.56
Debug: uspsv5::get_rates_array() - Using cached rate for US, 96816, US, 96830, 1.56
Debug: Package::query_rates() - Rate query returned null results.
Debug: Shipment::populate() - query_rates() failed.
Debug: uspsv5::list_rates() - shipment->populate() failed!
Notice: We are unable to ship via USPS at this time. System Error.

Any advice or assistance with this would be greatly appreciated.  Thank you. 


Logged
Pages: 1 ... 22 23 [24] 25 26 ... 29   Go Up
Print
Jump to: