This is G o o g l e's cache of http://www.ubercart.org/forum/bounties/1094/usps_module as retrieved on Jul 31, 2007 21:40:48 GMT.
G o o g l e's cache is the snapshot that we took of the page as we crawled the web.
The page may have changed since that time. Click here for the current page without highlighting.
This cached page may reference images which are no longer available. Click here for the cached text only.
To link to or bookmark this page, use the following url: http://www.google.com/search?q=cache:HKjND0TzIGwJ:www.ubercart.org/forum...
Google is neither affiliated with the authors of this page nor responsible for its content.
These search terms have been highlighted: 07 24 2007
Ubercart
* Home
* Documentation
* Forums
* Issues
* Livetest
Home » Forums » Ubercart » Bounties
USPS module
Submitted by mimetic2 on Mon, 06/11/2007 - 19:10
mimetic2
Posts: 96
Joined: 05/09/2007
Bug Finder
How much would it be to get a USPS module done in the next 2 weeks? Also would it be possible to make it so the user has a choice between prices (UPS and USPS select box maybe?) All i need is Priority mail.
* Add new comment
permalinkTue, 06/12/2007 - 09:26
Andy
Posts: 255
Joined: 09/27/2006
Administrator
Let us look at how hard this is. I will have an estimate by the end of the day.
Peace,
Andy
* reply
permalinkWed, 06/13/2007 - 14:31
mimetic2
Posts: 96
Joined: 05/09/2007
Bug Finder
any luck?
* reply
permalinkThu, 06/14/2007 - 10:33
BioBen
Posts: 39
Joined: 05/03/2007
Mimetic2, check your email. When you say two weeks that was back on 6/9. Do you need the module complete by 6/23? Or the sooner the better?
* reply
permalinkThu, 06/14/2007 - 11:04
ovejeromd
Posts: 2
Joined: 05/12/2007
Hey guys I am also interested on this module,can you please email me the details and price ?
* reply
permalinkThu, 06/14/2007 - 11:08
cosmo83@drupal.org
Posts: 47
Joined: 05/22/2007
Bug FinderGetting busy with the Ubercode.
Had already quoted with mimetic2, but he is looking it at a later stage. If you are looking for it now, please give the timeline by when do you require this. I will send you the quote
* reply
permalinkThu, 06/14/2007 - 11:21
cosmo83@drupal.org
Posts: 47
Joined: 05/22/2007
Bug FinderGetting busy with the Ubercode.
And maybe you guys both can pool in the funds
* reply
permalinkFri, 06/15/2007 - 19:14
mimetic2
Posts: 96
Joined: 05/09/2007
Bug Finder
Andy quoted me 200 for i believe a couple weeks. Cosmo was a little more but would finish in one day.
Hope this helps. I ended up not needing this until i can put everything in one box. in other words 2 different products would usually goin one box but the way it is now each differentp roduc tis its own box which costs quite a bit more in shipping.
* reply
permalinkFri, 06/15/2007 - 23:25
cosmo83@drupal.org
Posts: 47
Joined: 05/22/2007
Bug FinderGetting busy with the Ubercode.
Phewww..
I also have the same requirement, Iam working on it, but it will not be a generic module,
* reply
permalinkWed, 07/04/2007 - 11:33
jon.aronstein
Posts: 18
Joined: 06/21/2007
What is the current status? anyone get a usps module done?
* reply
permalinkWed, 07/04/2007 - 13:37
ovejeromd
Posts: 2
Joined: 05/12/2007
I'm a bit frustrated with the ups module, is there any other shipping modules that could be used? If any of you guys need the USPS module I am willing to pay a portion to get it developed! please private message me if anyone is willing to do it.
* reply
permalinkThu, 07/05/2007 - 10:45
Lyle
Posts: 560
Joined: 09/26/2006
AdministratoreLiTe!
I started working on this when the thread was started. Since so many people are interested, I'm going to go ahead and release it. If you want to be really nice, a donation would be much appreciated.
I think there's a lot of stuff I implemented that isn't really important to e-commerce stores, so try and figure out which options and settings are appropriate to your situation. As always, you can ask in the forums any questions that come up.
Attachment Size
uc_usps.zip 9.63 KB
* reply
permalinkThu, 07/05/2007 - 14:48
torgosPizza
Posts: 32
Joined: 07/05/2007
Lyle, Thanks so much for creating the USPS module. I'll be testing it out for you today! We're currently in the process of creating a 3rd version of our site, and using Drupal to do it, along with UC and many other modules.
Just wanted to say though, (aside from UC being fantastic!) that after installing the new module, a link for USPS Configuration is nowhere to be found in the Admin > Store Configuration navigation. After looking through your code, though, I was able to find the location: (yoursite.com)/admin/store/settings/quotes/methods/usps
as opposed to the UPS module which is just /admin/store/settings/quotes/ups.
Hope this can help other people. Thanks again! Looking forward to posting more here as I integrate deeper into the UC community.
Best Regards,
Erik
* reply
permalinkThu, 07/05/2007 - 15:41
druru
Posts: 220
Joined: 03/21/2007
Brain Stormer
lyle, will this usps module be included in A7 or is it still a la carte for now (until it's more weather tested)?
* reply
permalinkThu, 07/05/2007 - 16:26
torgosPizza
Posts: 32
Joined: 07/05/2007
Hey guys, quick question.
When I save my settings in the USPS module, I get these errors:
warning: uc_usps_quote(modules/ubercart/uc_store/includes/simplexml.php): failed to open stream: No such file or directory
warning: uc_usps_quote(): Failed opening 'modules/ubercart/uc_store/includes/simplexml.php' for inclusion (include_path='.:')
I checked the folders that this file is supposed to be in, but I don't see it. Is there a location where I can download this included file and upload it to the modules' include folder? I have the latest version of UC, so I'm not sure if it's a problem of a new addition or what. Any help is appreciated!
Erik
* reply
permalinkThu, 07/05/2007 - 16:35
Lyle
Posts: 560
Joined: 09/26/2006
AdministratoreLiTe!
USPS will be in A7. It's already in the repository, so it's publicly available.
torgosPizza, the USPS module is written for the latest Übercart code. Once you upgrade, the UPS module should put it's admin settings in /admin/store/settings/quotes/methods/ups, and that will be a local task that you can click. Since you did find the USPS settings, you ought to be able to play around with it.
Note that USPS requires an email from you to get you to use their service. The details can be found at http://www.usps.com/webtools
* reply
permalinkThu, 07/05/2007 - 16:36
Lyle
Posts: 560
Joined: 09/26/2006
AdministratoreLiTe!
Whoops. That completely slipped my mind. Here it is. Don't forget to take off the "_.txt" part of the filename.
Attachment Size
simplexml.php_.txt 17.05 KB
* reply
permalinkThu, 07/05/2007 - 17:00
torgosPizza
Posts: 32
Joined: 07/05/2007
Glad I could help! I had looked in the repository and didn't see it... hence, why I asked Smiling
Awesome work and I will be checking out the current revision ASAP.
* reply
permalinkThu, 07/05/2007 - 17:43
torgosPizza
Posts: 32
Joined: 07/05/2007
Hate to be a bother... but, I checked out the Ubercart system from Bzr, uploaded it to the appropriate folder on my server, and ran the update script. Everything seemed to have worked fine, until I went to the Store Admin > Configuration > Payment Settings > Quote methods pane. Here's the message I'm greeted with:
warning: implode(): Bad arguments. in /modules/ubercart/uc_quote/uc_quote.module on line 489.
This is the bit of code that line is buried in:
foreach ($shipping_types as $id => $title){
$form['uc_quote_type_weight'][$id] = array('#type' => 'weight',
'#title' => $title .' ('. implode(', ', $method_types[$id]) .')',
'#delta' => 5,
'#default_value' => $weight[$id],
);
}
Any ideas? I tried disabling and enabling different combos of modules, to no avail.
* reply
permalinkFri, 07/06/2007 - 07:29
Lyle
Posts: 560
Joined: 09/26/2006
AdministratoreLiTe!
There was a mismatch in the shipping methods you had enabled and the shipping types they provided. I don't think there's any configuration you could have come up with because the problem was with the default shipping type. It's not keyed to any shipping method, so that implode() call died.
I've added in some array checks to the repo to keep that from happening any more.
* reply
permalinkFri, 07/06/2007 - 16:38
torgosPizza
Posts: 32
Joined: 07/05/2007
Awesome, thanks. Just FYI, the errors are still being generated (and reported through Watchdog) but not displaying onscreen. Which is okay.
But also the USPS module is not retrieving quotes. I've tried everything and still no luck. The only error it throws is "Error retrieving quote" (helpful, I know). It also looks like the USPS module isn't on the Livetest site, so I'm wondering if you guys have gotten a chance to test it?
We have a web tools API ID from USPS for our current cart, so I know we are allowed access.
Another thing that may be related is that, when I drop-down the "Product Shipping location" fields (in the frontend during checkout), the address is only partially imported. I'm not sure if that might have anything to do with the rates not being calculated or not. Our default location is entered elsewhere in the config.
* reply
permalinkMon, 07/09/2007 - 08:45
Lyle
Posts: 560
Joined: 09/26/2006
AdministratoreLiTe!
You still have to email USPS to get access to their production server. The test server that you have access to only responds correctly to certain specific test data (that I haven't found anywhere). When I told them about that, they let me on to the production server, no questions asked.
I feel like I've said this before, but maybe I just never submitted the comment or something. Sure can't find any evidence for it now.
* reply
permalinkMon, 07/09/2007 - 12:05
torgosPizza
Posts: 32
Joined: 07/05/2007
Sorry if I'm being confusing..
In our current cart, we already have access to the USPS production server, and have been using it since January. We also had to update the cart software (courtesy of a large chunk of change given to the engineers) to update the XML, so that the new V3 rating system didn't break our cart.
I guess my question is, since we're putting this new cart system on a new dedicated server, I wonder if we have to go through testing the XML again? I'll give it a shot and let you know the outcome.
Thanks again for your help.
* reply
permalinkMon, 07/09/2007 - 12:32
Lyle
Posts: 560
Joined: 09/26/2006
AdministratoreLiTe!
Oh, OK. I wonder if it has to do with the fact that you're using your ID from a different server. They may not be as serious as this sounds, but I read that if you don't let them know that you'll be using it on different machines, they could just lock you out for not complying with their license agreement.
It's probably not that though. Any user with the 'configure quotes' permission should see the XML returned when they get a quote. Are you getting anything back?
* reply
permalinkMon, 07/09/2007 - 17:20
torgosPizza
Posts: 32
Joined: 07/05/2007
I only get a response if I leave out the ZIP code - and it's an error, stating that there is no zip code. so it does look like the communication itself works; but whether it's an issue with XML formatting is another possibility.
UPDATE: Looks like it is because of the new setup; even though the new system is on a "beta." subdomain of our site, it still treats it as a new setup. I'm going to re-register and then see if that helps it.
Thanks for the insight Smiling
* reply
permalinkMon, 07/09/2007 - 17:53
torgosPizza
Posts: 32
Joined: 07/05/2007
Well, after contacting USPS to confirm, and then signing up for a new WebTools ID, I tested again, and lo and behold - I got a response! Unfortunately, not the response I'd hoped to see... Here it is.
80040b1a
API Authorization failure. RateV3 is not a valid API name for this protocol.
UspsCom::DoAuth
RateV3 of course a reference to the new API / rates system they implemented in mid-May. Any suggestions? Everything seems to be configured correctly on my end (which is why I'm getting the XML response in the first place)...
* reply
permalinkMon, 07/09/2007 - 18:15
mintidea
Posts: 7
Joined: 07/09/2007
Bug Finder
This comment has been moved here.
* reply
permalinkTue, 07/10/2007 - 11:27
torgosPizza
Posts: 32
Joined: 07/05/2007
Thinking the problem had something to do with the Testing server, I talked to USPS and had them switch me over to production. Now, when attempting to retrieve quotes, these errors appear in the Logs:
# warning: xml_parse(): Unable to call handler _characterData() in /modules/ubercart/uc_store/includes/simplexml.php on line 244.
# warning: xml_parse(): Unable to call handler _endElement() in /modules/ubercart/uc_store/includes/simplexml.php on line 244.
# warning: xml_parse(): Unable to call handler _startElement() in
/modules/ubercart/uc_store/includes/simplexml.php on line 244.
Any ideas?
* reply
permalinkTue, 07/10/2007 - 13:05
Lyle
Posts: 560
Joined: 09/26/2006
AdministratoreLiTe!
No. I don't know why it would suddenly stop working like that. It's really weird that some of the functions in that class would not be there, but the function that calls them is. Only thing I can think of is to actually check that file for those functions. I'd be really surprised if they're not there, but that's what the error message means.
* reply
permalinkTue, 07/10/2007 - 18:50
Guest (not verified)
Isn't simplexml only on php5? Maybe that's the problem
* reply
permalinkWed, 07/11/2007 - 07:22
Lyle
Posts: 560
Joined: 09/26/2006
AdministratoreLiTe!
It would be, but the guys at Joomla! ported it over to PHP4. I'm using that, with a couple of modifications so that it'll work in Drupal and not Joomla.
* reply
permalinkWed, 07/11/2007 - 21:27
torgosPizza
Posts: 32
Joined: 07/05/2007
Reinstalled everything, nothing but Drupal and Ubercart (as well as the required modules like Token, uBrowser, TAPIr, etc.).
I had upgraded everything from PHP and MySQL 4 to versions 5 for both, and after doing so, the Token Module combined with Ubercart caused certain areas of the admin to just throw a blank screen. I'm not sure if it has something to do with one of our server's installations- that's a bug I'll be looking at again in the near future.
So, downgraded the PHP and MySQl back to versions 4, created a product that weighs half a pound, tried getting a shipping quote for cross-country (our HQ is in California) and the "receiving quotes" bar just sits there.
The only API we can use at the moment is USPS - they're the ones we've gone along with this whole time, with our other system, and for other reasons I can't specify they are our carrier of choice.
If anyone here's willing to help I'll PM you the credentials and you can take a look... so far I'm stumped. I haven't modified anything, and I've configured everything that needs to be setup (unless I'm missing something really obscure) and the USPS module just doesn't seem to work.
* reply
permalinkThu, 07/12/2007 - 18:58
torgosPizza
Posts: 32
Joined: 07/05/2007
Ok guys, well I got the XML "working" but am now receiving different types of errors. Here's the latest:
<?xml version="1.0"?>
-2147219095
Rate_Respond.:clsRateV3UnpackRate;SOLServerRates.RateV3_Respond
Missing value for PackageNormalOrOversize.
1000440
What's interesting is that when I change the options for the particular product, it doesn't stick. For instance the default for USPS is "Variable" but if I select "Rectangular" and submit the changes, and go back to the product, it is still "Variable."
FYI since we are using USPS now, after signing up for their API they sent a sample XML file. Could there be a discrepancy between the XML UberCart is sending, vs. what USPS is looking for? If you need their sample XML let me know and I can post it.
* reply
permalinkFri, 07/13/2007 - 07:10
Lyle
Posts: 560
Joined: 09/26/2006
AdministratoreLiTe!
I don't think I got a sample XML file from them, so please post it. They're documentation is fairly useless to someone not familiar with their system to begin with, so I'll take whatever help I can get.
* reply
permalinkFri, 07/13/2007 - 12:33
torgosPizza
Posts: 32
Joined: 07/05/2007
Hey Lyle,
Here's their sample code from the USPS iCustomer Care. They are usually pretty easygoing over the phone too, so if you need anything else from them, let me know and I'll be happy to call and ask.
What's weird though, is they don't support integration. They might support you, since you're the 3PD. In any event, keep up the great work.
Erik
FIRST CLASS
LETTER
44106
90210
0
0.75
REGULAR
false
PRIORITY
44106
20770
5
8
NONRECTANGULAR
LARGE
15
30
15
55
ALL
90210
20770
8
32
RECTANGULAR
LARGE
15
30
15
true
* reply
permalinkTue, 07/24/2007 - 12:09
healersource
Posts: 3
Joined: 07/24/2007
So Im trying to get this up and running and Ive run into some speedbumps along the way. First few I managed to get over but now Im stuck
First of all I got confused about the Webtools ID / pass and the production server. I would recommend putting a little note on the admin page with a link to the USPS Webtools page and clearer instructions on what to do. Id also eliminate the password field since thats doesnt do anything and also eliminate the Testing server in the dropdown list since nobody seems to use that anyways.
Second I had a problem with the shipping weight. Id listed my weight in ounces and it was giving me an error saying "Missing argument for Pounds". Fixed this by adding pounds =0 on line 189 in uc_usps.module
case 'oz':
$package->pounds = 0;
$package->ounces = $weight;
That brings me to my current (third) problem: Im getting the following error message
Fatal error: Call to a member function on a non-object in /home/content/s/p/e/spenceraltman
/html/shop/modules/ubercart/uc_usps/uc_usps.module on line 319
So that would be line 318 if you dont have the pounds fix listed above:
318: if ($transresp->document->name() == 'Error'){
Not sure why this is happening but it appears $transresp->document is null. I tried changing it to:
318: if ($transresp->document && $transresp->document->name() == 'Error'){
and now it works but... I get the following XML displayed after my radio options for shipping.
<?xml version="1.0"?>
104
112
2
Any ideas?
--
HealerSource Apparel ~ Clothe Your Soul
* reply
permalinkTue, 07/24/2007 - 12:15
healersource
Posts: 3
Joined: 07/24/2007
One more thing.. Any idea how hard it would be to get this working for international shipping?
--
HealerSource Apparel ~ Clothe Your Soul
* reply
permalinkTue, 07/24/2007 - 14:13
Lyle
Posts: 560
Joined: 09/26/2006
AdministratoreLiTe!
Getting a quote for international shipping doesn't seem too bad. I keep having to check myself because I always think about the ridiculous complexity of actually shipping something overseas, and then I have a knee-jerk reaction of not wanting to do it. Eye-wink
But I found the documentation for International rates, and it looks similar to domestic. Just a matter of writing it up and figuring out if the customer is in the U.S. or not.
I've added a setting to turn the debug information on or off like I said I should in http://www.ubercart.org/forum/support/1545/strange_usps_shipping_quote_l....
I've also added the check for $transresp->document like you suggested. I think some of the services weren't responding with the transit time and causing the process to stop like it did.
* reply


Joined: 08/07/2007