Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

USPS Rate V4, Intl Rate V2 (official support thread)


Guest

Recommended Posts

I have added this module for osCommerce 2.3.1 but when I click on Edit under Admin, Modules/Shipping I receive the following error;

 

Fatal error: Call to undefined function tep_cfg_usps_services() in /home/a8665442/public_html/adminpower/modules.php(232) : eval()'d code on line 1

 

The only reference I can find to the function tep_cfg_usps_services() is in;

catalog\includes\modules\shipping\usps.php on line 325-ish.....

Link to comment
Share on other sites

I have added this module for osCommerce 2.3.1 but when I click on Edit under Admin, Modules/Shipping I receive the following error;

 

 

 

The only reference I can find to the function tep_cfg_usps_services() is in;

catalog\includes\modules\shipping\usps.php on line 325-ish.....

 

Go back to the contribution and go to history. Download one of the earlier versions (I can't remember exactly which one it is) until you find one with the file readme.txt that has the STEP-BY-STEP FILE MODS in it. Follow those file mods to the letter and your error will go away and the contribution will work. I had the same problem until someone started asking me questions and said something about "Step 2". Once I found the step by step everything came together and worked fine. If you have problems finding it, PM me and I'll attach it to a PM message.

Link to comment
Share on other sites

Dear Jenna and other users,

 

I am (attempting) to install the USPS Rate V4 Intl Rate V2 - v.1.0 module (Feb 11 date) on osCommerce 2.3.

 

I have made sure to uninstall the stock USPS default module in the admin panel.

 

I believe I made sure to make the changes to the modified files correctly.

My install is not clean - I have for shipping modules: MultiGeoZone MultiTable, Multiple Flat Rates, Canada Post Sell Online, and UPS XML.

I also have some other modules: Monthly Sales Report and Theme Switcher.

 

I am not getting error messages when I installed the modules or when I set the set the store's country and postal code to my customers's US store address (they also have stores in Canada, that is why the Canada Post module).

 

Since this is not a clean install I have been keeping track of the files that have been edited by previous modules.

admin/Modules.php had been changed by UPS XML.

admin/includes/functions/general.php by Canada Post module.

 

The issue is that I am not getting any results on the Shipping page.

I get a message that Canada Post can't be used (since the address is in US)

The Flat rate works

The MultiGeoZone MultiTable works

The UPS works.

 

USPS does not even show up on the screen. No error messages, no can't ship by USPS, just plain nothing..... sigh

 

Any suggestions?

 

PS: about the USPS User ID - I went to the USPS website and set up an account - and I created a user name and password.

From there I registered with the USPS USPS Web Tools Program and was sent a user name and password.

 

Which do I use? The user name I created when I signed in with the USPS or the Web Tools user name they gave me?

Link to comment
Share on other sites

@@acedave

 

There are two possibilities (that I know of) as to why this may be happening. First is that you don't have any options chosen in the USPS admin. The other is that that you don't have your zip code set up in admin -> configuration -> shipping/packaging. Take a look at both of those, I'm betting one of the other will fix your issue.

Link to comment
Share on other sites

Hi Jetta,

 

I have version 1.3 installed and want to update to the latest 1.7 but I don't see any update path?

 

Please advice

 

Cheers

 

Since I did not get an answer I will ask again, incase it got lost in the thread

 

Cheers

Link to comment
Share on other sites

So if I understand this correctly, there is NO function where the customer can select insurance for his order if he so pleases?

 

I'm I correct

Edited by pederb
Link to comment
Share on other sites

Go into the admin and make sure that you have some of the shipping options selected. If you don't have anything selected, nothing will be shown at check out. Also make sure that you have your zip code set in admin as well. Without your zip code set it will also not display any shipping options at checkout with out saying anything about a problem.

 

Good thoughts. I have about half selected. Zip code is 65809. It is set.

osCommerce Online Merchant v2.2 RC2a

PHP 5.3 / mySQL 5

 

screenshot1.jpg

screenshot2.jpg

screenshot3.jpg

Edited by tmckee
Link to comment
Share on other sites

@@tmckee

The only other suggestion that I have for you is to make sure you have the right version installed. I mentioned the above problems because they were problems I experience during my installation. I wish there were something else I could tell you that might fix it and if I happen to think of anything I'll be sure to mention it. I do know that the documentation on my particular version was kind of screwy. I had to go to history and go back a couple of versions in order to get the step-by-step file mods, to far and they were wrong, not far enough and they weren't there.

Link to comment
Share on other sites

Now, I have one more problem. I am getting the following error:

Fatal error: Class 'httpClient' not found in /home.................../html/includes/modules/shipping/usps.php on line 303

 

this only happens when I use PayPal Express or Standard and only when one of them are chosen. Check out can be done via Credit or Debit card with no problem. this error happens when Paypal Express is chosen (before a shipping option) or Paypal Standard (after choosing a shipping option and it doesn't matter which shipping option (ups, usps, flat rate) is chosen). Any thoughts at all would be helpful. I've checked the usps.php file and the code at line 303 and it is asking for the "httpClient" I'm just not sure what to do with it.

Link to comment
Share on other sites

I followed the instructions (including uninstalling current module first) but the shipping option doesn't show up during checkout. It it is enabled and the user id is in. Any ideas?

 

Just a thought, but when you signed up for an ID @ https://secure.shippingapis.com/registration/ did you ever contact them to switch that ID to production? If so, did you get a reply from USPS implying that your ID is ready to go live? It's inactive until you do so.

 

Now, I have one more problem. I am getting the following error:

Fatal error: Class 'httpClient' not found in /home.................../html/includes/modules/shipping/usps.php on line 303

 

this only happens when I use PayPal Express or Standard and only when one of them are chosen. Check out can be done via Credit or Debit card with no problem. this error happens when Paypal Express is chosen (before a shipping option) or Paypal Standard (after choosing a shipping option and it doesn't matter which shipping option (ups, usps, flat rate) is chosen). Any thoughts at all would be helpful. I've checked the usps.php file and the code at line 303 and it is asking for the "httpClient" I'm just not sure what to do with it.

 

I found a similar problem for those using a UPS module? I'm assuming, without testing, that the fix will work with USPS as well.

 

FIND in includes/modules/shipping/usps.php:

 

$http = new httpClient();

 

ADD BEFORE:

 

if (!class_exists('httpClient')) {
include('includes/classes/http_client.php');
}

 

Reference to UPS fix in question: http://www.oscommerce.com/forums/topic/331752-receiving-fatal-error-pp-express-only-debit-ccs-work-ok/

Link to comment
Share on other sites

Good day, everyone!

 

Working on solving a perplexing problem:

 

Not getting any error messages with USPS, rates are calculating fine, getting sent to payment methods correctly, etc.

However, when I select a USPS shipping method and attempt to pay with PayPal Express, I get dumped back to checkout.php rather than going through checkout_process.php. The payment doesn't process through PayPal, and the order doesn't end up in the database.

 

I see some code at the end of paypal_express.php that seems to indicate that it will behave like this when there is a warning:

 

if (($response_array['ACK'] != 'Success') && ($response_array['ACK'] != 'SuccessWithWarning')) {
	    tep_redirect(tep_href_link(FILENAME_SHOPPING_CART, 'error_message=' . stripslashes($response_array['L_LONGMESSAGE0']), 'SSL'));
    }

 

This code also seems to indicate that I'd see an error message of some sort, which I'm absolutely not getting, either in the URL or displayed on the page.

 

I can verify that this is only an issue between the USPS module and Paypal Express, as the payment processes just fine when I select 'FREE Shipping' or use Authorize.net.

Link to comment
Share on other sites

Need help please. I had to dump my site because having problems with mindspax not working with php5. So I'm reinstalling my addons. I have down loaded your latest version, and so in your notes the new usps.php in message # 149 and used it to set up my modules shipping. i went to add the usps mod over and it looked ok until i hit edit, then i received the following error: Fatal error: Call to undefined function tep_cfg_usps_services() in /home/content/l/a/d/lady3597/html/catalog/admin/modules.php(275) : eval()'d code on line 1.

 

Can you help?

Dean

Link to comment
Share on other sites

  • 3 weeks later...

a good module but there is nobody had this error when clicking on a "extra services" -> Error: parsererrorSyntaxError: JSON.parse: unexpected character

 

I dont understand why and i dont found how to repair it someone have the solution?

Link to comment
Share on other sites

Finnaly the module work perfectly on my real address registered with usps.

I tried on my test server but I do not have access to the usps API and the query was just empty lol ! :-

Link to comment
Share on other sites

just one thing with Paypal Express if the customer select some Service Extra, the extra cost is not added to the total shipping cost in Paypal. that is my solution in red bellow if anyone has another proper solution let we know thank you

 

checkout_shipping.php

$shipping = array('id' => $shipping,

'title' => (($free_shipping == true) ? $quote[0]['methods'][0]['title'] : $quote[0]['module'] . ' (' . $quote[0]['methods'][0]['title'] . ')'),

'cost' => $quote[0]['methods'][0]['cost'],

'costExtra' => $quote[0]['methods'][0]['costExtra']);

 

ext/modules/payment/paypal/express.php

foreach ($quotes as $quote) {

if (!isset($quote['error'])) {

foreach ($quote['methods'] as $rate) {

$quotes_array[] = array('id' => $quote['id'] . '_' . $rate['id'],

'name' => $quote['module'],

'label' => $rate['title'],

'cost' => $rate['cost'] + $shipping['costExtra'],

'tax' => $quote['tax']);

Edited by thinkbig
Link to comment
Share on other sites

Good day.

 

Something about the USPS module is still breaking the Paypal Express transaction.

 

Scenario 1: Paypal Express and Free Shipping -> Checkout completes perfectly.

 

Scenario 2: Paypal Express and USPS Shipping -> Paypal returns to checkout.php, site returns "cannot redeclare class (shipping)" when the continue button is clicked.

 

Anyone provide some additional insight into the issue? It's extremely frustrating.

 

EDIT: I should add that Paypal should return to checkout_success.php in scenario 2, after processing the payment.

 

Thanks in advance!

Edited by JeffroDH
Link to comment
Share on other sites

Good day.

 

Something about the USPS module is still breaking the Paypal Express transaction.

 

Scenario 1: Paypal Express and Free Shipping -> Checkout completes perfectly.

 

Scenario 2: Paypal Express and USPS Shipping -> Paypal returns to checkout.php, site returns "cannot redeclare class (shipping)" when the continue button is clicked.

 

Anyone provide some additional insight into the issue? It's extremely frustrating.

 

EDIT: I should add that Paypal should return to checkout_success.php in scenario 2, after processing the payment.

 

Thanks in advance!

 

Jeff, I had the same problem when setting up my shop. It's been a little bit ago but if I remember correctly, the problem is within your settings at paypal. I know that with the fault you're getting and it appears as if it's in the module but it isn't. That's why when it's free shipping you don't send the address to paypal. Also check to make sure all of your settings are correct in admin. I do remember that when I got the problem fixed it had nothing to do with the module itself but an outside source. I will continue to check while and see if I can figure out anymore.

Link to comment
Share on other sites

@@bcleather

 

Thanks for the insight. I'll double check all the settings @ Paypal and in Admin.

 

Might it have something to do with the auto return URL? I was under the impression that Paypal Express didn't use this setting, but I'm open to anything at this point.

 

EDIT: I checked my settings in PayPal and noticed that the Payment Data Transfer option was OFF. From the description, it sounds related to IPN, but the documentation is unclear. My return URL is set to http://domain.com/shop/checkout_process.php.

Edited by JeffroDH
Link to comment
Share on other sites

Anybody familiar with why this module wouldn't return Flat Rates even if they are selected?

I'm getting rates they are just the exact same as that of the priority mail by weight shipment.

Example

Priority Mail: $6.35

Flat Rate Box: $6.35 --> where it should be $5.15

 

Emailed the author but no response in a month. Any insights would be appreciated.

Link to comment
Share on other sites

@@dculley - the add on requires a small sql query. You'll need to perform that query in your database.

 

 

Hi Jetta, I'm fairly new to this stuff and was wondering if you could kindly elaborate on how dculley fixed their issue. I am getting this error (see below) and honestly, I have no idea what to do. My site has been running fine for 7+ years but after recently updating the USPS shipping module, I cannot edit products in my catalog anymore.

 

 

1054 - Unknown column 'products_length' in 'field list'

 

select pd.products_name, pd.products_description, pd.products_url, p.products_id, p.products_quantity, p.products_model, p.products_image, p.products_price, p.products_weight, products_length, products_width, products_height, products_ready_to_ship, p.products_date_added, p.products_last_modified, date_format(p.products_date_available, '%Y-%m-%d') as products_date_available, p.products_status, p.products_tax_class_id, p.manufacturers_id from products p, products_description pd where p.products_id = '241' and p.products_id = pd.products_id and pd.language_id = '1'

 

[TEP STOP]

 

 

Thank you!

Link to comment
Share on other sites

@@ehong33234

 

The following statement in the SQL is incorrect

products_length, products_width, products_height, products_ready_to_ship,

 

 

The error is showing you that it can't find products_length, because the statement is not referencing a table to look at. Notice, all the other request have a p. or pd. in front of them? If you been running your store for 7 years without updating then this isn't the correct module to use as its for 2.3.+ . The statement you referenced likely was part of another addon you installed and not this particular one. Additionally it could be that your previous version of mysql allowed for minor errors in statements which prevented that statement from failing, but recently an upgrade was performed and now the statement needs corrected.

 

If I have to guess I would say this code

products_length, products_width, products_height, products_ready_to_ship

needs to be

p.products_length, p.products_width, p.products_height, p.products_ready_to_ship

which would easily be verifiable by looking at your products table in your database to see if those fields are there.

 

Hope that helps

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...