boostin4hp Posted May 24, 2007 Share Posted May 24, 2007 (edited) Ok I guess I should've refreshed browser, woops. . . Works great now. Thanks JanZ! Edited May 24, 2007 by boostin4hp Quote Link to comment Share on other sites More sharing options...
Jan Zonjee Posted May 24, 2007 Share Posted May 24, 2007 to help with testing I found when the whole new part is wrapped in the if not set $pInfo->products_id it completely didn't show even when editing a existing product though it may be just my store since its highly modified. I scratched that and just used your quotes suggestion and it works perfectly now. Yes, the single quotes do help, but you cannot split a product that has not gotten a products_id yet so it has no use. I uploaded the new version tonight (or see previous post). Also the code I used was plain wrong (too hasty).Also I have a quick question, when saving my data in the popup it returns this after I click save is this what you intended it to output? Also if you edit a existing entry and try to save, it doesn't actually inject it into the database you have to delete the entry and add a new one with the new data. See also previous post. I left in some debug code (forgot about it). As far as I can see (after taking that part out) it works fine now (as you just confirmed, thanks for that :) ) Quote Link to comment Share on other sites More sharing options...
budd311 Posted May 25, 2007 Share Posted May 25, 2007 I have just released my own version of the UPS XML Rates and Services Shipping Module. I wanted to release it early to get feedback and bug reports. I dare say I have not tested it on any system but my own, so please consider it very beta.I plan on improving this by extending it to support the more obscure features of the UPS XML gateway, and introduce intelligent product packing for anyone who has installed Tom Croix's Canada Post 3.1 module with dimensional support. Enjoy. Torin... In your instructions it says "Go to the configuration table in your database and change the type for field "set_function" from VARCHAR(255) to TEXT" I am in my databse and am in the Congiuration Table.. when i set the set_function from varchar(255) to TEXT i get this error (after i re-install UPS in the shipping module): "Fatal error: Call to undefined function: tep_cfg_select_multioption() in /home/content/u/n/i/uniquesquared/html/oscommerce/catalog/admin/modules.php(216) : eval()'d code on line 1" Any ideas.... THANK AGAIN IN ADVANCE This is my current Conguration Table parameters after I changed the set_function... configuration_id int (11) No auto_increment configuration_title varchar(64) utf8_general_ci No configuration_key varchar(64) utf8_general_ci No configuration_value varchar(255) utf8_general_ci No configuration_description varchar(255) utf8_general_ci No configuration_group_id int(11) No 0 sort_order int(5) Yes NULL last_modified datetime Yes NULL date_added datetime No 0000-00-00 00:00:00 use_function varchar(255) utf8_general_ci Yes NULL set_function text utf8_general_ci Yes NULL Quote Link to comment Share on other sites More sharing options...
Jan Zonjee Posted May 25, 2007 Share Posted May 25, 2007 "Fatal error: Call to undefined function: tep_cfg_select_multioption() in /home/content/u/n/i/uniquesquared/html/oscommerce/catalog/admin/modules.php(216) : eval()'d code on line 1" That is a new function that has to be added, from the top of my head, to admin/includes/general.php. Follow the instructions! Quote Link to comment Share on other sites More sharing options...
budd311 Posted May 25, 2007 Share Posted May 25, 2007 That is a new function that has to be added, from the top of my head, to admin/includes/general.php. Follow the instructions! Wow - I think I am an idiot.. not sure how this happened... I use dreamweaver to do some of my changes... I do them live on the remote server.. for some reason these files (i.e admin/includes/general.php) on dreamweaver have these changes in them -- the files listed under File Manger in Tools do not... lesson learned.. do not use dreamweaver. Anyways - I made all the changes and I get NO errors .. WOO HOOO However... when i go to checkout.. it takes about 30 seconds then times out...... any thoughts? Thanks. Quote Link to comment Share on other sites More sharing options...
Jan Zonjee Posted May 25, 2007 Share Posted May 25, 2007 However... when i go to checkout.. it takes about 30 seconds then times out...... any thoughts? Here we go again....there is a reason why there is a thread. You can read back about problems others had :) So again, this is probably an issue with the cURL connection. Go to your catalog/includes/modules/shipping/upsxml.php and find the line (around 90) that tells you: // to enable logging, create an empty "upsxml.log" file at the location you set below, give it write permissions (777) and uncomment the next line // $this->logfile = '/tmp/upsxml.log'; Better use a full path like mentioned a few lines further for the error log. Make sure the upsxml.log can be written to by the webserver. Go through the checkout process, see what comes in the log. Could be a certificate thing (cURL error 60, around line 853 is a solution mentioned), could be that your ISP uses a proxy for the secure connection (GoDaddy comes to mind, somewhere in the thread a solution is mentioned). Hard to say at this point, that is why the logging can be useful. Quote Link to comment Share on other sites More sharing options...
budd311 Posted May 25, 2007 Share Posted May 25, 2007 Here we go again....there is a reason why there is a thread. You can read back about problems others had :) So again, this is probably an issue with the cURL connection. Go to your catalog/includes/modules/shipping/upsxml.php and find the line (around 90) that tells you: // to enable logging, create an empty "upsxml.log" file at the location you set below, give it write permissions (777) and uncomment the next line // $this->logfile = '/tmp/upsxml.log'; Better use a full path like mentioned a few lines further for the error log. Make sure the upsxml.log can be written to by the webserver. Go through the checkout process, see what comes in the log. Could be a certificate thing (cURL error 60, around line 853 is a solution mentioned), could be that your ISP uses a proxy for the secure connection (GoDaddy comes to mind, somewhere in the thread a solution is mentioned). Hard to say at this point, that is why the logging can be useful. Thanks for the response - I know I am pain in the you know what....I plan purchasing something off your site (geo-magnet) when this is done.. I feel its the least I can for all your help... I feel I am almost out of the woods... I created a .log file using notepad and uploaded it to the following url : http://www.uniquesquared.com/oscommerce/ca...ping/upsxml.log I am not sure how to make this a 777 - I did some googling and found the following code "-rwxrwxrwx" but don't know what to do with it. Do I need a specific program to make such a log file..i.e. WS_FTP Software? Also, I spoke with Godaddy and then told me that I have cURL and should be all set. So I am not sure what else to do. I uncommented and switched $this->logfile = '/tmp/upsxml.log'; to $this->logfile = '/oscommerce/catalog/includes/modules/shipping/upsxml.log'; . My .log file shows nothing (excpet for the times that I open and close it... I found the GoDaddy Thread (somewhere on page 12).. but the url that is used as a reference appears to be broken...it had to do with IP adrress'.. GoDaddy assured me that everytihng on their end is ok. I am using Paid Host Sharing Linux 2.4.21-47.0.1.ELsmp Database: MySQL 4.1.22-max-log HTTP Server: Apache. If this is of any use, I am still getting this error when I go to checkout as a 'fake' customer: 2013 - Lost connection to MySQL server during query select code, title, symbol_left, symbol_right, decimal_point, thousands_point, decimal_places, value from currencies [TEP STOP] Can't thank you enough for your help. Quote Link to comment Share on other sites More sharing options...
Jan Zonjee Posted May 25, 2007 Share Posted May 25, 2007 Thanks for the response - I know I am pain in the you know what....I plan purchasing something off your site (geo-magnet) when this is done.. I feel its the least I can for all your help... That was supposed to be Torin Walkers website. Never seen it live...I am not sure how to make this a 777 - I did some googling and found the following code "-rwxrwxrwx" but don't know what to do with it. Do I need a specific program to make such a log file..i.e. WS_FTP Software? Depends on the FTP software you use. See if there is any help function with that software and search for things that deal with setting permissions of files or directories. 777 is full access for anyone, so make sure to remove that file and disable logging after everything is working. The "-rwxrwxrwx" has to do with the setting for owner, group, user. The first character says something about being a file or directory, then rwx is about read, write, execute rights for owner, then group, then user. The number 777 represents the same in a different way. Can't reproduce myself how to get to that number but you should be able to find that with a search engine. It is a Unix/Linux thing.Also, I spoke with Godaddy and then told me that I have cURL and should be all set. So I am not sure what else to do. The person you spoke to may not have been totally familiar with how to set up cURL. Yes, you have it but not really standard setup. Try adding the adding the four lines mentioned in this post to the curl_setopt lines around line 879 in the upsxml.php file. Try something like: } else { // default behavior: cURL is assumed to be compiled in PHP $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); // uncomment the next line if you get curl error 60: error setting certificate verify locations //curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); // uncommenting the next line is most likely not necessary in case of error 60 // curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $xmlRequest); curl_setopt($ch, CURLOPT_TIMEOUT, (int)$timeout); // now add the GoDaddy specific stuff: curl_setopt ($ch, CURLOPT_HTTPPROXYTUNNEL, TRUE); curl_setopt ($ch, CURLOPT_PROXYTYPE, CURLPROXY_HTTP); curl_setopt ($ch, CURLOPT_PROXY, "http://64.202.165.130:3128"); curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, FALSE); I uncommented and switched $this->logfile = '/tmp/upsxml.log'; to $this->logfile = '/oscommerce/catalog/includes/modules/shipping/upsxml.log'; . My .log file shows nothing (excpet for the times that I open and close it... Regarding the path, I don't know if the server can find it. Perhaps there should be more stuff in front of it (check any docs or help files for things you have to fill in for a "local path"). That would involve probably something like srv/www/htdocs/your_user_name/ not necessarily in that order. I found the GoDaddy Thread (somewhere on page 12).. but the url that is used as a reference appears to be broken...it had to do with IP adrress'.. GoDaddy assured me that everytihng on their end is ok. See above. Perhaps the IP-address has changed. Ask them specifically about the proxy that needs to be used when using cURL. If this is of any use, I am still getting this error when I go to checkout as a 'fake' customer: 2013 - Lost connection to MySQL server during query select code, title, symbol_left, symbol_right, decimal_point, thousands_point, decimal_places, value from currencies [TEP STOP] Strange error, make sure the "fake" is not totally bogus. Use existing zip codes, correct city, state etc. Otherwise UPS cannot do anything useful with your request. You also entered correct information in the admin (send from zip...)? Quote Link to comment Share on other sites More sharing options...
Firelok Posted May 30, 2007 Share Posted May 30, 2007 I just installed the module but am having a problem getting it working. It has integrated into the admin side just fine, but it completely breaks the checkout page on the customer side. Here is my config for it: United Parcel Service (XML) Enable UPS Shipping False UPS Rates Access Key <removed> UPS Rates Username akashasadmin UPS Rates Password <removed> Pickup Method Suggested Retail Rates (UPS Store) Packaging Type Package Customer Classification Code 04 Shipping Origin US Origin Origin City Killeen Origin State/Province TX Origin Country US Origin Zip/Postal Code 76541 Test or Production Mode Production Unit Weight LBS Unit Length IN Dimensions Support No Quote Type Residential Negotiated rates False UPS Account Number Handling Type Flat Fee Handling Fee 3 Enable Insurance True UPS Currency Code USD Tax Class --none-- Shipping Zone --none-- Sort order of display. 2 Disallowed Shipping Methods --none-- Shipping Delay 1 Email UPS errors No Time in Transit Display Yes Time in Transit View Type Raw When I turn the email errors on, here is what I get: Error from cURL: Error [28]: connect() timed out! experienced by customer with id 9 on 2007-05-29 17:09:41 ----------------------------- UPSXML Rates Error: Rating and Service 1.0001 0 An unknown error occured while attempting to contact the UPS gateway : Rating and Service 1.0001 0 An unknown error occured while attempting to contact the UPS gateway experienced by customer with id 9 on 2007-05-29 17:09:41 ----------------------------- Most of the posts here make me believe that it is something I did wrong during installation, but I'm pretty sure I followed the instructions. Any ideas? Quote Link to comment Share on other sites More sharing options...
30vBiTurbo Posted May 30, 2007 Share Posted May 30, 2007 I'm having the same problem as you "Firelok". ^^^ Let me know if you figure anything out. Quote Link to comment Share on other sites More sharing options...
cherven Posted May 31, 2007 Share Posted May 31, 2007 I am having a problem with the dimentional support.... I added a product that is 75 x 25 x 12, and weighs 47 lbs... and i made it a ready to ship product... but when i goto checkout, the shipping cost is only based off of the 47lbs, not the dimensions... I also tried adding 2 of that same product, and it is marked as ready to ship, but the shipping cost only says "(1 pkg, 94 lbs total) "... it should be 2 packages, right? i tried setting the dimentional support in the UPS XML module to "Ready to ship Only" & "With product dimensions", neather of them work. I dont get any errror or anything, it just dont calculate the weight/packages properly. Any idea what is wrong? Quote Link to comment Share on other sites More sharing options...
Guest Posted May 31, 2007 Share Posted May 31, 2007 I am having a problem with the dimentional support....I added a product that is 75 x 25 x 12, and weighs 47 lbs... and i made it a ready to ship product... but when i goto checkout, the shipping cost is only based off of the 47lbs, not the dimensions... I also tried adding 2 of that same product, and it is marked as ready to ship, but the shipping cost only says "(1 pkg, 94 lbs total) "... it should be 2 packages, right? i tried setting the dimentional support in the UPS XML module to "Ready to ship Only" & "With product dimensions", neather of them work. I dont get any errror or anything, it just dont calculate the weight/packages properly. Any idea what is wrong? Go over your install. Did you forget to add the dimensional support to any of the files? Or accidentally not upload one of the files that should have been updated for the dimensional support? Quote Link to comment Share on other sites More sharing options...
cherven Posted May 31, 2007 Share Posted May 31, 2007 Go over your install. Did you forget to add the dimensional support to any of the files? Or accidentally not upload one of the files that should have been updated for the dimensional support? I just figured it out... For some reason i had to installed the "Split Products" mod for it to work... Quote Link to comment Share on other sites More sharing options...
digitalldesign Posted June 5, 2007 Share Posted June 5, 2007 Hello Friends, I need your help! I have installed module UPS XML 1.2.8.1 version My hosting is in GoDaddy.com I have problems with this module and I read that they said something of GoDaddy.com, I have try it some of the things that I read but I have not had successful results. In checkout_shipping.php the error is: 2013 - Lost connection to MySQL server during query select languages_id, name, code, image, directory from languages order by sort_order [TEP STOP] 2006 - MySQL server has gone away select count(*) as total from sessions where sesskey = 'a71e2b9c9cd16ce389b7978d2471ae4b' [TEP STOP] Warning: Unknown(): A session is active. You cannot change the session module's ini settings at this time. in Unknown on line 0 Also, I have received following emails UPSXML Rates Error: Rating and Service 1.0001 0 An unknown error occured while attempting to contact the UPS gateway : Rating and Service 1.0001 0 An unknown error occured while attempting to contact the UPS gateway experienced by customer with id 18 on 2007-06-05 08:02:02 Error from cURL: Error [28]: connect() timed out! experienced by customer with id 18 on 2007-06-05 08:02:14 In some cases the error is: Error from cURL: Error [7]: experienced by customer with id 18 on 2007-06-05 07:12:14 Somebody can help me? not that to do... Thank you Big Y Quote Link to comment Share on other sites More sharing options...
digitalldesign Posted June 5, 2007 Share Posted June 5, 2007 Solved! Changes in upsxml.php // curl_setopt($ch, CURLOPT_TIMEOUT, (int)$timeout); //GoDaddy // curl_setopt ($ch, CURLOPT_HTTPPROXYTUNNEL, TRUE); curl_setopt ($ch, CURLOPT_PROXYTYPE, CURLPROXY_HTTP); curl_setopt ($ch, CURLOPT_PROXY, "http://proxy.shr.secureserver.net:3128"); curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, FALSE); curl_setopt ($ch, CURLOPT_TIMEOUT, 120); Thank you Big Y Quote Link to comment Share on other sites More sharing options...
mariemeh Posted June 5, 2007 Share Posted June 5, 2007 I am aslo getting this error: Rating and Service 1.0001 0 An unknown error occured while attempting to contact the UPS gateway : Rating and Service 1.0001 0 An unknown error occured while attempting to contact the UPS gateway experienced by customer with id 18 on 2007-06-05 08:02:02 CODEError from cURL: Error [28]: connect() timed out! experienced by customer with id 18 on 2007-06-05 08:02:14 I searched this thread for this error message and got info for those who are using Go Daddy... I am not on Go Daddy but figured it wouldn't hurt if I tried the solutions posted here since nothing else was here. It's not working. I called UPS for support and they can't help me at this point... they apparently don't know what this means or assume it's my shopping cart install... so I am facing a boring white wall...' any other suggestions on what to try because the fix for GoDaddy isn't working for me and I still have the error. Thank you Quote Link to comment Share on other sites More sharing options...
mariemeh Posted June 5, 2007 Share Posted June 5, 2007 sorry for the over eagerness... but I've been at this for over a week... waiting left and right and searching for info... so I am now trying everything I can think of... So I've tried this... //curl_setopt($ch, CURLOPT_TIMEOUT, (int)$timeout);curl_setopt ($ch, CURLOPT_PROXYTYPE, CURLPROXY_HTTP); curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, FALSE); curl_setopt ($ch, CURLOPT_TIMEOUT, 120); Now rates are showing... but I think they are just wrong... the quote on Express is cheaper then Standard and that is just not possible... PLUS... I had disallowed tons of shipping methods but they are all showing... so I will have to recheck on that but at this point, my major concern is getting the right price to appear... any thoughts: UPS (1 pkg x 1 kgs total) UPS Worldwide Express $7.00 UPS Worldwide Expedited $8.00 UPS Worldwide Express Plus $54.00 UPS Saver $65.00 UPS Standard $11.00 Thanks in advance for any thoughts Quote Link to comment Share on other sites More sharing options...
Jan Zonjee Posted June 5, 2007 Share Posted June 5, 2007 So I've tried this...Now rates are showing... but I think they are just wrong... the quote on Express is cheaper then Standard and that is just not possible... PLUS... I had disallowed tons of shipping methods but they are all showing... so I will have to recheck on that but at this point, my major concern is getting the right price to appear... any thoughts: Regarding the curl to work, that is something you should have asked your ISP about. UPS wouldn't know anything about it, nor would the other forum members. GoDaddy seems to host enough stores to have people post the solutions to work with their particular hosting setup. Regarding the strange looking quotes, why on earth do you check in the admin that you have negotiated rates with UPS where you don't? At least their webserver doesn't know you have them. In that case you get the numbers of the service back as quotes (Canada is your origin from the looks of them). The disallowing not working means you haven't followed all of the instructions for installing upsxml. Go over them and make sure you have changed a couple of files in the admin section according to the instructions (I think something about the new function tep_multi_config or something like that in this case). After that, deinstall and install again. Quote Link to comment Share on other sites More sharing options...
200Megaton Posted June 5, 2007 Share Posted June 5, 2007 I have integrated the UPS XML Shipping module into a site but I am having a weird calculation issue. It seems to run fine, but I get incorrect shipping calculations. I believe it is getting validated by UPS because I can change the access key, user or password and get the appropriate error message. The rates come back as follows no matter how much the total order weight is: United Parcel Service (XML) (1 pkg x 17 lbs total) UPS Ground $3.45 UPS 3 Day Select $13.80 UPS 2nd Day Air A.M. $67.85 UPS 2nd Day Air $2.30 UPS Next Day Air Saver $14.95 UPS Next Day Air Early A.M. $16.10 UPS Next Day Air $1.15 Any ideas? Quote Link to comment Share on other sites More sharing options...
Jan Zonjee Posted June 5, 2007 Share Posted June 5, 2007 I have integrated the UPS XML Shipping module into a site but I am having a weird calculation issue. It seems to run fine, but I get incorrect shipping calculations. I believe it is getting validated by UPS because I can change the access key, user or password and get the appropriate error message. The rates come back as follows no matter how much the total order weight is: United Parcel Service (XML) (1 pkg x 17 lbs total) UPS Ground $3.45 UPS 3 Day Select $13.80 UPS 2nd Day Air A.M. $67.85 UPS 2nd Day Air $2.30 UPS Next Day Air Saver $14.95 UPS Next Day Air Early A.M. $16.10 UPS Next Day Air $1.15 Any ideas? See previous post about setting Negotiated rates to true in the admin when you don't have those. Yours seem to include a sales tax (15%). Quote Link to comment Share on other sites More sharing options...
mariemeh Posted June 6, 2007 Share Posted June 6, 2007 Regarding the curl to work, that is something you should have asked your ISP about. UPS wouldn't know anything about it, nor would the other forum members. GoDaddy seems to host enough stores to have people post the solutions to work with their particular hosting setup. Lucky for me then that I could figure out that one on my own! Regarding the strange looking quotes, why on earth do you check in the admin that you have negotiated rates with UPS where you don't? At least their webserver doesn't know you have them. In that case you get the numbers of the service back as quotes (Canada is your origin from the looks of them). I do have negociated rates and the rates that are coming up for Standard are exactly as they should be... it's the Express and Expedited rates that are not reflected as they should. So I am guessing the problem might be coming from the UPS side but I don't know enough to be 100% sure. Ever heard of this? Quote Link to comment Share on other sites More sharing options...
Jan Zonjee Posted June 6, 2007 Share Posted June 6, 2007 I do have negociated rates and the rates that are coming up for Standard are exactly as they should be... If you look in the file catalog/includes/languages/english/modules/shipping/upsxml.php you will see that the service code us origin for standard is 11. That is the dollar amount you showed in your previous post :) it's the Express and Expedited rates that are not reflected as they should. So I am guessing the problem might be coming from the UPS side but I don't know enough to be 100% sure. Ever heard of this? I have seen the service code come up as quotes on more than one occasion. Perhaps you still use the test server and it is different if you use the production server (setting in admin)? Otherwise it is a UPS matter that need to be solved (perhaps it takes some time to arrange this after you got your developers key?). It is a pretty recent addition to the UPS Rates API... Quote Link to comment Share on other sites More sharing options...
digitalldesign Posted June 6, 2007 Share Posted June 6, 2007 Hello friends, Somebody can teach to me how I can make with this module to apply a different value of handling by categories? Since some of the categories are alcoholic beverages and UPS sells this label for USD3.00 extra fee. But, foods do not pay this. Thank you Big Y Quote Link to comment Share on other sites More sharing options...
mariemeh Posted June 6, 2007 Share Posted June 6, 2007 If you look in the file catalog/includes/languages/english/modules/shipping/upsxml.php you will see that the service code us origin for standard is 11. That is the dollar amount you showed in your previous post :) I have seen the service code come up as quotes on more than one occasion. Perhaps you still use the test server and it is different if you use the production server (setting in admin)? Otherwise it is a UPS matter that need to be solved (perhaps it takes some time to arrange this after you got your developers key?). It is a pretty recent addition to the UPS Rates API... no was in production mode... bu tI am thinking you are right... must not be active on the other side and it was just a coincidence that the $11 was the exact amount I needed. Went back and set Negotiated rates to false and instead put the Handling at percentage and put -??% of discount I am allowed and now I have accurate rates... but it prevents me to add real handling charges for now unless I tweak the discount amount. How does one normally makes the Negociated Rates work... only UPS can make it work, is that it? Quote Link to comment Share on other sites More sharing options...
Guest Posted June 7, 2007 Share Posted June 7, 2007 For every product, regardless of its weight, UPS (XML) shows 1 pkg x 0 lbs total. (I've already removed the tare weight, obviously.) I have no idea why it's not taking the weight from the database... Also, the price showing up is $11, which I have seen in some other posts is a value for a variable in the code, not the price. In those other posts (and I did look at a lot of them!), I never found the solution. Can anyone point me in the right direction? Thank you! Donia 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.