X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   News and Announcements (https://forum.x-cart.com/forumdisplay.php?f=28)
-   -   Recent USPS change (https://forum.x-cart.com/showthread.php?t=31399)

ambal 05-24-2007 05:30 AM

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 :wink: )

dire_lobo 08-09-2007 11:21 AM

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

ambal 08-15-2007 04:04 AM

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.

dire_lobo 08-15-2007 07:28 PM

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!

Kelson 09-26-2007 01:25 PM

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.

hyratech 12-04-2007 07:36 AM

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 12-04-2007 06:04 PM

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.

bullfrog 12-04-2007 10:14 PM

Re: Recent USPS change
 
1 Attachment(s)
Here it is.

hyratech 12-05-2007 06:23 AM

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?


All times are GMT -8. The time now is 01:53 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.