Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

USPSMethods


BradWaite

Recommended Posts

ok....i realized i was using version 1. but I am getting this error with 1.1

 

Parse error: parse error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /home/public_html/catalog/includes/modules/shipping/usps.php on line 89

 

Actually i am not sure what to do with this step

 

Add the following line to the install() function in catalog/includes/modules/shipping/usps.php:

 

tep_db_query("insert into " . TABLE_CONFIGURATION . " ( configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Shipping Methods', 'MODULE_SHIPPING_USPS_TYPES', 'Express, Priority, First Class, Parcel', 'Select the USPS services to be offered.', '6', '14', 'tep_cfg_select_multioption(array('Express', 'Priority', 'First Class', 'Parcel'), ', now())");

 

I already have this portion of the code installed.

 

thank you again for ur help

Link to comment
Share on other sites

  • Replies 77
  • Created
  • Last Reply

Top Posters In This Topic

i redid it but still no luck . I didnt add the step 7 to usps.php though because I see that already present in CVS 2.2.

 

Unless they rolled my contrib into the CVS, which I seriously doubt, step 7 is still required. It looks very similar to the existing lines, but it's different.

 

By the way, where is the install function in usps.php

 

In mine, it starts on line 96 with, "function install() {"

 

Brad

Link to comment
Share on other sites

:oops: I hope I didn't miss this.

 

Anyway, a customer out of NY (I'm based in CA) was given a $6.50 parcel post rate and a $3.85 priority mail rate. These appear to be prices based on an oversized package as I was quoted somewhat less when I went through the USPS.com site.

 

Is there a way to include package dimensions as well as weight? Thanks.

 

My store is located at http://100monkeys.org/monkeystore/ if that helps.

 

By the way, awesome contribution.

Adam

--------------------------------

got monkey? We do.

http://www.monkeygoods.com

Link to comment
Share on other sites

Is there a way to include package dimensions as well as weight?

It is said that where there's a will, there's a way, but ...

 

Although the USPS rate quote API can accept package dimensions, obtaining and furnishing that information is a monumental task if orders can include multiple products. Let's say you added length, width and height dimensions as fields in the product description. Then, for an order with several products, the module has to calculate the dimensions of the products packed together -- to do so, it would have to make physical assumptions about how things are stacked and packed. I wouldn't try to implement this capability unless all orders were limited to single products.

Link to comment
Share on other sites

Ah... very good answer.

 

Is there a way I could send the usps api demensions just under the oversized rate all the time? Most of my products are pretty small and it would take a rather large order to go above this mark.

 

Thank you. :D

Adam

--------------------------------

got monkey? We do.

http://www.monkeygoods.com

Link to comment
Share on other sites

For those of you watching this thread, I just wanted to let you know I've posted USPSMethods_v2.0. There's another post with the full details here in Contributions, but one big thing it introduces is properly-working international quotes.

 

Brad Waite

Link to comment
Share on other sites

  • 3 months later...

I don't know what I might have done (this contribution was working before...maybe I messed it up putting other contributions in at different locations), but now if I enable USPS, I get a page FULL of the following errors at checkout_shipping.php:

 

Warning: feof(): supplied resource is not a valid stream resource in ~edited~/store/includes/classes/http_client.php on line 385

 

Warning: fgets(): supplied resource is not a valid stream resource in ~edited~/store/includes/classes/http_client.php on line 386

Link to comment
Share on other sites

Daniel: similar error message have been reported by two other users of USPS Methods 2.4, but only when the transit time option has been selected.

 

Until the problem has been isolated and resolved, we suggest that you disable the transit time option.

Link to comment
Share on other sites

  • 3 months later...

And you have any idea how to install insurance rates for this thing?

 

I used to use the insurance mod but tossed it because I wanted to offer certain postage. This was easier to do than modifying the files.

 

There's a mod out there that would be nice to add to yours. Unfortunately the person does not offer manual install.

Link to comment
Share on other sites

If the insurance charge is a fixed amount per order, you could just use the handling charge capability added to the shipping modules in MS1.

 

You could change the phrase "Handling Fee" to "Insurance Charge" where it occurs in the shipping modules themselves, so it is labeled correctly.

Link to comment
Share on other sites

  • 2 weeks later...

When I go the the USPS shipping module admin I do not have these features:

 

" Enter a number to determine the order in which this shipping method is

displayed relative to other shipping methods.

 

Check the boxes for displaying weight and transit time if desired.

 

Select the domestic (US) and international shipping methods to be offered."

 

I installed 2.4 as per the instructions. The file includes/modules/shipping/usps.php did not exist in my store before. I uploaded the file anyway.

 

I receive no error messages.

 

What should I try to get the shipping methods to show up?

Link to comment
Share on other sites

I just kept uploading the file to different logical locations until something worked.

 

Instead of includes/modules/shipping/usps.php the feature worked in with the file uploaded to: includes/languages/english/usps.php

 

The file: includes/languages/english/modules/shipping/usps.php was present and was replaced as instructed.

 

By the way this is on ETWeb Hosting . com. They already have the OSCommerce package configured for their servers so they may have moved the files around a bit.

Link to comment
Share on other sites

Hi,

Does anyone know where the Sender's zip code is stored? I hadn't specified it in Admin, and was getting an error. But after I added the zip code the error is the same! Is it caching somewhere?

 

Can someone at least tell me how to view the transmit log to see what I'm sending?

 

Thanks.

Link to comment
Share on other sites

Thanks to this thread, I have gotten the USPS module to work, sort of,

with 2.2MS2. I am now having a problem with how it seems to be calculating the weight. 3lbs seems to be getting added to the weight of my products.

 

When I set the product weight to 0.20, the shipping weight is 3.2lbs.

 

When I set the product weight to 1.0, the shipping weight is 4lbs.

 

I tried looking at the code and don't understand where this is coming from.

 

Any help would be greatly appreciated..

 

Thanks.

-MichaelC

Link to comment
Share on other sites

Thanks to this thread, I have gotten the USPS module to work, sort of,

with 2.2MS2. I am now having a problem with how it seems to be calculating the weight. 3lbs seems to be getting added to the weight of my products.

 

When I set the product weight to 0.20, the shipping weight is 3.2lbs.

 

When I set the product weight to 1.0, the shipping weight is 4lbs.

 

I tried looking at the code and don't understand where this is coming from.

 

Any help would be greatly appreciated..

 

Thanks.

 

I found the answer in a thread under general titled: weights less than 1 lb?

 

This is setup using the admin in Configuration->Shipping and Packaging. The default "tara weight" is set to 3 which explains why everything had 3lbs added to it.

 

I still need to tweak this to figure it out what will work best for me.

-MichaelC

Link to comment
Share on other sites

Hi all,

 

I recently installed the USPS shipping method contribution...

 

International orders go through without a hitch but I get this error when I try to checkout as a US customer...

 

Warning: feof(): supplied resource is not a valid stream resource in /home/ikeba/public_html/shopping/includes/classes/http_client.php on line 385

 

Warning: fgets(): supplied resource is not a valid stream resource in /home/ikeba/public_html/shopping/includes/classes/http_client.php on line 386

 

Warning: feof(): supplied resource is not a valid stream resource in /home/ikeba/public_html/shopping/includes/classes/http_client.php on line 385

 

Warning: fgets(): supplied resource is not a valid stream resource in /home/ikeba/public_html/shopping/includes/classes/http_client.php on line 386

 

Warning: feof(): supplied resource is not a valid stream resource in /home/ikeba/public_html/shopping/includes/classes/http_client.php on line 385

 

This goes on in an infinite loop down the page. Like I said, international orders are ok. I only have problems with domestic orders. Could this be a bug with USPS Shipping Method? Can someone help me with this?

Thanks alot!

 

Here is my website http://ikebagifts.com/shopping

You might have to create an account to test checkout ...

Link to comment
Share on other sites

Greetings All!

 

Just stumbled onto this mod / thread this morning and I'm curious.

 

I have a customer who'd like to ship w/USPS, so I'm thinking about installing this for him.

 

But I wonder... what do you guys do? Do you fill out the USPS' online form on behalf of the customer and call the 800 number on their behalf? Or do you let your end users/customers do this?

 

Would there be any harm in my representing the customer in this manner? Or does USPS insist that they're talking to the actual business owner?

 

My gut feeling is there'd be no harm in me saying I'm the web developer for such-and-such a business... and just forwarding any username/password info on to the business owner / my customer for his own records.

 

 

Thanks !

 

-= Dave =-

Link to comment
Share on other sites

Minnette;

 

If you have the Options "Display Weight" and "Display Transit Time" enabled, try unselecting them and see what happens. You may have to disable and re-enable the module.

 

DR4296;

 

I suspect that there are frequently developers doing exactly that for clients. As long as you don't misrepresent who you are, you shouldn't have any problem with USPS.

... if you want to REALLY see something that doesn't set up right out of the box without some tweaking,

try being a Foster Parent!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...