Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] UPS XML Tracking


heliosquare

Recommended Posts

  • 3 weeks later...
  • Replies 324
  • Created
  • Last Reply

Top Posters In This Topic

The funny thing is that if I type the url by hand in the address bar as it should be, the tracking page works great.

 

Its just when I press the track button, the page reloads...but doesnt have the correct code in the address bar, therefore the tracking doesnt work.

 

This is what should be accessed when clicking the track button but doesnt.

http://www.mysite.com/catalog/tracking.php...30330787397&c=1

 

Help anyone?

Link to comment
Share on other sites

The funny thing is that if I type the url by hand in the address bar as it should be, the tracking page works great.

 

Its just when I press the track button, the page reloads...but doesnt have the correct code in the address bar, therefore the tracking doesnt work.

 

This is what should be accessed when clicking the track button but doesnt.

http://www.mysite.com/catalog/tracking.php...30330787397&c=1

 

Help anyone?

 

What IS the code in your address bar that doesn't work. That information would be very helpful is solving your problem. You are probably not sending the right parameters to your browser. I got this working GREAT - but it was quite a while ago, I'll help if I can.

 

-Tai

Link to comment
Share on other sites

I am very excited about getting this valuable contribution running. i have made all of the mods to the files, uploaded them, modified the database etc. i am able to input the tracking number in the admin area and it goes into the database but i am not seeing the track butoon on the account_history or any other screen. so i am unable to do any tracking whatsoever. i have checked and recheck my code with beyond compare and now i need some help please.

 

thanks,

 

Scott

Link to comment
Share on other sites

  • 3 months later...

Hi All,

 

I'm getting this error:

Parse error: parse error, unexpected T_ELSE in /home/tcclothi/public_html/shop/admin/categories.php on line 902

 

Here's the code (Line 902 with <------):

 

<?php

}

 

$products_count = 0;

if (isset($HTTP_GET_VARS['search'])) {

$products_query = tep_db_query("select p.products_id, pd.products_name,

p.products_quantity, p.products_image, p.products_image_2, p.products_image_3,

p.products_price, p.products_date_added, p.products_last_modified, p.products_date_available,

p.products_status, p2c.categories_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . "

pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_id = pd.products_id and pd.language_id =

'" . (int)$languages_id . "' and p.products_id = p2c.products_id and pd.products_name like

'%" . tep_db_input($search) . "%' order by pd.products_name");

} else {

$products_query = tep_db_query("select p.products_id, pd.products_name,

p.products_quantity, p.products_image, p.products_image_2, p.products_image_3,

p.products_price, p.products_date_added, p.products_last_modified, p.products_date_available,

p.products_status from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " .

TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_id = pd.products_id and pd.language_id = '" .

(int)$languages_id . "' and p.products_id = p2c.products_id and p2c.categories_id = '" .

(int)$current_category_id . "' order by pd.products_name");

 

} else { <-----LINE 902

 

$products_query = tep_db_query("select p.products_id, pd.products_name, p.products_quantity, p.products_image, p.products_price, p.products_date_added, p.products_last_modified, p.products_date_available, p.products_status from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and p.products_id = p2c.products_id and p2c.categories_id = '" . (int)$current_category_id . "' order by pd.products_name");

}

 

Any help would greatly be appreciated! Thanks!

 

P.S. I tried removing the semicolon on the line above 902 but then got the following error:

 

Parse error: parse error, unexpected '}'

Link to comment
Share on other sites

  • 3 months later...

Version: UPS_XML_Tracking-2.2_finalMS2

Page: tracking.php

Error Message:

 

"This module supports only xpci version 1.0001 of the UPS Tracking Interface. Please contact the webmaster for additional assistance."

 

I've inputted my XML Access Key and I'm currently logged into the UPS site, so I know it works. Any idea what this error message is? Output page shows up fine, but no tracking info, and the error message above.

 

Thanks!

Link to comment
Share on other sites

  • 8 months later...
  • 4 months later...
Also is it possible to have it automatically look up the customer's tracking information? Such as if they just entered their e-mail address and/or zipcode?

 

Here's an example:

http://www.teamson.com/tracking.html

 

That code is straight through UPS, it does not connect to the customers database. You have to look at UPS's website on how to use it on your site.

Link to comment
Share on other sites

I use this contribution for years, works fine no problem.

 

But we have now a special discount from UPS, so I want the possibility that I can reduce the UPS shipping cost with a %.

 

How do I set this up easily.

 

Just a little hack in this UPS script is no problem if I can change the % hardcoded also no problem.

 

If someone help me to the right direction that shoot be great...thanks

Link to comment
Share on other sites

  • 2 months later...
I installed your contribution on a MS2 site, and the tracking page loads as it should. When you enter a tracking number, and submit the number....the main tracking.php page just reloads. It doesn't do anything. Any ideas?

 

Thanks,

-Chris

 

 

Chris,

 

Did you ever get this to work?

Do or Do Not, there is no try.

Link to comment
Share on other sites

  • 1 month later...

Okay - So I have spent all day with this mod. Modding all the php files. I have three problems that I am aware of:

 

1: If you go to http://www.hosecity.com/tracking.php and key in a tracking number - nothing happens.

2: If a customer looks at an order and they click on the tracking number it opens a blank pop-up so the pop-up and the customer tracking doesn't work at all.

3: In my admin page, when I look at an order, at the top it shows "// begin UPS XML Tracking // end UPS XML Tracking" right above the word "Orders" at the top. So obviously something is messed up somewhere but I'm not sure where to being. The tracking numbers are being saved so that's good but it doesn't do any good if it doesn't really work

 

Honestly, out of all the mods I've installed (fast and easy cross sell, the quantity discount by item and the ups xml rate) this was the LEAST documented (or user friendly.) Not sure why - all the others have worked great! The UPS XML Rate works so obviously I have a login and XML number.

 

ANYONE PLEASE?

 

Where to begin?

 

Thanks,

 

Benjamin

Edited by becatlibra
Link to comment
Share on other sites

Okay - So I have spent all day with this mod. Modding all the php files. I have three problems that I am aware of:

 

1: If you go to http://www.hosecity.com/tracking.php and key in a tracking number - nothing happens.

2: If a customer looks at an order and they click on the tracking number it opens a blank pop-up so the pop-up and the customer tracking doesn't work at all.

3: In my admin page, when I look at an order, at the top it shows "// begin UPS XML Tracking // end UPS XML Tracking" right above the word "Orders" at the top. So obviously something is messed up somewhere but I'm not sure where to being. The tracking numbers are being saved so that's good but it doesn't do any good if it doesn't really work

 

Honestly, out of all the mods I've installed (fast and easy cross sell, the quantity discount by item and the ups xml rate) this was the LEAST documented (or user friendly.) Not sure why - all the others have worked great! The UPS XML Rate works so obviously I have a login and XML number.

 

ANYONE PLEASE?

 

Where to begin?

 

Thanks,

 

Benjamin

 

Okay - I went through all the files again -- apparently the <?php and ?> before and after the // begin XML and // end XML are important - how was I to know? Like I said, not really well documented. That fixed problem 3 but the other 2 are still issues - the tracking numbers and buttons appear, etc but the popup does NOTHING and the Order Tracker off of the index page does nothing either.

 

HELP PLEASE

 

Thanks

Link to comment
Share on other sites

  • 2 weeks later...

I'm having an issue I can't seem to lick with this. I am running OS Commerce 2.2 with the latest version of this contrib and have gone through this whole thread trying things without much luck. Libcurl is setup to use SSL on the server (Libcurl/7.16.1 OpenSSL/0.9.8e zlib/1.2.3). I get the following error:

 

Warning: Call-time pass-by-reference has been deprecated; If you would like to pass it by reference, modify the declaration of xml_set_object(). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file.

 

I have no control over the php.ini file on the server so I cannot set call-time passby to true (I have read access, but not write- it's a webhost). I've tried adding that file with the changes to my webroot, the catalog root, and the directory the xmldocument.php is residing in, all with no joy. I have found online that removing the "&" statement from the function usually solves this issue, but when I do I get blank tracking pages returned. Popups are allowed for this site, so it is not a popup blocker.

 

Any thoughts anyone?

Link to comment
Share on other sites

I'm having an issue I can't seem to lick with this. I am running OS Commerce 2.2 with the latest version of this contrib and have gone through this whole thread trying things without much luck. Libcurl is setup to use SSL on the server (Libcurl/7.16.1 OpenSSL/0.9.8e zlib/1.2.3). I get the following error:

 

Warning: Call-time pass-by-reference has been deprecated; If you would like to pass it by reference, modify the declaration of xml_set_object(). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file.

 

I have no control over the php.ini file on the server so I cannot set call-time passby to true (I have read access, but not write- it's a webhost). I've tried adding that file with the changes to my webroot, the catalog root, and the directory the xmldocument.php is residing in, all with no joy. I have found online that removing the "&" statement from the function usually solves this issue, but when I do I get blank tracking pages returned. Popups are allowed for this site, so it is not a popup blocker.

 

Any thoughts anyone?

 

No thoughts - sorry - but hey, i did get my issue fixed! Switched hosts to mindonthenet.com instead of freakin' web.com (who told me the problem was something to do with curl and that I didn't have permissions and I needed to pay 50 dollars a month for the right plan!)

 

Although my problem was nothing like yours I will offer you this:

 

I contacted the actual developer of this mod and he said he hadn't really touched it in years and I never got a response on here for my question so I hope you have better luck that I did.

 

Regards,

 

Benjamin

Link to comment
Share on other sites

  • 1 month later...

hi and thank you for the contri its very good idea...

ok i made all the instlaltion as in the contrib i find small problem corrected when i load Admin/order.php the one posted here in te convesatin and sort problem out now al ok i can post Tracking inaccount history i can see track button but when i clik get white pop up page and nothing else and in account hiory info i see tracknumber when clck nothing happened in the IE Explorer bar down i see ERROr in Page .....?

alos in my shop front page tracking.php nothing shows i add track number and click to track no ressult i go back to the page tarcking.php with no result ........

 

you can look here https://www.promosat.eu/shop/tracking.php

 

any help l aperciates

 

note that i add XML keys and all the setting in place .......

Link to comment
Share on other sites

hi and thank you for the contri its very good idea...

ok i made all the instlaltion as in the contrib i find small problem corrected when i load Admin/order.php the one posted here in te convesatin and sort problem out now al ok i can post Tracking inaccount history i can see track button but when i clik get white pop up page and nothing else and in account hiory info i see tracknumber when clck nothing happened in the IE Explorer bar down i see ERROr in Page .....?

alos in my shop front page tracking.php nothing shows i add track number and click to track no ressult i go back to the page tarcking.php with no result ........

 

you can look here https://www.promosat.eu/shop/tracking.php

 

any help l aperciates

 

note that i add XML keys and all the setting in place .......

 

I believe the problem is your host not supporting CLI Curl - that was the same problem I had (see my post above) - speak with your hosting company or if you are hosting yourself then I guess you are on your own with this. Not sure what you sell there but it doesn't exactly look legit, if you know what I mean

Link to comment
Share on other sites

I believe the problem is your host not supporting CLI Curl - that was the same problem I had (see my post above) - speak with your hosting company or if you are hosting yourself then I guess you are on your own with this. Not sure what you sell there but it doesn't exactly look legit, if you know what I mean
i thanmk you fo your reply but i have CURL installed on my server

 

curl

CURL support enabled

CURL Information libcurl/7.15.3 OpenSSL/0.9.7a zlib/1.2.1.2 libidn/0.5.6

 

so i think other things thats sto contrib from working

Link to comment
Share on other sites

  • 3 months later...

I installed UPS XML Tracking 2.2.1 Final on osCommerce-2.2RC2a, and works fine.

 

One thing I noticed missing is that it never appends UPS tracking code in the notification email sent to the customer. Does it really not append the tracking code in the email? Or, did I miss any configuration setting? I have added codes to include the tracking info in the email with the option to do so or not.

 

Please let me know if it already had that functionality. If it didn't, I'll submit my updates to the contribution. :rolleyes:

Edited by kevinha
Link to comment
Share on other sites

  • 11 months later...

hi

 

i got this error at the tracking page. Can some1 advise.

 

Fatal error: Cannot redeclare class XMLDocument in /*****/includes/classes/xmldocument.php on line 18

 

I'm on OSC v2.2 RC2 with STS installed, UPS XML Rates and UPS XML Tracking.

 

Any advise is greatly appreciated. Thanks!

Link to comment
Share on other sites

hi

 

i got this error at the tracking page. Can some1 advise.

 

Fatal error: Cannot redeclare class XMLDocument in /*****/includes/classes/xmldocument.php on line 18

 

I'm on OSC v2.2 RC2 with STS installed, UPS XML Rates and UPS XML Tracking.

 

Any advise is greatly appreciated. Thanks!

 

i had solve this problem. however when i enter the track no. at tracking.php, nothing happens. when i'm at account_history.php and click on the track button, the pop up show nothing as well.

 

can some1 tell me what the problem?

 

pls pls pls

!!

Link to comment
Share on other sites

  • 1 year later...

i had solve this problem. however when i enter the track no. at tracking.php, nothing happens. when i'm at account_history.php and click on the track button, the pop up show nothing as well.

 

can some1 tell me what the problem?

 

pls pls pls

!!

 

I had this issue as well, I traced it back to the fact that the form variables from the post were not being initialized in the /includes/classes/tracking.php file

 

To solve it I added the following 2 lines to /includes/classes/tracking.php right at the top under the <?php

 

$tracknum=$_POST['tracknum'];

$action=$_POST['action'];

 

 

This will tell the classes tracking php script to initialize the tracknum and action post variables in the script.

Link to comment
Share on other sites

I had this issue as well, I traced it back to the fact that the form variables from the post were not being initialized in the /includes/classes/tracking.php file

 

To solve it I added the following 2 lines to /includes/classes/tracking.php right at the top under the <?php

 

$tracknum=$_POST['tracknum'];

$action=$_POST['action'];

 

 

This will tell the classes tracking php script to initialize the tracknum and action post variables in the script.

 

This only works so far for /catalog/tracking.php and not the pop-up links from account_history sections. I suspect the same will need to done for them, but since it is not posting using a form we'll have to parse the URL into variables and then initialize them properly.

Link to comment
Share on other sites

This only works so far for /catalog/tracking.php and not the pop-up links from account_history sections. I suspect the same will need to done for them, but since it is not posting using a form we'll have to parse the URL into variables and then initialize them properly.

 

For those of you who are getting the error:

 

10002 Failure Hard The xml document is well formed but is not valid:

 

-----------

 

In /includes/classes/tracking.php replace:

-------

$accessRequestHeader =

 

"<?xml version=\"1.0\"?>\n".

 

"<AccessRequest xml:lang=\"en-US\">\n".

 

" <AccessLicenseNumber>". $access_key ."</AccessLicenseNumber>\n".

 

" <UserId>". $userid ."</UserId>\n".

 

" <Password>". $pass ."</Password>\n".

 

"</AccessRequest>\n";

 

$trackingServiceSelectionRequestHeader =

 

"<?xml version=\"1.0\"?>\n".

 

"<TrackRequest xml:lang=\"en-US\">\n".

 

" <Request>\n".

 

" <TransactionReference>\n".

 

" <CustomerContext>UPS Package Tracking</CustomerContext>\n".

 

" <XpciVersion>1.0001</XpciVersion>\n".

 

" </TransactionReference>\n".

 

" <RequestAction>Track</RequestAction>\n".

 

" <RequestOption>" . $activity . "</RequestOption>\n".

 

" </Request>\n";

 

if (isset($show) && $show == 'detail' || $c == '1') {

 

$trackingServiceSelectionRequestHeader .=

 

" <TrackingNumber>" . $tracknum . "</TrackingNumber>\n" .

 

"</TrackRequest>\n";

 

} else {

 

$shipID = 1;

 

$trackingServiceSelectionRequestHeader .=

 

" <ShipmentIdentificationNumber>" . $tracknum . "</ShipmentIdentificationNumber>\n" .

 

"</TrackRequest>\n";

 

}

 

-------

 

with:

 

-------

$accessRequestHeader =

"<?xml version=\"1.0\"?>\n".

"<AccessRequest xml:lang=\"en-US\">\n".

" <AccessLicenseNumber>". $access_key ."</AccessLicenseNumber>\n".

" <UserId>". $userid ."</UserId>\n".

" <Password>". $pass ."</Password>\n".

"</AccessRequest>\n";

$trackingServiceSelectionRequestHeader =

"<?xml version=\"1.0\"?>\n".

"<TrackRequest xml:lang=\"en-US\">\n".

" <Request>\n".

" <TransactionReference>\n".

" <CustomerContext>UPS Package Tracking</CustomerContext>\n".

" <XpciVersion>1.0001</XpciVersion>\n".

" </TransactionReference>\n".

" <RequestAction>Track</RequestAction>\n".

" <RequestOption>" . $activity . "</RequestOption>\n".

" </Request>\n";

if (isset($show) && $show == 'detail' || $c == '1') {

$trackingServiceSelectionRequestHeader .=

" <TrackingNumber>" . $tracknum . "</TrackingNumber>\n" .

"</TrackRequest>\n";

} else {

$shipID = 1;

$trackingServiceSelectionRequestHeader .=

" <ShipmentIdentificationNumber>" . $tracknum . "</ShipmentIdentificationNumber>\n" .

"</TrackRequest>\n";

}

-------

 

This fixed the issue for me.

Link to comment
Share on other sites

Ok I have revised the code to initialize the form variables now for both /catalog/tracking.php and the popup-tracker.php files.

 

On /includes/classes/tracking.php place the following code right under the opening <?php

 

----------------------------------------------------------

 

$tracknum=$_POST['tracknum'];

$action=$_POST['action'];

$show=$_POST['show'];

$p=$_POST['p'];

 

if (isset($tracknum)) {

 

// print "Method: POST<br>";

// foreach($_POST as $name => $value) {

// print "$name : $value<br>";

// }

 

} else {

$tracknum=$_GET['tracknum'];

$action=$_GET['action'];

$show=$_GET['show'];

$p=$_GET['p'];

 

// print "Method: GET<br>";

// foreach($_GET as $name => $value) {

// print "$name : $value<br>";

// }

}

 

--------------------------------------------------------------

 

Do not copy my ----- lines they are there for comment purposes only.

 

Feel free to remove my debug commented out lines starting with //

 

Feel free to optimize.

 

This fixed all the issues, it took a while but it now works perfectly.

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