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 just installed v1.7 of this module into a new OSC 2.3 installation. I also included the ADD-ON USPS restrict Methods by Product. Before installing I removed the "Flat Rate" module. I also previously installed the UPSXML 1.4 shippng module installed which is working.

 

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

 

I've done some recomparing of the files but cannot find anything wrong. Anyone have an idea of what the problem might be or where I should be looking?

Edited by DrGlitch
Link to comment
Share on other sites

It was a bit hard to find but I finally figured out my problem. Apparently I had accidentally copied the admin>includes>functions>general.php into includes>functions. That was causing a failure when clicking on Edit attempted to eval tep_cfg_usps_services() as it did not exist.

 

Nevermind ;)

Link to comment
Share on other sites

@@reverseholic, not sure if you solved your problem, but I encountered a similar problem saving changes using the UPSXML module. The install notes for that module indicated a fix:

 

In catalog/admin/modules.php, find this code (somewhere around line 36-46)

 

if (tep_not_null($action)) {
switch ($action) {
  case 'save':
	reset($HTTP_POST_VARS['configuration']);
	while (list($key, $value) = each($HTTP_POST_VARS['configuration'])) {

 

and change the while statement to:

 

		foreach($_POST['configuration'] as $key => $value) {

Edited by DrGlitch
Link to comment
Share on other sites

@@vlad36: Thanks for the Test/Live info. However I'm not sure its worth everyones time to use it as currently the USPS testing API does not support RateV4. Trying to use it with the test server results in the error "API Authorization failure. RateV4 is not a valid API name for this protocol."

Link to comment
Share on other sites

I get the following error when I only have "1st Class Mail Parcel" selected for shipping methods in the admin setting for this module:

 

Invalid XML Element content is incomplete according to the DTD/Schema. line= 0 pos= 1668

 

Anyone know why? Is this no longer a valid option with the USPS?

Link to comment
Share on other sites

How is the configurations_values updated to add the services in MODULE_SHIPPING_USPS_TYPES? I see the services in MODULE_SHIPPING_USPS_DMST_SERVICES and MODULE_SHIPPING_USPS_INTL_SERVICES use a "Y" or "N" to turn them on or off.

 

My issue has to do with configuration_values not updating properly when using the shipping module edit to save my changes. It overwrites the field blank.

 

The values are loaded as default to:

0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.000, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00, 0, 70, 0.00

 

How should they look if a service method is checked and saved?

for example, if I select to use Priority with a weight of 0 to 60 lb and a handeling fee of 0.80 how would that save in the db field?

Edited by HTMLguru2
Link to comment
Share on other sites

Hey Jetta,

 

Thanks for this great contrib, it's really what the doctor ordered, and thanks again for your generous support on this forum.

 

I'm having a bit of an issue. My site is definitely not stock, but nevertheless, I've been able to get the module installed. Everything seems to work fine on the admin side, but the options aren't displaying on the shipping page. The error message I've received:

 

<Error><Number>-2147219085</Number><Source>Rate_Respond.;SOLServerRates.RateV4_Respond</Source><Description>Invalid XML Element content is incomplete according to the DTD/Schema.

 

I've read this entire thread, and started over a couple of times, still coming back to the same thing. I'd really appreciate a point in the right direction.

 

Your time and effort is appreciated!

 

Jeff Hogan

 

EDIT: I should mention that I made the edits using the instructions contained in the ReadMe.txt from the 1.7 version.

Edited by JeffroDH
Link to comment
Share on other sites

@@JeffroDH: This might not be the cause of your problem, but I found that the "Element content is incomplete according to the DTD/Schema." error occurs when no enabled services are available. As a test try enabling all of the the service options in Admin>Modules>Shipping for USPS and then see if any show up on the checkout page.

Link to comment
Share on other sites

I'm having trouble with weights. I entered the correct weights for all my products, but on checkout the weight displayed (and thus the shipping cost) is off.

 

For instance, I have a book called "21 Tomorrows" that weighs 10.5 oz, so (since USPS wants pounds) I entered 0.66 as the weight for that product. But when I add just this book to my shopping cart, the shipping module informs me the weight of my order is3 lbs, 11 oz. So I'm 48.5 oz off, and $1.26 off. In fact, with all my books, they all end up being 48 - 48.5 oz (depending on if it has a 1/2 oz or not) heavier than they should be...

 

Does anyone know where the extra weight is coming from? Or how I can fix this?

 

Thanks in advance!

-Brad

Edited by brad11
Link to comment
Share on other sites

I poste this in another forum, how and what do i do with the upload? I don't know my next step after i save to the hard drive,....please help! I am new at this so please be nice. I am extreamly novice and don't understand what SQL or ext is. I have a website threw IPAGE and downloaded oscommerse using simplescripts. I contacted USPS and intergrated the module available on my 2.3 version of OScommerse, it works but only get library mail. After researching the sites i found that i need to download and install USPS Rate v4. My question is how do i do this.

1. There is no upload function in my admin page in the oscommerse site

2. Is there an easier way to do this?

3. USPS says they can't help me and IPAGE says to contact OScommerse, but there is no customer support number

4. If you have a solution can you please give me the Idiots guide step by step?

Link to comment
Share on other sites

@@JeffroDH: This might not be the cause of your problem, but I found that the "Element content is incomplete according to the DTD/Schema." error occurs when no enabled services are available. As a test try enabling all of the the service options in Admin>Modules>Shipping for USPS and then see if any show up on the checkout page.

Thanks very much for your response!

 

Tried this, found some interesting errors that popped up. Started install fresh, using file comparison rather than following the readme.txt. I'm getting some interesting errors involving modules.php, that seem to have something to do with my template system. I've installed the compatibility tweak for dynamic template system, the error seems to be further down the page. Here's the code that should be installed:

    $contents[] = array('text' => '<br />' . $mInfo->description);
// USPS START
//	    $contents[] = array('text' => '<br />' . $keys);
    $contents[] = array('text' => '<br />' . preg_replace(array('/RM/', '/TM/', '/International/', '/Envelope/'), array('®', '™', 'Int\'l', 'Env'), $keys));
// USPS END
  } elseif (isset($HTTP_GET_VARS['list']) && ($HTTP_GET_VARS['list'] == 'new')) {

 

And here's what's already here:

$contents[] = array('text' => '<br />' . $mInfo->description);
    // bof Dynamic Template System
    $files = explode(";", $keys);	   
    foreach($files as $file){	   
    $contents[] = array('text' =>  $file);
    }
    // eof Dynamic Template System
  } elseif (isset($HTTP_GET_VARS['list']) && ($HTTP_GET_VARS['list'] == 'new')) {

 

I don't know nearly enough to even know what this code for Dynamic Template System is doing, much less how to reconcile the buggered thing with the USPS contribution.

 

Behavior in the admin panel is extremely strange. After I set up the settings and save, I see the option names in where the min and max weight should be, and when clicking on edit for a second time, the options are gone entirely. I'm also seeing 4 columns for the optional services, N C S H, for which C has no documentation, and I don't recall seeing it the last time I installed the silly thing.

 

Getting the shipping functional on this site is getting pretty critical. I would really appreciate some guidance. Coding is (obviously) not my strong suit.

Link to comment
Share on other sites

Ok, made some progress on my own. Seems there is a typo of sorts in the compatibility tweak for Dynamic Template Systems. The final else statement was not bracketed.

 

else tep_db_query("update " . TABLE_CONFIGURATION . " set configuration_value = '" . $value . "' where configuration_key = '" . $key . "'");
// Dynamic Template System End
 }

 

When I changed the code to this:

else
  {
   tep_db_query("update " . TABLE_CONFIGURATION . " set configuration_value = '" . $value . "' where configuration_key = '" . $key . "'");
   }
// Dynamic Template System End
 }

 

it seems to work, at least the appropriate prices populated to the page. Needs further testing, to be sure. Still not sure if I need to reconcile the code from my last post. Any insight from you PHP gurus?

Link to comment
Share on other sites

@@vlad36: Thanks for the Test/Live info. However I'm not sure its worth everyones time to use it as currently the USPS testing API does not support RateV4. Trying to use it with the test server results in the error "API Authorization failure. RateV4 is not a valid API name for this protocol."

 

@vlad35 @@DrGlitch

 

Thanks for the test and production addition. I have found, and I am not sure if anyone else has, that USPS will not switch you to the production server unless you have had two successful attempts at hitting the test server. This may only be for new stores but worth noting. Thanks to both of you.

Link to comment
Share on other sites

Hi Jetta,

Thank you so much for your time and effort on this contrib.

I am using a "vanilla" RC2a and the files you provide in the zip making no changes.

The edit side works great. I can select/deselect and the info is saved.

However once I go to the checkout page I do not see any sign of the contrib.

If I add other shipping choices, I see them fine so I know shipping is enabled for the checkout screen.

I wish I knew more about php but I am stuck.

 

Can you help me? Has anyone gotten it working on RC2a. If so maybe you can send me the files and I can do a compare.

Thanks for the help.

Link to comment
Share on other sites

I'm having trouble with weights. I entered the correct weights for all my products, but on checkout the weight displayed (and thus the shipping cost) is off.

 

For instance, I have a book called "21 Tomorrows" that weighs 10.5 oz, so (since USPS wants pounds) I entered 0.66 as the weight for that product. But when I add just this book to my shopping cart, the shipping module informs me the weight of my order is3 lbs, 11 oz. So I'm 48.5 oz off, and $1.26 off. In fact, with all my books, they all end up being 48 - 48.5 oz (depending on if it has a 1/2 oz or not) heavier than they should be...

 

Does anyone know where the extra weight is coming from? Or how I can fix this?

 

Thanks in advance!

-Brad

 

Has anyone experienced the kind of problem I'm having? I'm desperate to find a solution as this is the only thing keeping my site from going live and the site owner is growing very impatient! I've been through it all a few times, and I can't find a reason that the extra 48 oz is being added to every product... can anyone help??

 

Thanks,

Brad

Link to comment
Share on other sites

Has anyone experienced the kind of problem I'm having? I'm desperate to find a solution as this is the only thing keeping my site from going live and the site owner is growing very impatient! I've been through it all a few times, and I can't find a reason that the extra 48 oz is being added to every product... can anyone help??

 

Thanks,

Brad

 

in admin>configuration>shipping/packaging what's the package tare weight?

I am not a professional webmaster or PHP coder by background or training but I will try to help as best I can.

I remember what it was like when I first started with osC. It can be overwhelming.

However, I strongly recommend considering hiring a professional for extensive site modifications, site cleaning, etc.

There are several good pros here on osCommerce. Look around, you'll figure out who they are.

Link to comment
Share on other sites

in admin>configuration>shipping/packaging what's the package tare weight?

 

Ahh, it was set to 3. I set it to 0 and that fixed everything! Thanks Altoid!!! It's always some obscure setting that's nowhere near where you'd think to look.

 

Thanks so much!

Link to comment
Share on other sites

Ahh, it was set to 3. I set it to 0 and that fixed everything! Thanks Altoid!!! It's always some obscure setting that's nowhere near where you'd think to look.

 

Thanks so much!

 

You are welcome. The settings will get you every time. :)

I am not a professional webmaster or PHP coder by background or training but I will try to help as best I can.

I remember what it was like when I first started with osC. It can be overwhelming.

However, I strongly recommend considering hiring a professional for extensive site modifications, site cleaning, etc.

There are several good pros here on osCommerce. Look around, you'll figure out who they are.

Link to comment
Share on other sites

I would like to use this and have the usps access. But I'm getting the famous "can't calculate shipping message". I'm in the USVI and most of my customers will be out of the us. Can someone shed some light? Thanks

Link to comment
Share on other sites

Yes, if you drop ship and want to apply a flat fee, then you'll be able to block usps as an option. After you install it, just open the product editing page, click on restrict usps methods (which will drop down your list of methods) and check ALL the checkboxes. Sorry, I don't have a screenshot. It would probably help. This only applies to this particular USPS mod, so if you offer other shipping options, it won't block those.

 

Jetta - First thank you for your devotion to increasing OSC's capability and an awesome contrib. I installed this tonight without any issues, however I think I might have found an issue in regards to your answer above. I have a very large item (a wood crate) that is used for shipping a particular item on my site. When I check every USPS box to restrict those ship methods on that item, save the item, and then reIoad the item, I notice one of those methods is then unchecked. I've verified this on several items. Is there a fix that would allow one to disable all methods for a particular item?

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

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

Edited by uwearusa
Link to comment
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

Edited by aerosmith
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...