Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

Recent USPS change

 
Reply
   X-Cart forums > News and Announcements
 
Thread Tools
  #1  
Old 05-24-2007, 05:30 AM
  ambal's Avatar 
ambal ambal is offline
 

X-Cart team
  
Join Date: Sep 2002
Posts: 4,115
 

Post Recent USPS change

Hi everyone,

I think the most of you guys are aware of recent change in USPS API and have already applied patches published by Svowl at http://forum.x-cart.com/showthread.php?t=30721 to their X-Carts or installed updated USPS add-on in their LiteCommerces.

I am posting this announcement just in case there is someone who haven't done that yet but is in need to have USPS working fine in his/her X-Cart or LiteCommerce.

For X-Carters:
We published the patches along with instructions on how to apply them correctly inside "File Area" sections of your HelpDesk accounts. Find X-Cart/Updates/USPS_update_20070514.tgz file there, download, unpack, read "README" and follow it if you haven't applied the patch yet. If you've done that them do not do that at all.

For LiteCommercers (sounds strange?): We sent a newsletter about new version of USPS add-on module. If you use USPS and haven't installed the new version then I guess it's time to do it. The new version can be found as always inside "File Area" sections of your HelpDesk accounts if you have "Real-time shipping quotes" add-on license.

If you feel you need help in this - do not hesitate to contact our support team. They are ready to help 24x7 (excluding time they need to eat and drink )
__________________
Sincerely yours,
Alex Mulin
VP of Business Development for X-Cart
X-Payments product manager
Reply With Quote
  #2  
Old 08-09-2007, 11:21 AM
  dire_lobo's Avatar 
dire_lobo dire_lobo is offline
 

Advanced Member
  
Join Date: Dec 2005
Posts: 53
 

Default If patch included in distributions issued after the patch date, why can't

I make it work?

//
Is USPS patch included in distributions issued after the patch date?
e.g. x-cart-4.1.8gold.tgz (3 853 Kb) uploaded Jun 19 07 16:37:14
or do I need to apply it?
//

OK, I found the readme and it indicates i shouldn't need to apply the patch. Any idea why my USPS STILL won't work?

I get:
"Warning: fsockopen(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /home/content/*/*/*/*/html/include/func/func.http.php on line 85"

Any help would be greatly appreciated
__________________
4.1.8 live
shared server/hosted linux
Physical Location: New Mexico, USA
Server Location: Arizona, USA

Last edited by dire_lobo : 08-09-2007 at 12:13 PM. Reason: found more information
Reply With Quote
  #3  
Old 08-15-2007, 04:04 AM
  ambal's Avatar 
ambal ambal is offline
 

X-Cart team
  
Join Date: Sep 2002
Posts: 4,115
 

Default Re: If patch included in distributions issued after the patch date, why can't

Quote:
Originally Posted by dire_lobo

OK, I found the readme and it indicates i shouldn't need to apply the patch. Any idea why my USPS STILL won't work?

I get:
"Warning: fsockopen(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /home/content/*/*/*/*/html/include/func/func.http.php on line 85"

Any help would be greatly appreciated

Let me suggest you to ask the same question in Shipping issues topic rather than here. Also, you can contact our techs anytime using your HelpDesk.
__________________
Sincerely yours,
Alex Mulin
VP of Business Development for X-Cart
X-Payments product manager
Reply With Quote
  #4  
Old 08-15-2007, 07:28 PM
  dire_lobo's Avatar 
dire_lobo dire_lobo is offline
 

Advanced Member
  
Join Date: Dec 2005
Posts: 53
 

Default Re: If patch included in distributions issued after the patch date, why can't

Thanks ambal. Forays into the forum facilitated finding fast facts. Figured it out. Thanks again though!
__________________
4.1.8 live
shared server/hosted linux
Physical Location: New Mexico, USA
Server Location: Arizona, USA
Reply With Quote
  #5  
Old 09-26-2007, 01:25 PM
 
Kelson Kelson is offline
 

Member
  
Join Date: Feb 2006
Location: Michigan, USA
Posts: 29
 

Question Re: Recent USPS change

So I have X-Cart version 4.0.15 and I I went to the admin >> patch/upgrade page and tried to apply the first patch, the diff file, which in the X-Cart .tgz file was called DIFF_USPS_40x.txt which got a ton of failure flags colored red. I tried renaming the file mod_USPS.php but it still gave me a bunch of red flags:

---
Status legend:
OK - file ready to patch,
checksum error - patch contents is corrupted,
non-writable - please give those files a write permissions,
not a file - the target is not a file,
not exists - file is missing,
could not patch - patch cannot be applied to this file automatically because it was significantly modified, the patch for this file should be applied manually,
already patched - file was already patched.



Note:
Files which are not exists and already patched will be ignored.
----


So... does that mean that the patch isn't necessary? Would it be more effective to just FTP something with Filezilla?

I haven't tried the SQL_USPS_40x.txt file yet. I don't even know if I have to.

Any help? Thanks.
__________________
Kelson Herr
Antiphonic Music Co.
www.antiphonic.com

x-cart v4.0.15 [win]
Reply With Quote
  #6  
Old 12-04-2007, 07:36 AM
 
hyratech hyratech is offline
 

Senior Member
  
Join Date: Jul 2005
Posts: 172
 

Default Re: Recent USPS change

Hi.. i'm gettign the follwoing erorr. i got the database patched with no problem. when i went to patch the usps mod i get this:


------------------------------------
Step 1 of 2: Testing patch applicability and generation list of files

Result of the testing phase...

Checking patch.pl permissions: /home/hyratech/public_html/patch.pl ... OK

File Status
shipping/mod_USPS.php could not patch


Status legend:
OK - file ready to patch,
checksum error - patch contents is corrupted,
non-writable - please give those files a write permissions,
not a file - the target is not a file,
not exists - file is missing,
could not patch - patch cannot be applied to this file automatically because it was significantly modified, the patch for this file should be applied manually,
already patched - file was already patched.



Note:
Files which are not exists and already patched will be ignored.


Patch text:
Index: shipping/mod_USPS.php
================================================== =================
@@ -68,6 +87,9 @@

$use_usps_https = false;

+ global $hash;
+ $hash = array();
+
if (empty($USPS_username) || empty($USPS_servername))
$USPS_FOUND = false;

@@ -76,6 +98,9 @@

include_once($xcart_dir."/shipping/mod_USPS_countries.php");

+ if ($userinfo['s_country'] == 'PR') {
+ $userinfo['s_country'] = 'US';
+ }
if (isset($usps_countries[$userinfo['s_country']])) {
$dst_country = $usps_countries[$userinfo['s_country']];
} else {
@@ -121,10 +152,16 @@
function USPS_intl_characterData($parser, $data) {
global $allowed_shipping_methods, $intershipper_rates;
global $mod_USPS_service,$mod_USPS_postage;
+ global $hash;
if($mod_USPS_postage=="*") $mod_USPS_postage=$data;
if($mod_USPS_service=="*") {
foreach ($allowed_shipping_methods as $sk=>$sv) {
- if ($sv["code"]=="USPS" && $sv["destination"]=="I" && stristr($sv["shipping"],$data)) $intershipper_rates[]= array ("methodid"=>$sv["subcode"], "rate"=>$mod_USPS_postage);
+ if ($sv["code"]=="USPS" && $sv["destination"]=="I" && preg_match("/^".preg_quote($sv['shipping'], "/")."$/S", "USPS ".$data)) {
+ if (!in_array($sv["subcode"], $hash)) {
+ $intershipper_rates[]= array ("methodid"=>$sv["subcode"], "rate"=>$mod_USPS_postage);
+ $hash[] = $sv["subcode"];
+ }
+ }
}
$mod_USPS_service=""; $mod_USPS_postage="";
}
@@ -235,11 +276,16 @@
function USPS_dom_characterData($parser, $data) {
global $allowed_shipping_methods, $intershipper_rates;
global $mod_USPS_service,$mod_USPS_postage;
+ global $hash;
if($mod_USPS_service=="*") $mod_USPS_service=$data;
if($mod_USPS_postage=="*") {
foreach ($allowed_shipping_methods as $sk=>$sv) {
- if ($sv["code"]=="USPS" && $sv["destination"]=="L" && preg_match("/^".preg_quote($sv['shipping'], "/")."/S", "USPS ".$mod_USPS_service))
- $intershipper_rates[]= array ("methodid"=>$sv["subcode"], "rate"=>$data);
+ if ($sv["code"]=="USPS" && $sv["destination"]=="L" && preg_match("/^".preg_quote($sv['shipping'], "/")."$/S", "USPS ".$mod_USPS_service)) {
+ if (!in_array($sv["subcode"], $hash)) {
+ $intershipper_rates[]= array ("methodid"=>$sv["subcode"], "rate"=>$data);
+ $hash[] = $sv["subcode"];
+ }
+ }
}
$mod_USPS_service=""; $mod_USPS_postage="";
}

Warning:
Some of files in your instalation got the status "could not patch".

..........................................



to my knowledge. i dotn' think i made any changes to the file. so i think it's got to be somethign else.

Please help... since i dont' have any knowledge of php coding/programing..
My site is up with the help of this forum..


THANKS a MILLION!
__________________
hyratech
X-CART Gold 4.1.10
Hosted - Unix
Reply With Quote
  #7  
Old 12-04-2007, 06:04 PM
 
hyratech hyratech is offline
 

Senior Member
  
Join Date: Jul 2005
Posts: 172
 

Default Re: Recent USPS change

Hi..
The files is saying that it's been changed... Does someone have the original mod_usps.php file from 4.0.17 that i can get? stupid me. i didn't save the orignal x-cart version files.
__________________
hyratech
X-CART Gold 4.1.10
Hosted - Unix
Reply With Quote
  #8  
Old 12-04-2007, 10:14 PM
  bullfrog's Avatar 
bullfrog bullfrog is offline
 

eXpert
  
Join Date: Oct 2004
Location: Oregon, USA
Posts: 366
 

Default Re: Recent USPS change

Here it is.
Attached Files
File Type: php mod_USPS.php (10.0 KB, 16 views)
__________________
Bullfrog ~~~ X-Cart Gold v4.7.2 (2) v4.7.8. ⌠If the road is easy, you're likely going the wrong way.■ ― Terry Goodkind
Reply With Quote
  #9  
Old 12-05-2007, 06:23 AM
 
hyratech hyratech is offline
 

Senior Member
  
Join Date: Jul 2005
Posts: 172
 

Default Re: Recent USPS change

Hi.. Thanks for the file..

However it's telling me the same thing. error saying that' the file is modified and cannot patch. Contacted x-cart support. they say that i need to upgrade to 4.0.19, but that's not really an option for me. I wont' know how to reinstall all those mods i have installed.. i think i have at leat 4 mods installed.

can someone help me manually upgrade the usps mod? or pay someone for it?
__________________
hyratech
X-CART Gold 4.1.10
Hosted - Unix
Reply With Quote
Reply
   X-Cart forums > News and Announcements


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 04:29 PM.

   

 
X-Cart forums © 2001-2020