Jump to content
Sign in to follow this  
wheeloftime

Estimated Shipping Costs

Recommended Posts

The weirdest thing is happening when I use this contrib. (on top of not working with ANY UPS or USPS shipping module)

 

I am using STS and it's working quite well so far.  When I installed this contrib and tested it with a flat rate shipping method (which seems to be the only way to make it work), it showed the box just fine.  However, It is removing my footer text (not the included footer.php stuff from osCommerce.  Since I'm using STS I have my own footer text at the bottom of the page) and placeing it within the shipping estimator window. It's kind of funny, I have no idea how this is happening.

 

I suggest in  your documentation you state that this does not work with any other module except flat rate shipping, etc.

 

Your footer problem is most likely happening because you placed the include for the estimated shipping box on the wrong place. It can be tricky to find a place in between your other table tags where it will show fine.

 

As for the supported shipping modules; I don't know them all and I can't test them all but in general it should work with those which are country based (zones, table, flat and more). Some special ones like UPS, USPS and probably some more like those modules might or might not work and you can only find out by trying as you did. If I find time I might add UPS to my test shop to see where it goes wrong and if it's possible to have them cooperate together otherwise I am afraid it is not something useable for shops using those. You might take a look at ship in cart which I believe is more written for use with countries and zones/zip codes.

Share this post


Link to post
Share on other sites
Your footer problem is most likely happening because you placed the include for the estimated shipping box on the wrong place. It can be tricky to find a place in between your other table tags where it will show fine.

 

As for the supported shipping modules; I don't know them all and I can't test them all but in general it should work with those which are country based (zones, table, flat and more). Some special ones like UPS, USPS and probably some more like those modules might or might not work and you can only find out by trying as you did. If I find time I might add UPS to my test shop to see where it goes wrong and if it's possible to have them cooperate together otherwise I am afraid it is not something useable for shops using those. You might take a look at ship in cart which I believe is more written for use with countries and zones/zip codes.

 

 

Yeah, I was hopeing to use yours as an alternative, however I have gotten ship in cart work....Thanks again for your contribution though. I only wish I had the knowledge to do my own

Share this post


Link to post
Share on other sites

hi:

 

I just though i d let you know about this.

I installed your contrib and its great, thanks for the hard work,

however when i changed the default country to any other country the shopping cart got lost (because the session was lost, i can see it in the address bar),

this was fixed by adding the following

. tep_hide_session_id()

 

to this line in includes/modules/estimated_shipping.php

  $info_box_contents[] = array('form' => tep_draw_form('estimated_shipping', tep_href_link(basename($PHP_SELF), '',$request_type, false), 'post'). tep_hide_session_id()

 

Cheers

 

 

j.

Share this post


Link to post
Share on other sites
hi:

 

I just though i d let you know about this.

I installed your contrib and its great, thanks for the hard work,

however when i changed the default country to any other country the shopping cart got lost (because the session was lost, i can see it in the address bar),

this was fixed by adding the following

. tep_hide_session_id()

 

to this line in includes/modules/estimated_shipping.php

 ?$info_box_contents[] = array('form' => tep_draw_form('estimated_shipping', tep_href_link(basename($PHP_SELF), '',$request_type, false), 'post'). tep_hide_session_id()

 

Cheers

j.

 

Hi there Jodie,

 

Thanks for the feedback but it must be something else with your shop as this does not occur when I check/checked this ! Maybe you have different settings which could cause this or, and you should look for it, you have session id's behind your URL which mostly means the cookie path/domain is not set correctly in the configure.php.

 

Cheers,

Howard

Share this post


Link to post
Share on other sites

I'm having the same error: Fatal error: Cannot instantiate non-existent class: httpclient in /home/ckbproducts/www/includes/modules/shipping/ups.php on line 247 and would love to hear how this works out. My client gets daily requests for exactly what this contribution does - if it would only work :(

 

As for the supported shipping modules; I don't know them all and I can't test them all but in general it should work with those which are country based (zones, table, flat and more). Some special ones like UPS, USPS and probably some more like those modules might or might not work and you can only find out by trying as you did. If I find time I might add UPS to my test shop to see where it goes wrong and if it's possible to have them cooperate together otherwise I am afraid it is not something useable for shops using those. You might take a look at ship in cart which I believe is more written for use with countries and zones/zip codes.

Share this post


Link to post
Share on other sites
I'm having the same error: Fatal error: Cannot instantiate non-existent class: httpclient in /home/ckbproducts/www/includes/modules/shipping/ups.php on line 247 and would love to hear how this works out.  My client gets daily requests for exactly what this contribution does - if it would only work :(

 

Didn't have time to look at it yet (had to finish an update for my other contribution first) but I just took a quick peek and you can get rid of the error by adding

  require('includes/classes/http_client.php');

to catalog/includes/functions/estimated_shipping_functions.php where you have to add it just before

require(DIR_WS_CLASSES . 'estimated_shipping_class.php');

 

In my shop it then shows:

 

United Parcel Service United Parcel Service 

An error occured with the UPS shipping calculations.

error

If you prefer to use UPS as your shipping method, please contact the store owner.

but that could be due to the fact I have not setup UPS properly (don't know if you need an account with them and/or if you have to be a US resident).

 

Hope this helps a little bit. I would appreciate if you could give some feedback after you made this change and how it behaves in your shop (with a good UPS setup I assume).

 

Howard

Share this post


Link to post
Share on other sites

Wow! Thanks for the quick reply. My results were similar to yours - and I do have a valid account. Here's the display for my shop, which uses both UPS and USPS modules:

 

Shipping method(s) for United States 
United Parcel Service
An error occured with the UPS shipping calculations.
The requested service is unavailable to residential destinations.
If you prefer to use UPS as your shipping method, please contact the store owner. 
United States Postal Service
An error occured with the USPS shipping calculations.
If you prefer to use USPS as your shipping method, please contact the store owner.

 

I have the contribution showing in the right column only.

Share this post


Link to post
Share on other sites
Wow!  Thanks for the quick reply.  My results were similar to yours - and I do have a valid account.  Here's the display for my shop, which uses both UPS and USPS modules:

 

Shipping method(s) for United States 
United Parcel Service
An error occured with the UPS shipping calculations.
The requested service is unavailable to residential destinations.
If you prefer to use UPS as your shipping method, please contact the store owner. 
United States Postal Service
An error occured with the USPS shipping calculations.
If you prefer to use USPS as your shipping method, please contact the store owner.

 

I have the contribution showing in the  right column only.

 

I don't know how the UPS/USPS module work so I'll have to look further into this but I suspect they want more information as the country only (which is the only base for the Estimated Shipping Contribution).

I am afraid this just means it won't work with modules like UPS/USPS as it is designed now.

Share this post


Link to post
Share on other sites

I was afraid this was the case. Thanks for your help, and if anyone else has found or can create a UPS/USP shipping calculator to work with OSC I'd love to hear from them!

Share this post


Link to post
Share on other sites
I was afraid this was the case.  Thanks for your help, and if anyone else has found or can create a UPS/USP shipping calculator to work with OSC I'd love to hear from them!

 

There is a contribution called Ship in Cart if I am correct. This works inside the shopping cart page and might handle UPS/USPS.

Share this post


Link to post
Share on other sites
There is a contribution called Ship in Cart if I am correct. This works inside the shopping cart page and might handle UPS/USPS.

 

Just wanted to chime in and say that yes, ship in cart does work with usps and ups. I'm using it on my website, and you can check it out here for a demo.

 

wheeloftime's contrib is great, but if you need to use ups/usps I'd suggest the ship in cart, as this contrib really isn't made with that in mind.

Share this post


Link to post
Share on other sites
Just wanted to chime in and say that yes, ship in cart does work with usps and ups.  I'm using it on my website, and you can check it out here for a demo.

 

wheeloftime's contrib is great, but if you need to use ups/usps I'd suggest the ship in cart, as this contrib really isn't made with that in mind.

 

AverageJoe, you are correct. I developed this contrib with the idea to show the shipping quotes in an early stage to all customers, logged in/registered or not, based upon how the postal office in our region works which is country based shipping prices. I am not familiar with UPS/USPS but when investigating the error I saw those modules get a quote from the UPS/USPS website itself. I have uploaded a quick bugfix for preventing the error breaking the shop so that is fine now. I have worked on it a bit more and you now will get shipping quotes from UPS when you are a US based shop but only when the quote is for a non-US address. I can't test USPS as they seem to want a subcription or something which I assume is only for those with a US based address ?!

I believe the caveat for UPS to work completely with estimated shipping is the zipcode which is a must for getting shipping quotes to US based customers. I'll see if I can tie that in too so it will work for UPS. Assuming USPS wants the same information (country AND zipcode) I hope it will then work for them also.

Share this post


Link to post
Share on other sites
I believe the caveat for UPS to work completely with estimated shipping is the zipcode which is a must for getting shipping quotes to US based customers. I'll see if I can tie that in too so it will work for UPS. Assuming USPS wants the same information (country AND zipcode) I hope it will then work for them also.

 

That's exactly what both the ups and usps module need: zipcode and country. Once both are passed there shouldn't be any problems.

Share this post


Link to post
Share on other sites
That's exactly what both the ups and usps module need: zipcode and country.  Once both are passed there shouldn't be any problems.

 

I hope you don't mind me asking some specifics as UPS/USPS are unfamiliar for me and hard to test correctly. I integrated a zipcode field and as that seems to work fine with the UPS module I still get an error returned by USPS. I saw I can use a test server where I wouldn't need an account but I am not sure if that assumption is true ? If not I can not test and would have to ask someone else to do it for me (maybe you :-) ).

 

Thanks,

Howard

Share this post


Link to post
Share on other sites

You need to register to use both the test server and the production server. There have been numerous problems with their test server, so I usually recommend switching over to the production server from the get go.

Share this post


Link to post
Share on other sites

Update available to Estimated Shipping Costs v1.4 together with a new Estimated Shipping Costs v1.4 with UPS/USPS support version[/b]

 

Both are uploaded to the same contribution thread. The version with UPS/USPS support adds a zipcode field which should make it workable for those who use a shipping provider where this extra information is mandatory to get shipping quotes (ie. a US based shop shipping to a US based address but not neccessarily for a US based shop shipping to a non-US address).

 

regards,

Howard

Share this post


Link to post
Share on other sites

I seem to have noticed a small problem with using this contribution and the Ulimate SEO URL's contribution.

 

In the estimaged_shipping.php, we have this submit/return URL function:

 

$info_box_contents[] = array('form' => tep_draw_form('estimated_shipping', tep_href_link(basename($PHP_SELF), '',$request_type, false), 'post'),

 

This seems to return the browser to .../product_info.php when using the other contribution. The estimated shipping prices come up fine; but then the customer is thrown to an error message about "product not found" since the function isn't calling the correct pid to append to the product_info.php.

 

So, as a test, I tried adding this line to the beginning of the estimated_shipping.php:

 

$url = $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'];

 

The replacing all references to $PHP_SELF to $url.

 

However, that's still not working. The $url definitely calls the correct URL, but I think there is a resolution problem with SEO URLs or something along those lines, I'm not entirely sure..

 

 

So as a temporary fix, I just changed the post URL to shopping_cart.php, so at least customers go to thier cart instead of an error. Anyone have any other ideas how we could get around this?


"People tell me I have an inferiority complex. They must be right; after all, they are all smarter than me."

Share this post


Link to post
Share on other sites

Is there a way to NOT have the estimates show up if the customer is not registerd and they haven't put their zipcode in yet?

 

I get the following error message when first putting items in my cart.

 

UPS
111210: The requested service is unavailable between the selected locations.
If you prefer to use ups as your shipping method, please contact UKGoods via Email.

United States Postal Service
An error occured with the USPS shipping calculations.
If you prefer to use USPS as your shipping method, please contact the store owner.

 

It should not try to contact UPS or USPS unless there is a zipcode there.

 

Thanks,

 

Donna Gordon

UKGoods.com

 

PS Love the contribution!!!

Share this post


Link to post
Share on other sites
I seem to have noticed a small problem with using this contribution and the Ulimate SEO URL's contribution.

 

In the estimaged_shipping.php, we have this submit/return URL function:

 

$info_box_contents[] = array('form' => tep_draw_form('estimated_shipping', tep_href_link(basename($PHP_SELF), '',$request_type, false), 'post'),

 

This seems to return the browser to .../product_info.php when using the other contribution.  The estimated shipping prices come up fine; but then the customer is thrown to an error message about "product not found" since the function isn't calling the correct pid to append to the product_info.php.

 

So, as a test, I tried adding this line to the beginning of the estimated_shipping.php:

 

$url = $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'];

 

The replacing all references to $PHP_SELF to $url.

 

However, that's still not working.  The $url definitely calls the correct URL, but I think there is a resolution problem with SEO URLs or something along those lines, I'm not entirely sure..

So as a temporary fix, I just changed the post URL to shopping_cart.php, so at least customers go to thier cart instead of an error.  Anyone have any other ideas how we could get around this?

 

Tom,

 

I am afraid I don't have an answer to this. I don't use the Ultimate SEO contrib and I don't know how this affects the url. Basically this function just refreshes the screen from where you are to be able to recalculate the shipping costs and show them.

 

regards,

Howard

Share this post


Link to post
Share on other sites
Is there a way to NOT have the estimates show up if the customer is not registerd and they haven't put their zipcode in yet?

 

I get the following error message when first putting items in my cart. 

 

UPS
111210: The requested service is unavailable between the selected locations.
If you prefer to use ups as your shipping method, please contact UKGoods via Email.

United States Postal Service
An error occured with the USPS shipping calculations.
If you prefer to use USPS as your shipping method, please contact the store owner.

 

It should not try to contact UPS or USPS unless there is a zipcode there.

 

Thanks,

 

Donna Gordon

UKGoods.com

 

PS  Love the contribution!!!

 

Donna,

 

The main idea for the contrib was to provide an oversight for the shipping costs regardless if a customer is registered or not. For those shipping providers, like UPS/USPS, where the zipcode field is mandatory there will be an error returned when the zipcode is not filled in and the customer is not logged in and/or not registered. I can hard code a check for UPS/USPS and an empty zipcode field with the caveat that any other shipping module which works similar to those two will not be covered. Instead of surpressing the rather meaningless output from UPS/USPS I could return a more meaningful home made error message saying the zipcode is mandatory or something like that.

As you are the first to come up with this and I don't use the UPS/USPS flavor of my contrib myself I leave it up to you what you prefer: supress the output from UPS/USPS completely when the zipcode field is empty or return a home made error when that applies ?

 

regards,

Howard

Share this post


Link to post
Share on other sites
Donna,

 

The main idea for the contrib was to provide an oversight for the shipping costs regardless if a customer is registered or not. For those shipping providers, like UPS/USPS, where the zipcode field is mandatory there will be an error returned when the zipcode is not filled in and the customer is not logged in and/or not registered. I can hard code a check for UPS/USPS and an empty zipcode field with the caveat that any other shipping module which works similar to those two will not be covered. Instead of surpressing the rather meaningless output from UPS/USPS I could return a more meaningful home made error message saying the zipcode is mandatory or something like that.

As you are the first to come up with this and I don't use the UPS/USPS flavor of my contrib myself I leave it up to you what you prefer: supress the output from UPS/USPS completely when the zipcode field is empty or return a home made error when that applies ?

 

regards,

Howard

 

Supressing the error message if the zipcode is empty makes the most sense.

 

Also, just so you know, I got UPS to work by removing the word "dummy" from the Delivery City field. I also remove the word "dummy" from the company field as 99% of my customers deliver to a residential address. I just left the two quotes in these fields.

 

This is something I have been looking for forever. I have a large amount of customers who don't want to go through creating the account process until they know how much shipping is. I can tell by watching who's online that they come to the site, put items in their shopping cart and then go to the shipping explanation page. After that they leave the site. This contribution solves that problem :)

 

Thanks again,

 

Donna

Share this post


Link to post
Share on other sites
Supressing the error message if the zipcode is empty makes the most sense. 

 

Also, just so you know, I got UPS to work by removing the word "dummy" from the Delivery City field.  I also remove the word "dummy" from the company field as 99% of my customers deliver to a residential address.  I just left the two quotes in these fields. 

 

 

UPS must be working differently for the UK then as I had no problems when simulating a US based shop ?! If it makes no difference anywayI'll just remove those two 'dummy' entries also so you don't have to change them again on an update.

 

I'll make an update the way you suggest; surpress UPS/USPS output altogether when the zipcode field is left empty. Be aware that your customers might think you don't offer them and could never think of filling in the zipcode field !

 

This is something I have been looking for forever. I have a large amount of customers who don't want to go through creating the account process until they know how much shipping is.

Well, that's the main reason I wanted to have this built. I know that if I were a customer I never would sign up just to be able to see the shipping costs.

 

I can't promise I'll have an update ready today or tomorrow but I'll try to have this fixed before the weekend.

 

Howard

Share this post


Link to post
Share on other sites

United States Postal Service

An error occured with the USPS shipping calculations.

If you prefer to use USPS as your shipping method, please contact the store owner.[/code]

 

I just install osCommerse and enabled the UPS shipping.

I get this error message:

An error occured with the UPS shipping calculations.

Invalid ShipperPostalCode

If you prefer to use UPS as your shipping method, please contact the store owner.

 

My input address is this:

1923 Donald St

Goshen, IN 46526

United States

 

Does anyone have a solution to this?

Share this post


Link to post
Share on other sites
United States Postal Service

An error occured with the USPS shipping calculations.

If you prefer to use USPS as your shipping method, please contact the store owner.[/code]

 

I just install osCommerse and enabled the UPS shipping.

I get this error message:

An error occured with the UPS shipping calculations.

Invalid ShipperPostalCode

If you prefer to use UPS as your shipping method, please contact the store owner.

 

My input address is this:

1923 Donald St

Goshen, IN 46526

United States

 

Does anyone have a solution to this?

Make sure you have your shop's zipcode defined in your admin->configuration->shipping/packaging->Postal Code (only the 46526)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×