web-engel@gmx.de Posted July 21, 2008 Share Posted July 21, 2008 now my curl code, which doesn't work: ----------------------------------------------------------------------------------------------------- $ch = curl_init(); // Login curl_setopt($ch, CURLOPT_URL, "https://nolb.dhl.de/nextt-online-business/jsp/loginCheckAction.do"); curl_setopt($ch, CURLOPT_FAILONERROR, 1); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE); curl_setopt($ch, CURLOPT_TIMEOUT, 6); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_COOKIEJAR, DIR_FS_CATALOG . 'tmp/' . $cookie_name); curl_setopt($ch, CURLOPT_COOKIEFILE, DIR_FS_CATALOG . 'tmp/' . $cookie_name); curl_setopt($ch, CURLOPT_USERAGENT, $agent); curl_setopt($ch, CURLOPT_URL, "https://nolb.dhl.de/nolb-easylog/directsst.do?"); curl_setopt($ch, CURLOPT_REFERER, "https://nolb.dhl.de/nextt-online-business/jsp/login.do"); curl_setopt($ch, CURLOPT_POSTFIELDS, "v_benutzer=XXXXXXXX&v_passwort=XXXXXXX&v_spr=deu"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $data = curl_exec($ch); if ($error = curl_errno($ch)) { if ($error == 7) { die(TRACKING_CURL_SERVER_ERROR); } if ($error == 6) { die(TRACKING_CURL_NO_ACTIVE_INTERNET); } } curl_close($ch); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, 'https://nolb.dhl.de/nextt-online-business/jsp/nol/piece/pieceSearchCheckAction.do'); curl_setopt($ch, CURLOPT_FAILONERROR, 1); curl_setopt($ch, CURLOPT_TIMEOUT, 6); curl_setopt($ch, CURLOPT_COOKIEJAR, DIR_FS_CATALOG . 'tmp/' . $cookie_name); curl_setopt($ch, CURLOPT_COOKIEFILE, DIR_FS_CATALOG . 'tmp/' . $cookie_name); curl_setopt($ch, CURLOPT_USERAGENT, $agent); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_HEADER, true); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_REFERER, 'https://nolb.dhl.de/nextt-online-business/jsp/nol/piece/pieceDetails.do'); curl_setopt($ch, CURLOPT_POSTFIELDS, 'shipmentCode=XXXXXXXXXXXXXXXX&search_ta= Start '); curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); $grab_data = curl_exec($ch); if ($error = curl_errno($ch)) { if ($error == 7) { die(TRACKING_CURL_SERVER_ERROR); } if ($error == 6) { die(TRACKING_CURL_NO_ACTIVE_INTERNET); } } curl_close($ch); ----------------------------------------------------------------------------------------------------- Important: To use the DHL enquiry, you must have a DHL account. XXXXXX = user account. Are you an idea, how it could work ? thanks Quote Link to comment Share on other sites More sharing options...
chris23 Posted July 29, 2008 Author Share Posted July 29, 2008 Thanks for the info on Protx, but this is a payment processing company. I just want to use my own PDQ machine and manually put the payment through, I only take about 10 payments a week. I would strongly urge you to reconsider collecting credit card numbers for offline use: 1. oscommerce doesn't have a built-in method for storing the credit card numbers in an encrypted form. 2. Your merchant services provider will almost certainly prohibit you from processing card numbers obtained via the internet, unless you can demonstrate full PCI compliance, something you won't be able to demonstrate. 3. The fines from the credit card companies levied if card numbers collected and stored by you are compromised are huge (from memory Visa can fine upto £500,000 per event) With regard to your tracking module, just can't seem to get it to work. what directory would you suggest to put the .ini file? As from what I read it has to go in the directory with the module?? As I said earlier, I'm out of my depth with phpsuexec but you need a copy of the custom php.ini in each folder running a php script, so this may include includes/classes as well as root. Quote Please use forum for support rather than PM - PMs unrelated to my contributions will be ignored. Google Site Search is your friend My contributions: Tracking Module | PDF Customer Invoice | Subcategory textboxes Link to comment Share on other sites More sharing options...
chris23 Posted July 29, 2008 Author Share Posted July 29, 2008 Would you care to work on a dhl shipping version? I'm fully at your disposal and give any DHL parameters if you need. thanks mattis Mattis, Please PM me for my email address so you can send over your work so far. I'll have a look over it and get back to you. Rgds, Chris Quote Please use forum for support rather than PM - PMs unrelated to my contributions will be ignored. Google Site Search is your friend My contributions: Tracking Module | PDF Customer Invoice | Subcategory textboxes Link to comment Share on other sites More sharing options...
jeremyisherwood Posted July 30, 2008 Share Posted July 30, 2008 Firstly, you can see if register_long_arrays is enabled in Admin -> Tools - > Server Info. Pls check this first. Secondly, I don't use PHPsuexec but: If a server's default php.ini settings need to be overridden, then each folder that contains any PHP scripts must contain a custom php.ini file, which is used to override the server's php.ini settings. Directories can't have more than 755 permissions Files can't have more than 644 permissions The entry for register_long_arrays in a sample, custom php.ini: register_long_arrays = On I'd strongly recommend either a forum search on phpsuexec or a google search on oscommerce phpsuexec to check for other issues you may encounter. You'll probably get answers from people with more PHP/CGI experience. You'll certainly need different directory permissions to those stated in the osc documentation. Your hosting providers help system should also offer phpsuexec advice specific to your hosting environment. Very subjective question - I've always used Protx Direct v2.2. Never had a problem with the module which is well written and supported. I have integrated it with Streamline, Barclays and HSBC (3DSecure enabled on all). You'll got lots of different answers depending on who you ask. HTH Chris Hi Chris, well I have installed a php.ini file in every location that your script has been installed, including the root directory and I'm still having the same issue. Do you have any other ideas? Thanks. Jeremy. Quote Thanks for looking and any help you can offer. Jeremy Isherwood Link to comment Share on other sites More sharing options...
John Doswell Posted July 31, 2008 Share Posted July 31, 2008 (edited) hi there, i am trying to use the dpd.co.uk module fpr the german dpd.net... i have changed to settings to the new url and also adjusted the value from 10 digits to 14 digits! in admin side i get error: please try again later... in catalog side i only get: please wait then Tracking History [x] Close the tracking url is http://extranet.dpd.de/cgi-bin/delistrack?...ng=de&pknr= how can i get this to work!??? where can i find out about the regular expression /^d{10}$/ if they are right? is the problem the regular expressions??? thank you for your help!!! greetz john Edited July 31, 2008 by RobinsonDixon Quote Link to comment Share on other sites More sharing options...
matchattaxoutlet Posted July 31, 2008 Share Posted July 31, 2008 Hi Guys, Just installed this module, with Royal Mail Track and Trace v1.3 - I am well impressed with it. Well Done :) However I have a couple of snags on the admin side of things. When I come to update an order with just some text, i.e: Your order has been passed to our picking team. When I click update I get the following error. Warning: constant() [function.constant]: Couldn't find constant EMAIL_NOTIFICATION_ in /homepages/43/dxxxxxxxx/htdocs/includes/classes/tracking_module.php on line 186 Warning: Cannot modify header information - headers already sent by (output started at /homepages/43/dxxxxxxxxx/htdocs/includes/languages/english/tracking_module.php:41) in /homepages/43/dxxxxxxxxx/htdocs/admin/includes/functions/general.php on line 121 However when I go back to the order it has updated the database and sent out the email (I tried this on a test order with myself) Also, when I update the Track and Trace data, the same thing happens but with a different error. Warning: Cannot modify header information - headers already sent by (output started at /homepages/43/dxxxxxxxxx/htdocs/includes/languages/english/tracking_module.php:41) in /homepages/43/dxxxxxxxxx/htdocs/admin/includes/functions/general.php on line 121 Again when I go back to the order the details are there and the rest of the contribuition works ok. Have I missed a part of the instructions, I will be going back over them either tonight or tomorrow just to double check. Any help would be greatly appreciated. Regards, Martin Quote Match Attax Outlet The Premier Football Card Store Link to comment Share on other sites More sharing options...
John Doswell Posted July 31, 2008 Share Posted July 31, 2008 ok, fixed it, i changed $StartGrab = '<html>'; $EndGrab = '</html>'; now it works in account info page, but not in admin :( and also i have ü ö in the output... i see if i can remove that... greetz john Quote Link to comment Share on other sites More sharing options...
matchattaxoutlet Posted August 1, 2008 Share Posted August 1, 2008 Some further information to my first post. I have checked for whitespaces in the files mentioned in the header errors - and there is none. Also, OSC Version and Server Info below: PHP Version: 4.4.8 (Zend: 1.3.0) Database: MySQL 4.0.27-max-log osC Version: v2.2 RC2a Any more info? Quote Match Attax Outlet The Premier Football Card Store Link to comment Share on other sites More sharing options...
hobbynet Posted August 1, 2008 Share Posted August 1, 2008 Hi, I'm trying to integrate this great contribution. Everything works find - but: 1) I tryed to enter a tracking-id within an order and then click on "update" 2) now I got an error: Fatal error: Call to a member function on a non-object in ../admin/orders.php on line 118 The line within "orders.php" that fire the error looks like: $email = STORE_NAME . "\n" . EMAIL_SEPARATOR . "\n" . EMAIL_TEXT_ORDER_NUMBER . ' ' . $oID . "\n" . EMAIL_TEXT_INVOICE_URL . ' ' . tep_catalog_href_link(FILENAME_CATALOG_ACCOUNT_HISTORY_INFO, 'order_id=' . $oID, 'SSL') . "\n" . EMAIL_TEXT_DATE_ORDERED . ' ' . tep_date_long($check_status['date_purchased']) . "\n\n" . sprintf(EMAIL_TEXT_STATUS_UPDATE, $orders_status_array[$status]) . $notify_comments . ----> this is the error line : $tracking->email_add_tracking() . "\n\n" . // added tracking_module sprintf(EMAIL_TEXT_STATUS_UPDATE2); It seems, that the called function ins't present within the tracking_module.php but the function is there ;-(( I also tryed to call other function but I got the same error. Are there others with the same error? Have somebody a solution about? Any ideas are welcome kind regards peter Quote Link to comment Share on other sites More sharing options...
chris23 Posted August 7, 2008 Author Share Posted August 7, 2008 Some further information to my first post. I have checked for whitespaces in the files mentioned in the header errors - and there is none. Also, OSC Version and Server Info below: PHP Version: 4.4.8 (Zend: 1.3.0) Database: MySQL 4.0.27-max-log osC Version: v2.2 RC2a Any more info? Have you added the language entries for the Royal Mail module to includes/languages/english/tracking_module.php? The headers sent bit is almost certainly some whitespace somewhere in one of the language files. Quote Please use forum for support rather than PM - PMs unrelated to my contributions will be ignored. Google Site Search is your friend My contributions: Tracking Module | PDF Customer Invoice | Subcategory textboxes Link to comment Share on other sites More sharing options...
chris23 Posted August 7, 2008 Author Share Posted August 7, 2008 Hi, I'm trying to integrate this great contribution. Everything works find - but: 1) I tryed to enter a tracking-id within an order and then click on "update" 2) now I got an error: Fatal error: Call to a member function on a non-object in ../admin/orders.php on line 118 The line within "orders.php" that fire the error looks like: $email = STORE_NAME . "\n" . EMAIL_SEPARATOR . "\n" . EMAIL_TEXT_ORDER_NUMBER . ' ' . $oID . "\n" . EMAIL_TEXT_INVOICE_URL . ' ' . tep_catalog_href_link(FILENAME_CATALOG_ACCOUNT_HISTORY_INFO, 'order_id=' . $oID, 'SSL') . "\n" . EMAIL_TEXT_DATE_ORDERED . ' ' . tep_date_long($check_status['date_purchased']) . "\n\n" . sprintf(EMAIL_TEXT_STATUS_UPDATE, $orders_status_array[$status]) . $notify_comments . ----> this is the error line : $tracking->email_add_tracking() . "\n\n" . // added tracking_module sprintf(EMAIL_TEXT_STATUS_UPDATE2); It seems, that the called function ins't present within the tracking_module.php but the function is there ;-(( I also tryed to call other function but I got the same error. Are there others with the same error? Have somebody a solution about? Any ideas are welcome kind regards peter This is very odd. My first thought was you hadn't created a tracking module object at the top of orders.php but then you wouldn't have the input boxes displayed. I assume you're entering the tracking id into an input box and not the generic "Comments" box? Quote Please use forum for support rather than PM - PMs unrelated to my contributions will be ignored. Google Site Search is your friend My contributions: Tracking Module | PDF Customer Invoice | Subcategory textboxes Link to comment Share on other sites More sharing options...
matchattaxoutlet Posted August 8, 2008 Share Posted August 8, 2008 Have you added the language entries for the Royal Mail module to includes/languages/english/tracking_module.php? The headers sent bit is almost certainly some whitespace somewhere in one of the language files. I have checked the language file and the /includes/classes/tracking_module.php and found an inconsistency between the names - I changed the tracking_module.php to the same constant name and the error I now get is: Warning: constant() [function.constant]: Couldn't find constant If you would like to track your parcel online using Royal Mail's Track & Trace™ facility, you can do this by either logging in via our website and viewing your order history using the link above or alternatively, follow the link below: in /homepages/43/d235548627/htdocs/includes/classes/tracking_module.php on line 186 Any quick thoughts? I'll have another dig around the files. Quote Match Attax Outlet The Premier Football Card Store Link to comment Share on other sites More sharing options...
chris2403 Posted August 9, 2008 Share Posted August 9, 2008 I Am haveing a bit of trouble with this and the royal mail tracking plugin 1.3 (i think thats the one), when i update an order with a tracking number it says order status updated ok but it dosent save the traking number, instead it says "No tracking ID applicable", i chacked the database and the field is there but it is blank. The second problem, i added the tracking number manually to the database using phpmyadmin so it shows up in the order history but when i click on it it says error calling the tracking script please try again later. any ideas? regards chris Quote Link to comment Share on other sites More sharing options...
matchattaxoutlet Posted August 13, 2008 Share Posted August 13, 2008 Found what the issue was, I reinstalled the Classes patch and everythings working great now. Thanks for you help and keep up the good work on this fantastic contrib :D Quote Match Attax Outlet The Premier Football Card Store Link to comment Share on other sites More sharing options...
ssnb Posted August 21, 2008 Share Posted August 21, 2008 Hi Chris I have foundyour contribution and would like to install it for our site. We use Fastway couriers in New Zealand. I notice on your osCommerce Resources page that someone has already registered FC for the above - but there is no contribution listed for Fastways - I was wondering (hoping) you might know who has written the Fastway contrib? Or does anyone reading this have the Fastway Courier (NZ) contribution that I coul geta copy of? Thanks in advance Sol Quote Link to comment Share on other sites More sharing options...
PAO1908 Posted August 24, 2008 Share Posted August 24, 2008 Hi all. Very very nice contribution, works now also in my shop. Thank you ! One question remained and I cant solve it: The results of the tracking are all in english language, f.e. the tracking of a swiss post parcel gives the following output: Deciphered address of delivery:5223 Riniken Basic services:PostPac PriorityAdditional services:SIWeight:0.58 kg Date Time Status Postcode Town 22.08.2008 19:30 sorted in 4620 H�rkingen Paketzentrum My question is now: Where can I change f.e. Deciphered address of delivery ? Checked all the files but I was unable to find the place where the files have to be changed... Thanks for any help Alekos Quote Link to comment Share on other sites More sharing options...
PAO1908 Posted August 24, 2008 Share Posted August 24, 2008 Hi all. Very very nice contribution, works now also in my shop. Thank you ! One question remained and I cant solve it: The results of the tracking are all in english language, f.e. the tracking of a swiss post parcel gives the following output: Deciphered address of delivery:5223 Riniken Basic services:PostPac PriorityAdditional services:SIWeight:0.58 kg Date Time Status Postcode Town 22.08.2008 19:30 sorted in 4620 H�rkingen Paketzentrum My question is now: Where can I change f.e. Deciphered address of delivery ? Checked all the files but I was unable to find the place where the files have to be changed... Thanks for any help Alekos Im getting closer to the problem. It seems to me that the swiss post addon tracks via the english swiss post site.... so I have to find out how to change it that it tracks the german site... Regards Quote Link to comment Share on other sites More sharing options...
PAO1908 Posted August 24, 2008 Share Posted August 24, 2008 Im getting closer to the problem. It seems to me that the swiss post addon tracks via the english swiss post site.... so I have to find out how to change it that it tracks the german site... Regards ok, found this in /includes/modules/tracking/swisspost.php tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('Swisspost tracking GET url', 'TRACKING_GET_URL_SP', 'https://www.post.ch/EasyTrack/submitParcelData.do?domain=www.post.ch&defaultLanguage=de&reference=/swisspost-tracking&formattedParcelCodes=', 'Full GET url to call Swisspost''s tracking - DO NOT EDIT', '777', '0', '', now())"); but this is set to defaultlanguage=de Even if I change it f.e. to =fr nothing changes.... any ideas ? Quote Link to comment Share on other sites More sharing options...
PAO1908 Posted August 24, 2008 Share Posted August 24, 2008 ok, found this in /includes/modules/tracking/swisspost.php tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('Swisspost tracking GET url', 'TRACKING_GET_URL_SP', 'https://www.post.ch/EasyTrack/submitParcelData.do?domain=www.post.ch&defaultLanguage=de&reference=/swisspost-tracking&formattedParcelCodes=', 'Full GET url to call Swisspost''s tracking - DO NOT EDIT', '777', '0', '', now())"); but this is set to defaultlanguage=de Even if I change it f.e. to =fr nothing changes.... any ideas ? ok, found it. To change swisspost.php was really dumb :) this changes nothing in the database, and there you have to change this value... So: Open database, go into table configuration, there you have to edit the configuration for Swisspost tracking GET url and then change it from: https://www.post.ch/EasyTrack/submitParcelD...tedParcelCodes= to https://www.post.ch/EasyTrack/submitParcelD...tedParcelCodes= so defaultLanguage=de becomes to lang=de And everything works in german now :) Have a nice sunday :) Quote Link to comment Share on other sites More sharing options...
displacement101 Posted August 26, 2008 Share Posted August 26, 2008 Hi guys! I've read through the entire thread and I can't seem to find the answers I am looking for. I have a few questions. TRACKING_REGEXP How exactly do you find this information out? TRACKING_GET_URL Only URL I can find, would be: online tracking link = http://www.ems.com.cn/qcgzOutQueryAction.d...ode=gotoSearchE Sample tracking # EB123456789CN Not sure what to put for the location for the curls, either. Any help would be great. Thanks in advance, Mikey Quote Link to comment Share on other sites More sharing options...
displacement101 Posted August 26, 2008 Share Posted August 26, 2008 Hi guys! I've read through the entire thread and I can't seem to find the answers I am looking for. I have a few questions. TRACKING_REGEXP How exactly do you find this information out? TRACKING_GET_URL Only URL I can find, would be: online tracking link = http://www.ems.com.cn/qcgzOutQueryAction.d...ode=gotoSearchE Sample tracking # EB123456789CN Not sure what to put for the location for the curls, either. Any help would be great. Thanks in advance, Mikey I am also getting this error: Fatal error: Cannot redeclare class ems in /home/xx/public_html/includes/modules/tracking/ems.php on line 37 Line 37 - 45 are below: class EMS { var $code, $title, $description, $enabled; // class constructor function EMS() { $this->code = 'EMS'; $this->title = MODULE_TRACKING_EMS_TEXT_TITLE; $this->description = MODULE_TRACKING_EMS_TEXT_DESCRIPTION; } Quote Link to comment Share on other sites More sharing options...
chris23 Posted August 26, 2008 Author Share Posted August 26, 2008 Hi Chris I have foundyour contribution and would like to install it for our site. We use Fastway couriers in New Zealand. I notice on your osCommerce Resources page that someone has already registered FC for the above - but there is no contribution listed for Fastways - I was wondering (hoping) you might know who has written the Fastway contrib? Or does anyone reading this have the Fastway Courier (NZ) contribution that I coul geta copy of? Thanks in advance Sol Hi, I did get asked by the person who registered the Fastways code to have a quick look at the Fastways tracking system. Unfortunately, at the time I looked (three months ago), Fastways were using a really dumb (Dreamweaver) JavaScript detection script to redirect to their search results. cURL, as used by the contribution, cannot handle JavaScript redirects (it has no JavaScript engine), so the tracking results fail. Unless FW get rid of this silliness, then there won't be a tracking module. Sorry. This is a shame as FW seem really popular in AUS and NZ and increasingly in the UK. Chris Quote Please use forum for support rather than PM - PMs unrelated to my contributions will be ignored. Google Site Search is your friend My contributions: Tracking Module | PDF Customer Invoice | Subcategory textboxes Link to comment Share on other sites More sharing options...
chris23 Posted August 26, 2008 Author Share Posted August 26, 2008 Hi guys! I've read through the entire thread and I can't seem to find the answers I am looking for. I have a few questions. TRACKING_REGEXP How exactly do you find this information out? TRACKING_GET_URL Only URL I can find, would be: online tracking link = http://www.ems.com.cn/qcgzOutQueryAction.d...ode=gotoSearchE Sample tracking # EB123456789CN Not sure what to put for the location for the curls, either. Any help would be great. Thanks in advance, Mikey Mikey, The developers' documentation and the sample modules should give you the answers to your questions. The regexp is a standard regular expression (with a slight syntax change to cater for backslashes in the database) to match the valid tracking IDs for your courier. Not wishing to put you off, but if you're not sure how to write a regexp then you probably shouldn't try to write the rest of a module as the regexp is the easy part. Likewise, the tracking url should be easy. This is the address you put in the browser address bar to query for your tracking information. HTH Chris Quote Please use forum for support rather than PM - PMs unrelated to my contributions will be ignored. Google Site Search is your friend My contributions: Tracking Module | PDF Customer Invoice | Subcategory textboxes Link to comment Share on other sites More sharing options...
chris23 Posted August 26, 2008 Author Share Posted August 26, 2008 (edited) ok, found it. To change swisspost.php was really dumb :) this changes nothing in the database, and there you have to change this value... Not entirely true. If you remove the module, edit /includes/modules/tracking/swisspost.php, then reinstall via admin, your change will be made to the database. No need to mess with the database. This was the reason for me writing the contribution - keeping users away from direct database manipulation (this is normally asking for trouble .....) HTH Chris Edited August 26, 2008 by chris23 Quote Please use forum for support rather than PM - PMs unrelated to my contributions will be ignored. Google Site Search is your friend My contributions: Tracking Module | PDF Customer Invoice | Subcategory textboxes Link to comment Share on other sites More sharing options...
displacement101 Posted August 27, 2008 Share Posted August 27, 2008 Mikey, The developers' documentation and the sample modules should give you the answers to your questions. The regexp is a standard regular expression (with a slight syntax change to cater for backslashes in the database) to match the valid tracking IDs for your courier. Not wishing to put you off, but if you're not sure how to write a regexp then you probably shouldn't try to write the rest of a module as the regexp is the easy part. Likewise, the tracking url should be easy. This is the address you put in the browser address bar to query for your tracking information. HTH Chris Hey, no problem Chris. I'm probably worse than a beginner when it comes to php, but I don't want my clients to have to go to another website to track their packages. I'd rather them stay on my website. I'll go though a ass load of trying and error to figure it out. I've read through the samples, I'll just need to keep re-reading it. Thanks! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.