Jump to content
fulluvscents

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

Recommended Posts

I guess there is no support for this add on

 

If you check the profile of the add on's author you'd see that they haven't even logged in in over two months.

 

Not a good sign that any "support" will be swiftly forthcoming...

:huh:


If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Share this post


Link to post
Share on other sites

If you need support, then you may want to consider paying for it.

 

Jetta has done some work with our store, and is absolutely fantastic.

Share this post


Link to post
Share on other sites

Hey Guys, Im usually pretty decent with this stuff but I have failed at this one! I getting the below after i have done the mods and replacements and go into the shipping module to install...Any takers to help walk me through?post-238904-0-28090700-1342467717_thumb.jpg

 

Administration -> Modules -> Shipping

 

The '+ Install Module' button is in the upper right hand corner, and you can select it from there. If it's not in the list, then you missed something in the install.

Share this post


Link to post
Share on other sites

im having the following problem on my site

Warning: simplexml_load_string() [function.simplexml-load-string]: Entity: line 84: parser error : EntityRef: expecting ';' in /home/tciweb/public_html/includes/modules/shipping/usps.php on line 296

 

Warning: simplexml_load_string() [function.simplexml-load-string]: OffTime>12:00 PM</SaturDayCutOffTime></PostOffice><PostOffice><Name>ANAHEIM P&DC in /home/tciweb/public_html/includes/modules/shipping/usps.php on line 296

 

Warning: simplexml_load_string() [function.simplexml-load-string]: ^ in /home/tciweb/public_html/includes/modules/shipping/usps.php on line 296

i see that people had this error before , but i dont see any resolution.

 

i have items selected in the admin but module wont work.

 

this error shows up on checkout_shipping

and usps items dont show up.

and using ver 2.3.1

 

http://tci.webslingers.net/checkout_shipping.php?osCsid=c05aa8de99395891d248be67f9aee1ac

 

Open up the usps.php file that you're seeing in the error message and take a look at the code. There's a statement there (right around line 296) that wasn't closed properly with a ';', which is the delimiter. It's also possible that you have a stray apostrophe hanging out somewhere.

Share this post


Link to post
Share on other sites

I am trying to include this add on in OSC v 2.31

 

I have installed this module as instructed in the readme.txt that comes with the download but I can still not get it to work. Every thing goes fine until I try to configure the module.

 

When I go to configure USPS, the default values are all displayed in the right column, but when I select "Edit" that column disappears completely.

 

 

I get the same error in a fresh install and un edited version of OSC 2.31 as well.

 

I know this was discussed before but the solution given did not help.

 

Any help would be appreciated.

 

Did you uninstall the USPS module before making the changes to the files?

Share this post


Link to post
Share on other sites

Just as a general install note, you really should use a file comparison tool to make the changes. You'll get a much better appreciation for what you're changing and where you're at in the code. It's also a lot harder to make mistakes this way.

 

Share this post


Link to post
Share on other sites

Did you uninstall the USPS module before making the changes to the files?

 

Yes I did and I used a file comparison tool to make all changes but I still got the same results.

Share this post


Link to post
Share on other sites

Hi Jetta (and all) thanks for your script that got me out of weeks of hot water. I am, however, experiencing a problem as follows with PayPal Express. Here's the info:

 

osCommerce: V2.2

Shipping: USPS Methods 5.2.0_RateV4IntlRateV2

Payment: PayPal Express ONLY

 

After adding items to the cart hitting Checkout from the "What's in My Cart?" page, takes me to USPS shipping selection page and works flawlessly from there, going through PayPal and returning to the site etc. etc.

 

There's a problem, however, if from the "What's in My Cart?" page, I hit the PayPal button which bypasses the shipping selection page altogether, goes through the PayPal sign in and comes back to the site for price confirmation but not displaying any shipping info in the total whatsoever (only displaying the product price).

 

Consequently, if I've been through the checkout process for the same item previously, then hitting PayPal bypasses the shipping selection page as above, goes through the PayPal sign in and comes back to the site for price confirmation but this time displaying the shipping price as previously selected.

 

There's different behavior right there and basically both are wrong.

 

So how can I get pressing PayPal to perform exactly the same as if I'd hit "Checkout" OR how can I suppress the PayPal button from showing at all thereby forcing a customer to hit "Checkout" which will then go through the correct process OR even better, is there a fix for this?

 

Any help would be much appreciated. Thanks much.

Share this post


Link to post
Share on other sites

Hi Jetta,

 

UsingUSPS Rate V4 Intl Rate V2- v.1.0 on a 2.3.1 store. Today we got a couple emails:

 

Subject: PHP error_log message

 

UPSXML Rates Error: 111285: The postal code 33647 is invalid for AL United States. experienced by customer with id 4636 on 2012-07-26 11:26:26

 

In one case, the customer profile showed the state as Alabama (spelled out) and the zip code as New Jersey. Since there was no such address in Alabama, the NJ zip is correct. In the other case the customer was in Egypt and the error was as shown above. It looks like the error is coming from the USPS. It also looks like the state is defaulting to Alabama for some reason - does osC do that if the customer leaves it blank? Is this something new from the USPS? Seems like USPS should pick up the country before deciding that the number is a zip code as opposed to some other kind of postal code.

 

Thanks for any insight!

 

-Jerry-

Share this post


Link to post
Share on other sites

After further investigation, it looks like the user created an account, entered the state in the form by typing it in then had some other error that returned him to the form. When that happens, the drop-down for state appears (because osC now knows the country to display) with Alabama as the default. Apparently the customer did not notice and correct the error before placing the order - which never came in because of the USPS error about the state and zip code not matching. So, all of that works as intended.

 

I don't know exactly what happened to the customer in Egypt. Something similar I suspect although given the country from a pull down menu, there should be no default to Alabama.

 

-Jerry-

Share this post


Link to post
Share on other sites

I have a client that has emailed trying to place an order for the last two days. This is on a existing 2.3 store with this module:

 

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

 

This appears to be where it connects to the usps servers. Strange part is that I have placed test orders and have breezed right on through and cannot replicate this. Is this a possibility where the usps server is unavailable at the time the order is being placed?

Share this post


Link to post
Share on other sites

That is caused by an error. You are not seeing the error message, so it's impossible to tell what's wrong. look in your PHP error log, or change error reporting in application_top.php to this:

 

// Set the level of error reporting
error_reporting(E_ALL & ~E_STRICT);

 

When you get the error message, copy and paste it here so we can tell what's wrong.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

Hello fellow HOOSIER!! (or should I say Lady Hoosier?!?))

 

I'm having some problems with this contribution although I'm thinking I may have caused it but don't know how to fix it. It installs fine but whenever I go to edit it in admin I get

Fatal error: Call to undefined function tep_cfg_usps_services() in /home/content/97/9711797/html/admin/modules.php(232) : eval()'d code on line 1

for the life of me I can't understand why since that file was not modified at all. Any and all suggestions would be greatly appreciated.

 

Thanks in advance

Share this post


Link to post
Share on other sites

Hello fellow HOOSIER!! (or should I say Lady Hoosier?!?))

I'm having some problems with this contribution although I'm thinking I may have caused it but don't know how to fix it. It installs fine but whenever I go to edit it in admin I get

Fatal error: Call to undefined function tep_cfg_usps_services() in /home/content/97/9711797/html/admin/modules.php(232) : eval()'d code on line 1

for the life of me I can't understand why since that file was not modified at all. Any and all suggestions would be greatly appreciated.

Thanks in advance

Call to undefined function means there's a function that should be there, but it isn't. Double-check that function tep_cfg_usps_services exists in admin/includes/functions/general.php -- it should be something like:

 

function tep_cfg_usps_services($select_array, $key_value, $key = '')
{
$key_values = explode( ", ", $key_value);
$name = (($key) ? 'configuration[' . $key . '][]' : 'configuration_value');
$string = '<b><div style="width:20px;float:left;text-align:center;"> </div><div style="width:30px;float:left;text-align:center;">Min</div><div style="width:30px;float:left;text-align:center;">Max</div><div style="float:left;"></div><div style="width:50px;float:right;text-align:center;">Handling</div></b><div style="clear:both;"></div>';
for ($i=0; $i<sizeof($select_array); $i++)
 {
 $string .= '<div id="' . $key . $i . '">';
 $string .= '<div style="width:20px;float:left;text-align:center;">' . tep_draw_checkbox_field($name, $select_array[$i], (in_array($select_array[$i], $key_values) ? 'CHECKED' : '')) . '</div>';
 if (in_array($select_array[$i], $key_values)) next($key_values);
 $string .= '<div style="width:30px;float:left;text-align:center;">' . tep_draw_input_field($name, current($key_values), 'size="1"') . '</div>';
 next($key_values);
 $string .= '<div style="width:30px;float:left;text-align:center;">' . tep_draw_input_field($name, current($key_values), 'size="1"') . '</div>';
 next($key_values);
 $string .= '<div style="float:left;">' . preg_replace(array('/RM/', '/TM/', '/International/', '/Envelope/', '/ Mail/', '/Large/', '/Medium/', '/Small/', '/First/', '/Legal/', '/Padded/', '/Flat Rate/', '/Regional Rate/', '/Express Guaranteed /'), array('', '', 'Int\'l', 'Env', '', 'Lg.', 'Md.', 'Sm.', '1st', 'Leg.', 'Pad.', 'F/R', 'R/R', 'Exp Guar'), $select_array[$i]) . '</div>';
 $string .= '<div style="width:50px;float:right;text-align:center;">$' . tep_draw_input_field($name, current($key_values), 'size="2"') . '</div>';
 next($key_values);
 $string .= '<div style="clear:both;"></div></div>';
 }
return $string;
}

 

This is the second step under the STEP-BY-STEP FILE MODIFICATIONS that was written in the readme.txt file of the add-on. You might have also forgotten to add function tep_cfg_usps_extraservices:

 

function tep_cfg_usps_extraservices($select_array, $key_value, $key = '')
{
$key_values = explode( ", ", $key_value);
$name = (($key) ? 'configuration[' . $key . '][]' : 'configuration_value');
$string = '<b><div style="width:20px;float:left;text-align:center;">N</div><div style="width:20px;float:left;text-align:center;">S</div><div style="width:20px;float:left;text-align:center;">H</div></b><div style="clear:both;"></div>';
for ($i=0; $i<sizeof($select_array); $i++)
 {
 $string .= tep_draw_hidden_field($name, $select_array[$i]);
 next($key_values);
 $string .= '<div id="' . $key . $i . '">';
 $string .= '<div style="width:20px;float:left;text-align:center;"><input type="checkbox" name="' . $name . '" value="N" ' . (current($key_values) == 'N' || current($key_values) == '' ? 'CHECKED' : '') . ' id="N" onClick="if($(this).is(\':checked\')) $(\'#C, #S, #H\', $(\'#' . $key . $i . '\')).removeAttr(\'checked\'); if($(\':checkbox:checked\', $(\'#' . $key . $i . '\')).size() == 0) $(this).attr(\'checked\', \'checked\');"></div>';
 $string .= '<div style="width:20px;float:left;text-align:center;"><input type="checkbox" name="' . $name . '" value="S" ' . (current($key_values) == 'S' ? 'CHECKED' : '') . ' id="S" onClick="if($(this).is(\':checked\')) $(\'#N, #C, #H\', $(\'#' . $key . $i . '\')).removeAttr(\'checked\'); if($(\':checkbox:checked\', $(\'#' . $key . $i . '\')).size() == 0) $(\'#N\', $(\'#' . $key . $i . '\')).attr(\'checked\', \'checked\');"></div>';
 $string .= '<div style="width:20px;float:left;text-align:center;"><input type="checkbox" name="' . $name . '" value="H" ' . (current($key_values) == 'H' ? 'CHECKED' : '') . ' id="H" onClick="if($(this).is(\':checked\')) $(\'#N, #C, #S\', $(\'#' . $key . $i . '\')).removeAttr(\'checked\'); if($(\':checkbox:checked\', $(\'#' . $key . $i . '\')).size() == 0) $(\'#N\', $(\'#' . $key . $i . '\')).attr(\'checked\', \'checked\');"></div>';
 next($key_values);
 $string .= preg_replace(array('/Signature/', '/without/', '/Merchandise/', '/TM/', '/RM/'), array('Sig', 'w/out', 'Merch.', '', ''), $select_array[$i]) . '<br>';
 $string .= '<div style="clear:both;"></div></div>';
 }
return $string;
}

Share this post


Link to post
Share on other sites

I didn't get a readme.txt in my package. I'm wondering if there is more than one package out there with the same files. I got a readme but it doesn't have any step by step file mods. I'm trying to find it now. Could you supply me with the link to that file please?

Share this post


Link to post
Share on other sites

Mine actually says to use a file compare tool for differences in files. I would definitely appreciate a link to or a copy of the readme file.

Share this post


Link to post
Share on other sites

Sorry, one last thing. I installed this on a clean install (2.3.2). I originally installed in on 2.3.1 with modified files and got the same error. I installed a clean install and added the files included with the package. I have to assume that the file mods that you are talking about are my problem but even after going back to the contributions site, I can't find the readme.txt file you're speaking of. I guess my wife's right, I really am blind (don't tell her I said that though).

Share this post


Link to post
Share on other sites

Ok. I found the Step by step file mods you were talking about. I found them in version 1.5, there were not included in the latest file download. Now I'm not getting any errors anymore, everything seems to running correctly EXCEPT, now I'm not getting any shipping options when I check out. I enabled a dozen or more shipping options in the admin but when I go to check out it doesn't offer me even 1 option. I am curious about something, I have a user ID AND a password from USPS. In the admin it only has a field for the User ID and not the password. Any reason why that might be and could that be part of the problem. It's not even showing USPS at checkout almost as if the module is not enabled or installed.

Share this post


Link to post
Share on other sites

I got it. Thanks for all your help. Sorry to be such a bother but this one was driving me crazy.

Share this post


Link to post
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


-Peder Beckman-

Kool Kat Jazz Records

Share this post


Link to post
Share on other sites

If the dynamic template requires changes to the shipping mods, then perhaps, the dynamic templates should either be rewritten, so that they don't intrude on already existing scripts, or the dynamic templates contributor(s) should take the time to supply the necessary updates for the mods that their script intrudes on, don't you think? If they can't make it a one size fits all, then they need to invest the time in staying up to date with CORE mods and issuing compatibility packets along the way. Seems to me it would be easier (and make more sense) to write a script that works with the existing OSC core, than it does to force changes to the core and all surrounding mods so that an incompatible contribution will fit like it would if it had been written thoughtfully in the first place. Incompatibility of another contribution isn't a shipping mod issue. It's a distinct issue that needs to be dealt with by the creator of that contribution. Those are my cents on that.

 

The issue with needing to choose 2 shipping methods is in fact a bug. I've found the reason and fixed that and I will upload a new package momentarily.

 

@pederb

 

I'm not sure what you mean. First I need to mention that this isn't the old USPS methods. The option isn't to display insurance as text just to inform the customer that their package is insured, but rather to display any add on services as a break down of the total cost, if you choose to display it.

 

Your choice is to:

 

1. Not use the service

2. Use the service (which the customer pays for), bundle it into the cost of the shipping methods, and NOT SHOW the customer a breakdown of their shipping costs.

3. Use the service (which the customer pays for), bundle it into the cost of the shipping methods, and SHOW the customer a breakdown of their shipping costs.

 

For option three, before the breakdown will be displayed, the customer must choose a shipping option. Once the option is selected, they will see (Show Details). When they click on that, it will give them a breakdown (base, handling, delivery confirmation, insurance, etc...). The page gets far too sloppy if you display everything at once. So, it is only displayed on an as needed/wanted basis.

 

Just because you choose an option, does not mean it will be available, or that it will be charged, hidden or displayed. If USPS doesn't offer the service for whatever reason, then your selection is moot.

 

USPS may not offer a service for a variety of reasons:

a. Value exceeds insurable value

b. Service is only available at counter and you chose internet rates, or vice versa

c. Service not available for shipping type

d. Service is not available to destination country

e. etc......

 

If you choose it, and IF USPS returns it, then it will be charged and added (and displayed if you choose to display it). This module is based strictly on what USPS offers, based on the input that comes from your cart and your admin settings. It isn't designed to be custom suited for anything outside of USPS package options and services.

 

Another point that I need to make. The script pulls ALL available information and sorts/charges/displays based on what you give it. If you choose two services that are redundant or incompatible per USPS offerings, both of those services will be returned. It's up to you to know what is and isn't appropriate for your shop and your customers. For example, don't choose "registered mail without insurance" PLUS insurance, or vice versa, don't choose regular registered mail, but forget to choose insurance along with it. And there is no sense in displaying both delivery confirmation AND signature confirmation, as these are redundant and SC rules out DC.

Sorry for the late replay. What I need is an option so the customer can choice if he wants insureance or not by clicking in the box.

 

Cheers


-Peder Beckman-

Kool Kat Jazz Records

Share this post


Link to post
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?

Share this post


Link to post
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.

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

×