Irin Posted May 4, 2007 Share Posted May 4, 2007 Hello Irin, I hope you can figure it out for yourself. I want to thank you for the code job on this feature. I added the code plus Jan's addition and did what Jan said in removing and reinstalling UPSXML and it works for me just fine with the radio buttons in the Admin backend UPSXML shipping section. I wish I could help you, but I'm just a cut and paster. Best wishes, Alan Alan, I'm glad that you also found this feature useful. I did figure what caused the problem at my site. I removed the UPSXML module as well as my config file and then reinstalled it again. Luckily, everything works perfect now. Regarding the "Time in Transit" not showing at checkout_shipping.php, it was my fault as I removed all UPS's from shipping methods definitions in language file. It turned out that without the UPS in definition, it doesn't display Time in Transit. We learn from our mistakes. :) Quote Link to comment Share on other sites More sharing options...
spiritalan Posted May 5, 2007 Share Posted May 5, 2007 Hello Jan, Thanks for all your help on this forum and in particular with this contribution, UPSXML. I had been using the old osCommerce UPS contribution with no problems for about a couple years. But because osCommerce was not longer including it the package and I did not know if UPS would continue to provide the rates, I decided to go with UPSXML. My first problem was an Error 60. I am not a programmer, and since I know very little about PHP, I consider myself just a cut and paster. So I went and searched on the forum and found some of your answers very helpful. I also thank you for the help you gave to Irin with the code and implementation of his package and weight feature. It works great. I don’t like to show to my customer the package and weight. The only other thing I changed in the UPSXML v1_2_6 is the definition in the English Language file regarding “UPS Saver.” In the US it is called “Worldwide Saver”. So I changed this: define('MODULE_SHIPPING_UPSXML_SERVICE_CODE_EU_ORIGIN_65', 'UPS Saver'); to this: define('MODULE_SHIPPING_UPSXML_SERVICE_CODE_EU_ORIGIN_65', 'UPS Worldwide Saver'); Thanks again, Alan Quote Production:osCommerce V. 2.3.4BSVPS Box Link to comment Share on other sites More sharing options...
spiritalan Posted May 5, 2007 Share Posted May 5, 2007 I also thank you for the help you gave to Irin with the code and implementation of his package and weight feature. It works great. I don’t like to show to my customer the package and weight. Sorry Irin I should have looked at your profile first. Jan, I mean HER package and weight feature. Thanks, Alan Quote Production:osCommerce V. 2.3.4BSVPS Box Link to comment Share on other sites More sharing options...
cricex Posted May 9, 2007 Share Posted May 9, 2007 Hello, I have UPS XML enabled and it seems to work fine as well except for one thing. I am needing to add $3 handling charge to all items shipped via UPS. I see that it is an option for the UPS XML module. So I input 3.00 in the box, hit ok. It saves the information but when I go to the site to test it it does not reflect back on the price of shipping nor does it have an additional handling fee associated with the basket. Anyone know what may be causing something like this to happen? Please get back to me ASAP if possible. I am reahcable via email: [email protected], AIM: criceX, yahooIM: chazb0tt or MSN: [email protected] Thank you!!!! Quote Link to comment Share on other sites More sharing options...
Jan Zonjee Posted May 9, 2007 Share Posted May 9, 2007 I have UPS XML enabled and it seems to work fine as well except for one thing. I am needing to add $3 handling charge to all items shipped via UPS. I see that it is an option for the UPS XML module. So I input 3.00 in the box, hit ok. It saves the information but when I go to the site to test it it does not reflect back on the price of shipping The handling fee is added to each order, not every item or box. Works fine with me though. Please get back to me ASAP if possible. I am reahcable via email It doesn't work like that in osCommerce. Quote Link to comment Share on other sites More sharing options...
cricex Posted May 10, 2007 Share Posted May 10, 2007 The handling fee is added to each order, not every item or box. Works fine with me though. It doesn't work like that in osCommerce. Hello! Thanks for the reply! I am well aware how the handling fee is supposed to work, however it simply does not add the amount to the order at all. I am looking for people who have heard of or experienced this. Any and all help is welcomed. What doesnt work in OSC? I've had people send me emails and IM's for prior help requests in the past, although it was a year or so ago ;) Quote Link to comment Share on other sites More sharing options...
jeniferm Posted May 15, 2007 Share Posted May 15, 2007 Thanks for your help, Jan. I added length, width, height to the $sql query in the class PriceFormatter.php and now I'm getting the quotes from UPS. The only problem is the quotes are high. If, for example, I add to the shopping cart product: weight 3.1LB, length 22", width 16", height 2" the quotes are very close to real quotes from UPS web site. However, if I add another product with weight 0.3LB, length 9", width 6", height 1" it shows 2 pkg(s), 6 lbs total and double quotes from UPS. That's way too high and, more over, I'm using just one box to ship these two products and not two and the total weight is max 4LBs, not 6LBs. Is there something I'm doing wrong and how can I fix it? I'm having a similar problem where I've added a couple items to the shopping cart with a combined weight of less than a pound, but the UPS XML module always seems to say it's 1 package x 3 pounds. If I remove an item, it still says it weighs 3 pounds. Does UPS have a minimum weight or something? Or did I maybe miss something in the install? Jenifer Quote Link to comment Share on other sites More sharing options...
Jan Zonjee Posted May 15, 2007 Share Posted May 15, 2007 I'm having a similar problem where I've added a couple items to the shopping cart with a combined weight of less than a pound, but the UPS XML module always seems to say it's 1 package x 3 pounds. If I remove an item, it still says it weighs 3 pounds. Does UPS have a minimum weight or something? Or did I maybe miss something in the install? Since you are new (first post) there is a good chance you haven't checked yet how standard osC calculates with tare weight and large packages - percentage increase. And yes, there is some minimum value for the weight of a package, 1 pounds or 1 kg depending on what units you use. Quote Link to comment Share on other sites More sharing options...
jeniferm Posted May 15, 2007 Share Posted May 15, 2007 Oooh, okay. I'll start there. Thank you!! :) Jenifer Quote Link to comment Share on other sites More sharing options...
Priest Posted May 15, 2007 Share Posted May 15, 2007 I have tried searching through all of these pages, so I apologize if the solution has been posted and I missed it. Has anyone found a solution to the Free Shipping problem? Using the standard OSC shipping order total module, if you choose "Free Shipping For Orders Over $xx.xx" then the UPS XML module disappears completly from the shipping page. Instead, I feel it should disappear the regular osc shipping option and keep the ups xml module displayed. Anyone else having this same problem? Any solution? Thanks! Priest Quote Link to comment Share on other sites More sharing options...
Jan Zonjee Posted May 16, 2007 Share Posted May 16, 2007 I have tried searching through all of these pages, so I apologize if the solution has been posted and I missed it. Has anyone found a solution to the Free Shipping problem? Using the standard OSC shipping order total module, if you choose "Free Shipping For Orders Over $xx.xx" then the UPS XML module disappears completly from the shipping page. Instead, I feel it should disappear the regular osc shipping option and keep the ups xml module displayed. Anyone else having this same problem? Any solution? That is the way osC works and what the heck do you mean with "the regular osc shipping option" should disappear... I lost you there. Three pages back paviii/Richard posted some code to offer free ground shipping (basically replacing the UPS ground quote with 0.00 if I remember correctly). Perhaps that is a good work around for the osC way of offering free shipping? Quote Link to comment Share on other sites More sharing options...
Priest Posted May 16, 2007 Share Posted May 16, 2007 That is the way osC works and what the heck do you mean with "the regular osc shipping option" should disappear... I lost you there.Three pages back paviii/Richard posted some code to offer free ground shipping (basically replacing the UPS ground quote with 0.00 if I remember correctly). Perhaps that is a good work around for the osC way of offering free shipping? Thanks, but his code won't seem to work because I'm not offering free ground shipping. I use USPS for regular shipping (much cheaper) and also offer expedited options such as UPS next day, 2nd day, and 3-day select. In your admin area, if you click MODULES > ORDER TOTAL > Shipping, you will see the option "Free Shipping For Orders Over..." When enabled, it changes the flat-rate shipping module I use to show "Free Shipping - $0.00" but, unfortunately, it hides the UPS XML shipping module also. I would like the expedited shipping options (UPS XML Module) to still be available so customers can choose between free standard shipping (if over a certain amount) or pay for express shipping. Sorry if I didn't explain it very wekk the first time. Again, thanks for your help. -p- Quote Link to comment Share on other sites More sharing options...
Jan Zonjee Posted May 17, 2007 Share Posted May 17, 2007 In your admin area, if you click MODULES > ORDER TOTAL > Shipping, you will see the option "Free Shipping For Orders Over..." When enabled, it changes the flat-rate shipping module I use to show "Free Shipping - $0.00" but, unfortunately, it hides the UPS XML shipping module also. Actually, this is hard-coded in osC (see checkout_shipping.php) in a number of places (e.g. includes/modules/order_total/ot_shipping.php). I'm not aware of any contribution by someone who figured out how to change osC in such a way that what you want becomes possible... Quote Link to comment Share on other sites More sharing options...
Guest Posted May 17, 2007 Share Posted May 17, 2007 First - Thanks for the module. I am getting an error in the admin section when I try to activate the UPS xml module. " Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ')' in /home/content/s/u/r/surustore/html/admin/modules.php(212) : eval()'d code on line 1" Line 212 in modules.php has the following: eval('$keys .= ' . $value['set_function'] . "'" . $value['value'] . "', '" . $key . "');"); Can anyone point me in the right direction to fix this? I am not php savy so pretend you are writing an answer for dummies. Thank you in advance for any help. Quote Link to comment Share on other sites More sharing options...
Jan Zonjee Posted May 17, 2007 Share Posted May 17, 2007 First - Thanks for the module. I am getting an error in the admin section when I try to activate the UPS xml module. " Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ')' in /home/content/s/u/r/surustore/html/admin/modules.php(212) : eval()'d code on line 1" Go over step 5 in the readme.txt again. Quote Link to comment Share on other sites More sharing options...
Jan Zonjee Posted May 17, 2007 Share Posted May 17, 2007 I would like the expedited shipping options (UPS XML Module) to still be available so customers can choose between free standard shipping (if over a certain amount) or pay for express shipping. On further thought I think it should be possible to make free shipping into a shipping module (there are several contributions for that I think, like for number of products, perhaps you can use Free Shipping w/ Minimum Amount) and not use the free shipping in standard osC. Quote Link to comment Share on other sites More sharing options...
Priest Posted May 17, 2007 Share Posted May 17, 2007 On further thought I think it should be possible to make free shipping into a shipping module (there are several contributions for that I think, like for number of products, perhaps you can use Free Shipping w/ Minimum Amount) and not use the free shipping in standard osC. Hi Jan, Thanks! I downloaded it and looked at it, and it worked, but I didn't like the idea of having to use an additional shipping module just to get this to work. Thanks to your ideas, I went seeking other solutions and finally I was able to change the code to make it work. Here's the code. And again, I want to say thank you! -Priest- Quote Link to comment Share on other sites More sharing options...
Jan Zonjee Posted May 17, 2007 Share Posted May 17, 2007 I went seeking other solutions and finally I was able to change the code to make it work. Here's the code. Good solution incorporating the free shipping in the table rate. Of course not everyone will use a table rate besides UPS XML but indeed a good solution. Quote Link to comment Share on other sites More sharing options...
righteousmoves Posted May 22, 2007 Share Posted May 22, 2007 I'm trying to set up this UPS XML Shipping Contribution, and I'm receiving the following error in my Admin, shipping settings: Warning: main(includes/classes/xmldocument.php): failed to open stream: No such file or directory in /hsphere/local/home/righteou/righteousmoves.com/catalog/includes/modules/shipping/upsxml.php on line 23 Fatal error: main(): Failed opening required 'includes/classes/xmldocument.php' (include_path='.:/usr/local/lib/php:/usr/local/share/pear') in /hsphere/local/home/righteou/righteousmoves.com/catalog/includes/modules/shipping/upsxml.php on line 23 Any advice on what to alter? I'm pretty new to this system. But I did add, and upload the documents it refers to. They are in my system. Thanks in advance for your help! Crystal Quote Link to comment Share on other sites More sharing options...
Jan Zonjee Posted May 22, 2007 Share Posted May 22, 2007 I'm trying to set up this UPS XML Shipping Contribution, and I'm receiving the following error in my Admin, shipping settings: Warning: main(includes/classes/xmldocument.php): failed to open stream: No such file or directory in /hsphere/local/home/righteou/righteousmoves.com/catalog/includes/modules/shipping/upsxml.php on line 23 Fatal error: main(): Failed opening required 'includes/classes/xmldocument.php' (include_path='.:/usr/local/lib/php:/usr/local/share/pear') in /hsphere/local/home/righteou/righteousmoves.com/catalog/includes/modules/shipping/upsxml.php on line 23 Any advice on what to alter? I'm pretty new to this system. But I did add, and upload the documents it refers to. They are in my system. Are you sure that you added the class xmldocument.php both to the catalog and the admin end? Because that is what the error indicates that is wrong. Quote Link to comment Share on other sites More sharing options...
boostin4hp Posted May 23, 2007 Share Posted May 23, 2007 I am receiving a error when only trying to add a new product, editing a current product is fine. the error is: 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 select count(*) as total from products_split where products_id = [TEP STOP] I'm pretty sure I've tracked it down to this line of code not being compatible with php5 <?php $check_split_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_SPLIT . " where products_id = " . $pInfo->products_id . ""); I've searched for a solution here, googled it, read up on php 5, and cannot come up with a solution. I'm pretty sure is has to do with the count and total statements but I'm not 100% sure. Any help would be greatly appreciated, thanks in advance. -Jeff Quote Link to comment Share on other sites More sharing options...
righteousmoves Posted May 24, 2007 Share Posted May 24, 2007 Are you sure that you added the class xmldocument.php both to the catalog and the admin end? Because that is what the error indicates that is wrong. Halleluia!! :) Thank you so much. What a simple fix! I appreciate your help. :) Crystal Quote Link to comment Share on other sites More sharing options...
Jan Zonjee Posted May 24, 2007 Share Posted May 24, 2007 I am receiving a error when only trying to add a new product, editing a current product is fine. the error is: 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 select count(*) as total from products_split where products_id = [TEP STOP] I'm pretty sure I've tracked it down to this line of code not being compatible with php5 <?php $check_split_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_SPLIT . " where products_id = " . $pInfo->products_id . ""); I've searched for a solution here, googled it, read up on php 5, and cannot come up with a solution. I'm pretty sure is has to do with the count and total statements but I'm not 100% sure. No, it is my fault. I didn't realize this would happen. If you wrap up the whole new part in an if not set $pInfo->products_id you should be fine (or at least better, haven't tried it fully yet). Also better add single quotes around the $pInfo->products_id in the query to top if off. <?php // do not show when a product is new: products_id not known yet if (!isset($pInfo->products_id)) { ?> <tr> <td class="main"><?php echo TEXT_PRODUCTS_SPLIT_PRODUCT; ?></td> <?php $check_split_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_SPLIT . " where products_id = '" . $pInfo->products_id . "'"); $check_split = tep_db_fetch_array($check_split_query); ?> <td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '22', '15') . ' ' . ($check_split['total'] < 1 ? 'no' : $check_split['total']); ?> <?php echo '<a href="java script:void(0)" onmouseover="window.status=\'' . TEXT_MOUSE_OVER_SPLIT_PRODUCTS . '\';return true;" onmouseout="window.status=\'\'; return true;" onclick="window.open(\'' . tep_href_link(FILENAME_SPLIT_PRODUCT, 'pid=' . $pInfo->products_id, 'NONSSL') . '\',\'' . NAME_WINDOW_SPLIT_PRODUCTS_POPUP . '\',\'menubar=yes,resizable=yes,scrollbars=yes,status=no,location=no,width=650,hei ght=350\');return false">' . tep_image_button('button_edit.gif', IMAGE_UPDATE, 'style="vertical-align: middle;"'); ?></a></td> <?php } // end if (!isset($pInfo->products_id)) ?> Quote Link to comment Share on other sites More sharing options...
Jan Zonjee Posted May 24, 2007 Share Posted May 24, 2007 Tested the above code further and it wasn't correct. This works <?php // do not show when a product is new: products_id not known yet if (isset($pInfo->products_id) && tep_not_null($pInfo->products_id)) { ?> <tr> <td class="main"><?php echo TEXT_PRODUCTS_SPLIT_PRODUCT; ?></td> <?php $check_split_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_SPLIT . " where products_id = '" . $pInfo->products_id . "'"); $check_split = tep_db_fetch_array($check_split_query); ?> <td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '22', '15') . ' ' . ($check_split['total'] < 1 ? 'no' : $check_split['total']); ?> <?php echo '<a href="java script:void(0)" onmouseover="window.status=\'' . TEXT_MOUSE_OVER_SPLIT_PRODUCTS . '\';return true;" onmouseout="window.status=\'\'; return true;" onclick="window.open(\'' . tep_href_link(FILENAME_SPLIT_PRODUCT, 'pid=' . $pInfo->products_id, 'NONSSL') . '\',\'' . NAME_WINDOW_SPLIT_PRODUCTS_POPUP . '\',\'menubar=yes,resizable=yes,scrollbars=yes,status=no,location=no,width=650,hei ght=350\');return false">' . tep_image_button('button_edit.gif', IMAGE_UPDATE, 'style="vertical-align: middle;"'); ?></a></td> <?php } // end if (isset($pInfo->products_id)) ... ?> There was also some debug code left in the popup window. Removed that and uploaded the corrected package as UPS XML version 1.2.8. Quote Link to comment Share on other sites More sharing options...
boostin4hp Posted May 24, 2007 Share Posted May 24, 2007 No, it is my fault. I didn't realize this would happen. If you wrap up the whole new part in an if not set $pInfo->products_id you should be fine (or at least better, haven't tried it fully yet). Also better add single quotes around the $pInfo->products_id in the query to top if off. 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. 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? Array ( [products_length] => 46 [products_width] => 18 [products_height] => 15 [products_ready_to_ship] => 1 [value_fraction] => 0.5 [weight_fraction] => 0.3 ) 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. 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.