Hello Jetta,
For a novice coder like myself, can you tell me which USPS rate v4 module I should install for an osCommerce version 2.2-MS2?
I installed and followed the instructions for "USPS Rate V4 Intl Rate V2", but my edited perferences in the Shipping Module admin page wouldn't stay (after clicking "confirm"), and this link (http://www.uspsprioritymail.com/et_regcert.html) was not good when I went to check on my USPS account status.
Thank you so much!
Matthew
Latest News: (loading..)
USPS Rate V4, Intl Rate V2 (official support thread)
Started by fulluvscents, Jan 31 2012, 10:26
195 replies to this topic
#181
Posted 01 May 2012, 20:30
#182
Posted 02 May 2012, 17:41
NovemberDirge, on 30 April 2012, 17:21, said:
Hey team,
Any idea on the error I'm encountering?
Thanks!
Any idea on the error I'm encountering?
Thanks!
Did you follow the instructions provided in the readme.txt file? If so, you should have the following code under admin/includes/functions/general.php:
// USPS START
function tep_cfg_usps_services($select_array, $key_value, $key = '')
{
$key_values = explode( ", ", $key_value);
$name = (($key) ? 'configuration[' . $key . '][]' : 'configuration_value');
$string = '<b><div style="width:20px;float:left;text-align:center;"> </div><div style="width:30px;float:left;text-align:center;">Min</div><div style="width:30px;float:left;text-align:center;">Max</div><div style="float:left;"></div><div style="width:50px;float:right;text-align:center;">Handling</div></b><div style="clear:both;"></div>';
for ($i=0; $i<sizeof($select_array); $i++)
{
$string .= '<div id="' . $key . $i . '">';
$string .= '<div style="width:20px;float:left;text-align:center;">' . tep_draw_checkbox_field($name, $select_array[$i], (in_array($select_array[$i], $key_values) ? 'CHECKED' : '')) . '</div>';
if (in_array($select_array[$i], $key_values)) next($key_values);
$string .= '<div style="width:30px;float:left;text-align:center;">' . tep_draw_input_field($name, current($key_values), 'size="1"') . '</div>';
next($key_values);
$string .= '<div style="width:30px;float:left;text-align:center;">' . tep_draw_input_field($name, current($key_values), 'size="1"') . '</div>';
next($key_values);
$string .= '<div style="float:left;">' . preg_replace(array('/RM/', '/TM/', '/International/', '/Envelope/', '/ Mail/', '/Large/', '/Medium/', '/Small/', '/First/', '/Legal/', '/Padded/', '/Flat Rate/', '/Regional Rate/', '/Express Guaranteed /'), array('', '', 'Intl', 'Env', '', 'Lg.', 'Md.', 'Sm.', '1st', 'Leg.', 'Pad.', 'F/R', 'R/R', 'Exp Guar'), $select_array[$i]) . '</div>';
$string .= '<div style="width:50px;float:right;text-align:center;">$' . tep_draw_input_field($name, current($key_values), 'size="2"') . '</div>';
next($key_values);
$string .= '<div style="clear:both;"></div></div>';
}
return $string;
}
function tep_cfg_usps_extraservices($select_array, $key_value, $key = '')
{
$key_values = explode( ", ", $key_value);
$name = (($key) ? 'configuration[' . $key . '][]' : 'configuration_value');
$string = '<b><div style="width:20px;float:left;text-align:center;">N</div><div style="width:20px;float:left;text-align:center;">Y</div></b><div style="clear:both;"></div>';
for ($i=0; $i<sizeof($select_array); $i++)
{
$string .= tep_draw_hidden_field($name, $select_array[$i]);
next($key_values);
$string .= '<div id="' . $key . $i . '">';
$string .= '<div style="width:20px;float:left;text-align:center;"><input type="checkbox" name="' . $name . '" value="N" ' . (current($key_values) == 'N' || current($key_values) == '' ? 'CHECKED' : '') . ' id="N-'.$key.$i.'" onClick="if(this.checked==1)document.getElementById(\'Y-'.$key.$i.'\').checked=false;else document.getElementById(\'Y-'.$key.$i.'\').checked=true;"></div>';
$string .= '<div style="width:20px;float:left;text-align:center;"><input type="checkbox" name="' . $name . '" value="Y" ' . (current($key_values) == 'Y' ? 'CHECKED' : '') . ' id="Y-'.$key.$i.'" onClick="if(this.checked==1)document.getElementById(\'N-'.$key.$i.'\').checked=false;else document.getElementById(\'N-'.$key.$i.'\').checked=true;"></div>';
next($key_values);
$string .= preg_replace(array('/Signature/', '/without/', '/Merchandise/', '/TM/', '/RM/'), array('Sig', 'w/out', 'Merch.', '', ''), $select_array[$i]) . '<br>';
$string .= '<div style="clear:both;"></div></div>';
}
return $string;
}
// USPS END
#183
Posted 03 May 2012, 17:40
sorry I cant help.. trying to get this setup myself.. seems the site that the mod relies on is down..
Can anyone load this page ?
http://www.uspsprioritymail.com/et_regcert.html
Can anyone load this page ?
http://www.uspsprioritymail.com/et_regcert.html
Just call me Dewed ...
#184
Posted 04 May 2012, 02:12
I am new to osCommerce - came from Magento and I will admit it has been a struggle. I only left Magento because my provider bases their usage on size of database files and Magento is about 43M out of the box, they allow 2GB, even their pro is only 3GB. Anyway, I was hoping to use the USPS mudule included in osCommerce 2.3.1, but after struggling with and only getting Libray Shipping to work that I gave up and went to Methods. Got that to work, but my primary shipping method, First-Class Parcel, wasn't populating the description. Again, after a long hard struggle I gave up and went to USPS Rate V4 Intl Rate V2 - v.1.7_1 with USPS Restrict Methods and just now seems to be working, but to be honest not sure if I am getting full functionality.
The only way I got this to work was to use the drop on top method, I am assuming there are a number of steps missing in the step by step instructions since the step by step didn't have some of the changed files included in the instructions and I wasn't in the mood to do a file compare - I've been at osCommerce for a month trying to get it where I need/want it. Paypal is now broken. Fix one thing, breaks another...on to my next struggle.
The only way I got this to work was to use the drop on top method, I am assuming there are a number of steps missing in the step by step instructions since the step by step didn't have some of the changed files included in the instructions and I wasn't in the mood to do a file compare - I've been at osCommerce for a month trying to get it where I need/want it. Paypal is now broken. Fix one thing, breaks another...on to my next struggle.
#185
Posted 04 May 2012, 14:36
This has got me scratching my head.
Using the old USPS module that went dark we did not have this error.
After installling the module and emailing USPS, we get rates for Cont. U.S.
But,
we only offer postal service to Alaska, Hawaii, APO and FPO addresses.
When running a test I get this error:
<Package ID="1">
<Error>
<Number>-2147219401</Number>
<Source>;clsRateV4.CreateSinglePostage-CreateSinglePostage;RateEngineV4.ProcessRequest</Source>
<Description> Error Information: The Destination ZIP Code you have entered is invalid.</Description>
<HelpFile></HelpFile>
<HelpContext>1000440</HelpContext>
</Error>
</Package>
</RateV4Response>
Address is:
APO, AE 09391
This is a valid US Postal Service Zip Code.
Any thoughts?
Using the old USPS module that went dark we did not have this error.
After installling the module and emailing USPS, we get rates for Cont. U.S.
But,
we only offer postal service to Alaska, Hawaii, APO and FPO addresses.
When running a test I get this error:
<Package ID="1">
<Error>
<Number>-2147219401</Number>
<Source>;clsRateV4.CreateSinglePostage-CreateSinglePostage;RateEngineV4.ProcessRequest</Source>
<Description> Error Information: The Destination ZIP Code you have entered is invalid.</Description>
<HelpFile></HelpFile>
<HelpContext>1000440</HelpContext>
</Error>
</Package>
</RateV4Response>
Address is:
APO, AE 09391
This is a valid US Postal Service Zip Code.
Any thoughts?
If you choose not to decide you still have made a choice, I will choose a purpose clear, I will choose Free Will. --Neal Peart - Rush
#186
Posted 04 May 2012, 18:36
I believe there is a forum rule about posting the same question in multiple topics.
09391 is not a valid zip code.
09391 is not a valid zip code.
#187
Posted 04 May 2012, 18:46
The current USPS database says that 09391 is valid: it's assigned to Joint Base Balad in Iraq. Perhaps none of the services you have selected are available to that destination. You could ask the USPS what services are available.
Regards
Jim
Regards
Jim
My Addons
Banners Box 2.3.1 Support
Categories Accordion Box 2.3.1 Support
Categories Images Box 2.2x 2.3.1 Support
Closest Shipper 2.2x Support
Document Manager 2.2x Support
Generic Box 2.3.1 Support
Get 1 Free 2.2x Support
Include HTML and Text Boxes 2.2x
jQuery Banner Rotator 2.2x 2.3.1 Support
Modular Front Page 2.3.1 Support
Modular SEO Header Tags 2.3.1 Support
More Pics 2.2x Support
MVS 2.2x Support
osC Catalog 2.2x Support
PDF Datasheet 2.3.1 Support
Price Updater 2.2x
Products Specifications 2.2x 2.3.1 Development Version Support Bugs/Suggestions
Request a Review 2.2x - 2.3.1 Support
Similar Products Box 2.2x
Theme Switcher 2.3.1 Support
Banners Box 2.3.1 Support
Categories Accordion Box 2.3.1 Support
Categories Images Box 2.2x 2.3.1 Support
Closest Shipper 2.2x Support
Document Manager 2.2x Support
Generic Box 2.3.1 Support
Get 1 Free 2.2x Support
Include HTML and Text Boxes 2.2x
jQuery Banner Rotator 2.2x 2.3.1 Support
Modular Front Page 2.3.1 Support
Modular SEO Header Tags 2.3.1 Support
More Pics 2.2x Support
MVS 2.2x Support
osC Catalog 2.2x Support
PDF Datasheet 2.3.1 Support
Price Updater 2.2x
Products Specifications 2.2x 2.3.1 Development Version Support Bugs/Suggestions
Request a Review 2.2x - 2.3.1 Support
Similar Products Box 2.2x
Theme Switcher 2.3.1 Support
#188
Posted 04 May 2012, 18:57
#189
Posted 04 May 2012, 20:36
@NovemberDirge
tep_cfg_usps_services()
isn't being defined because you haven't finished the installation
Quote
I have yet to proceed to the application_top.php, general.php and modules.php edits
tep_cfg_usps_services()
isn't being defined because you haven't finished the installation
#192
Posted 09 May 2012, 02:04
Have been trying to resolve my USPS problems for weeks. Had USPS methods installed for years but after most recent changes first class domestic disappeared, I applied all kinds of updates and it wouldn't resolve. So tried this contribution and all domestic finally works fine but now my international calculations are down. I get the following error(s): Warning: simplexml_load_string() [function.simplexml-load-string]: Entity: line 84: parser error : etc. So international rates are not showing at all now.
#193
Posted 12 May 2012, 02:04
I have something happening that I need help with. My USPS shipping rates have been working great since I installed this contrib at the end of March. Today I wanted to go into admin/module.php, and all I got was a blank page. To make a long story short, every time I try to access modules.php from admin, it throws the following error:
PHP Fatal error: Call to a member function getAll() on a non-object in /home5/cascadec/public_html/admin/modules.php on line 17
Line 17 is this:
$modules = $cfgModules->getAll();
I don't know why this worked when I first installed the mod, but now I can't open my modules.php, or shipping Can anyone tell me what this line is having a problem with? I run a 2.2 shop.
Ron West
PHP Fatal error: Call to a member function getAll() on a non-object in /home5/cascadec/public_html/admin/modules.php on line 17
Line 17 is this:
$modules = $cfgModules->getAll();
I don't know why this worked when I first installed the mod, but now I can't open my modules.php, or shipping Can anyone tell me what this line is having a problem with? I run a 2.2 shop.
Ron West
#194
Posted 13 May 2012, 07:22
First I must say, Jetta I really appreciate the plugin. It, thus far, has been great.
Now for the topic of my concern....
I can't for the life of me seem to actually make any changes to the shipping meathods... Every time I check mark, set the min or max rate, or change the handing price, upon saving it loses everything. I am seening no errors in the log and the oly fireld that is filled is the min value in the 1st-Class Lg. Env. It is, for some reason filled with the value "Array" and resets to that everytime I save my settings.
If it helps in teh main shipping modules I also get the following:
Shipping Methods (Domestic and International)
Array
Extra Services (Domestic)
Array
Extra Services (International)
Array
I am lost on what to do and would appreciate your (or anyones) help.
Now for the topic of my concern....
I can't for the life of me seem to actually make any changes to the shipping meathods... Every time I check mark, set the min or max rate, or change the handing price, upon saving it loses everything. I am seening no errors in the log and the oly fireld that is filled is the min value in the 1st-Class Lg. Env. It is, for some reason filled with the value "Array" and resets to that everytime I save my settings.
If it helps in teh main shipping modules I also get the following:
Shipping Methods (Domestic and International)
Array
Extra Services (Domestic)
Array
Extra Services (International)
Array
I am lost on what to do and would appreciate your (or anyones) help.
#195
Posted 17 May 2012, 12:16
Thank for the contribution.
There seems to a $6.00 minimum shipping charge.
If I have a 6 oz item it's $6.05. If I have 10lb item it's $10.00.
I only have parcel post selected with no handling charge at present.
thanks
Walter
There seems to a $6.00 minimum shipping charge.
If I have a 6 oz item it's $6.05. If I have 10lb item it's $10.00.
I only have parcel post selected with no handling charge at present.
thanks
Walter
#196
Posted 17 May 2012, 13:22
Never mind. I'm a dope:)
Great contribution. I finally realized that individual item shipping rates can be manipulated by using the min and max weights for each shipping method.
Sweet!
Great contribution. I finally realized that individual item shipping rates can be manipulated by using the min and max weights for each shipping method.
Sweet!














