Guest Posted May 24, 2008 Share Posted May 24, 2008 Hi there. I can't seem to get the insurance options. To make a long story short, the shop i just installed had (I believe) the oldest version of this module pre-installed. So, after I enabled it, I had the recent issue where only express shipping was being picked in the final checkout...so i needed to upgrade. After much trial and error and making a frankenstien of different updates, I believe I have the two main usps files running from "METHODS 4.1.2 (with insurance 3.0). On the admin panel, when I click the modules edit button, it is preceded by Parse error: syntax error, unexpected T_GLOBAL, expecting ')' in /home/kintatzo/public_html/catalog/admin/modules.php(216) : eval()'d code on line 1 (but I can make changes) Note 1: I DO get express, priority, and postal available..that's it. (Furthest i've tested is from NY to FL, so these may be the only options I can get?...I will try other addresses and test further) But I think I should be able to get insurance at that distance? Note 2: My objective is to get US and Iternational...cheapest rates(ground, whatever)...with insurance optional Thanks Quote Link to comment Share on other sites More sharing options...
Guest Posted May 24, 2008 Share Posted May 24, 2008 sorry didn't see the part in the readme that says: If you are getting a "parse error" when you click edit in the admin OR your international options with checkboxes are not showing up in the admin, you may need to use phpMyAdmin to update the database -> configuration TABLE and CHANGE "set_function" to TEXT from VARCHAR. all is well now Quote Link to comment Share on other sites More sharing options...
Guest Posted May 25, 2008 Share Posted May 25, 2008 ***** WARNING WARNING!! ******** One of my customers got a really good deal with a domestic EXPRESS quote: $17.88 instead of $68.58 for a 15 pound order :-) in the usps.php file, line 274: $this->container = 'FLAT RATE ENVELOPE'; //OPTIONS: 'VARIABLE', 'FLAT RATE ENVELOPE' the option 'VARIABLE' doesn't work. Needs to be changed to '' (that is: empty). Putting 'VARIABLE' doesn't return a quote to the customer Quote Link to comment Share on other sites More sharing options...
benbogart Posted May 25, 2008 Share Posted May 25, 2008 Maybe this has been resolved already but here is my solution for sorting the results in order of price (as requested in "what I could use help on" in install.txt). all in modules/shipping/usps.php After: $rates = array(); Add: $rates_sorter = array(); After: $rates[] = array($service => $postage); Add: $rates_sorter[] = $postage; Replace: return ((sizeof($rates) > 0) ? $rates : false); With: // Sort Rates asort($rates_sorter); print_r($rates_sorter); $sorted_rates = array(); foreach (array_keys($rates_sorter) as $key) { $sorted_rates[] = $rates[$key]; } return ((sizeof($sorted_rates) > 0) ? $sorted_rates : false); hope others find it useful. Quote Link to comment Share on other sites More sharing options...
benbogart Posted May 25, 2008 Share Posted May 25, 2008 Maybe this has been resolved already but here is my solution for sorting the results in order of price (as requested in "what I could use help on" in install.txt). all in modules/shipping/usps.php After: $rates = array(); Add: $rates_sorter = array(); After: $rates[] = array($service => $postage); Add: $rates_sorter[] = $postage; Replace: return ((sizeof($rates) > 0) ? $rates : false); With: // Sort Rates asort($rates_sorter); print_r($rates_sorter); $sorted_rates = array(); foreach (array_keys($rates_sorter) as $key) { $sorted_rates[] = $rates[$key]; } return ((sizeof($sorted_rates) > 0) ? $sorted_rates : false); hope others find it useful. the forum won't let me edit my post... strange. anyway just a quick note, you need to add '$rates_sorter[] = $postage;' after both occurrences of '$rates[] = array($service => $postage);' otherwise you will get no results for either international or domestic rates (depending on which one you didn't add); Quote Link to comment Share on other sites More sharing options...
naps1saps Posted May 27, 2008 Share Posted May 27, 2008 (edited) Nice. One edit though: REPLACE: return ((sizeof($rates) > 0) ? $rates : false); WITH: //Sort Rates asort($rates_sorter); print_r($rates_sorter); $sorted_rates = array(); foreach (array_keys($rates_sorter) as $key){ $sorted_rates[] = $rates[$key]; } return ((sizeof($sorted_rates) > 0) ? $sorted_rates : false); $sorted_rates[] = $rates[$keys]; should have been $sorted_rates[] = $rates[$key]; But it works! Thanks! Edited May 27, 2008 by naps1saps Quote Link to comment Share on other sites More sharing options...
naps1saps Posted May 27, 2008 Share Posted May 27, 2008 Thank you Ben Bogart. V4.1.3 has now been released with the cost sorting fix and a few more changes/adjustments. Please be aware of the ounces not being rounded, so they are displayed with decimals like .33333333333... Please let me know if this becomes a problem. I'll fix it in a later update. Quote Link to comment Share on other sites More sharing options...
Guest Posted May 27, 2008 Share Posted May 27, 2008 Hi, I installed the new update today and am having the following error show in the admin panel. Fatal error: Call to undefined function: tep_cfg_select_multioption() in /mnt/w0207/d18/s05/b02d72b0/www/catalog/catalog/admin/modules.php(212) : eval()'d code on line 1 I have changed the config table in the database to TEXT and relodaded the usps option. Any ideas? Quote Link to comment Share on other sites More sharing options...
mikeman25 Posted May 27, 2008 Share Posted May 27, 2008 I haven't installed the new Beta yet so maybe this is fixed in it, but right now when I choose First Class mail as an option to be displayed (in admin) it does not show up for the end user. I have selected first class, priority, and express, but only priority and express show up. Is this a bug? Thanks, -Mike Quote Link to comment Share on other sites More sharing options...
Guest Posted May 27, 2008 Share Posted May 27, 2008 I fixed it. My mistake I was missing the files in the module.php Quote Link to comment Share on other sites More sharing options...
mikeman25 Posted May 27, 2008 Share Posted May 27, 2008 I just updated to the new Beta and the First Class option still isnt showing and now on the top of the page (where the shipping options are displayed to the end user) I have this: Array ( [1] => 5.20 [0] => 16.50 ) Any ideas? -Mike Quote Link to comment Share on other sites More sharing options...
mikeman25 Posted May 27, 2008 Share Posted May 27, 2008 So I found out what was happening with the array text... On line 559 there is a call to print_r($rates_sorter); which will print out the rates. So just comment that out and it goes away. I still, however, have the issue of First Class option not showing. If anyone has some insight on how to get this working I would appreciate it. Thanks, -Mike Quote Link to comment Share on other sites More sharing options...
mikeman25 Posted May 28, 2008 Share Posted May 28, 2008 Never mind on the first class response. I didnt realize it only applied to packages under 13 ounces. Quote Link to comment Share on other sites More sharing options...
naps1saps Posted May 28, 2008 Share Posted May 28, 2008 Yeah, that's usually what happens when firstclass doesn't show up. As far as the Array = ... at the top of the screen, that's my mystake. I forgot to take it out I guess. Sorry. So to everyone who has it installed, remove the print_r($rates_sorter); from line 559. Quote Link to comment Share on other sites More sharing options...
naps1saps Posted May 28, 2008 Share Posted May 28, 2008 I added a rounding function to prevent .33333333333333333... weight displays and removed the print array code. So go ahead and get V4.1.4 if you like. There aren't any new features or major additions, so it's up to you if you want to install it or not. Quote Link to comment Share on other sites More sharing options...
seanpatrick Posted June 2, 2008 Share Posted June 2, 2008 I'm not sure if this is the exact same problem others are having, but for a number of the stores I've built they NEVER use Domestic First Class in a Letter container and thus were getting slightly too low prices returned for First Class Packages. If you're in the same boat, here's how I fixed it: Change this bit of code: //FIRST CLASS MAIL OPTIONS if ($key == 'First-Class Mail'){ $this->FirstClassMailType = '<FirstClassMailType>LETTER</FirstClassMailType>'; to this: //FIRST CLASS MAIL OPTIONS if ($key == 'First-Class Mail'){ $this->FirstClassMailType = '<FirstClassMailType>PARCEL</FirstClassMailType>'; Basically, you just need to set "LETTER" to "PARCEL". I am using v4.1 FYI. Quote Link to comment Share on other sites More sharing options...
NO Stress Posted June 2, 2008 Share Posted June 2, 2008 I'm sorry if I am repeating a post. If I am could someone just let me know were to look? My problem is when someone checks out using USPS shipping no mater what price they pick it reverts back to the "Express" shipping and price. I do not know if it is something that has changed or if it has always been that way, when I tested it I don't think I tested that. I don't get any error messages and everything looks good, logo and all, and the UPS shipping is fine. If you check out with "Express" every thing is fine. Has anyone else had this problem? Thanks, Crystal Quote Link to comment Share on other sites More sharing options...
seanpatrick Posted June 2, 2008 Share Posted June 2, 2008 I'm sorry if I am repeating a post. If I am could someone just let me know were to look? My problem is when someone checks out using USPS shipping no mater what price they pick it reverts back to the "Express" shipping and price. I do not know if it is something that has changed or if it has always been that way, when I tested it I don't think I tested that. I don't get any error messages and everything looks good, logo and all, and the UPS shipping is fine. If you check out with "Express" every thing is fine. Has anyone else had this problem? Thanks, Crystal Are you using v4.1 or higher? If not, that might fix your problem. Quote Link to comment Share on other sites More sharing options...
NO Stress Posted June 2, 2008 Share Posted June 2, 2008 Are you using v4.1 or higher? If not, that might fix your problem. I hate to be a dummy but how do I check that? Quote Link to comment Share on other sites More sharing options...
seanpatrick Posted June 2, 2008 Share Posted June 2, 2008 I hate to be a dummy but how do I check that? Well, when did you install the USPS Methods module? If it was before May 8th, you don't have v4.1 or higher. Quote Link to comment Share on other sites More sharing options...
NO Stress Posted June 2, 2008 Share Posted June 2, 2008 Well, when did you install the USPS Methods module? If it was before May 8th, you don't have v4.1 or higher. I did not. I looked at the new ones, do you suggest 4.0 alpha or 4.1, 4.1.2, or 4.1.3 bata? Quote Link to comment Share on other sites More sharing options...
seanpatrick Posted June 2, 2008 Share Posted June 2, 2008 I did not. I looked at the new ones, do you suggest 4.0 alpha or 4.1, 4.1.2, or 4.1.3 bata? personally, i'm using v4.1 but i've made some changes to get it 100%. from what the rest of the thread seems to say, v4.1.4 might be best. Quote Link to comment Share on other sites More sharing options...
NO Stress Posted June 2, 2008 Share Posted June 2, 2008 personally, i'm using v4.1 but i've made some changes to get it 100%. from what the rest of the thread seems to say, v4.1.4 might be best. Can't find v4.1.4 Quote Link to comment Share on other sites More sharing options...
seanpatrick Posted June 2, 2008 Share Posted June 2, 2008 use the latest... Quote Link to comment Share on other sites More sharing options...
NO Stress Posted June 2, 2008 Share Posted June 2, 2008 Found it. Thanks for all your help!!!!! Crystal 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.