Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] - USPS Methods


Recommended Posts

YOu are still missing declerations in the language file

 

the file should look like this:

<?php
/*
$Id: usps.php 3 2006-05-27 04:59:07Z user $
 ++++ modified as USPS Methods 2.7 03/26/04 by Brad Waite and Fritz Clapp ++++

 osCMax Power E-Commerce
 http://oscdox.com

 Copyright 2006 osCMax2005 osCMax, 2002 osCommerce

 Released under the GNU General Public License
*/

define('MODULE_SHIPPING_USPS_TEXT_TITLE', 'United States Postal Service');
define('MODULE_SHIPPING_USPS_TEXT_DESCRIPTION', 'You will need to have registered an account with USPS. Click <a target="_blank" href="https://secure.shippingapis.com/registration/"><strong>HERE</strong></a> for registration details. USPS expects you to use pounds as weight measure for your products.');
define('MODULE_SHIPPING_USPS_TEXT_ERROR', 'An error occured with the USPS shipping calculations.<br>If you prefer to use USPS as your shipping method, please contact the store owner.');
define('MODULE_SHIPPING_USPS_TEXT_INSURED', 'Insured for');
define('MODULE_SHIPPING_USPS_TEXT_DAY', 'Day');
define('MODULE_SHIPPING_USPS_TEXT_DAYS', 'Days');
define('MODULE_SHIPPING_USPS_TEXT_WEEKS', 'Weeks');
define('MODULE_SHIPPING_USPS_TEXT_ESTIMATED', 'Estimated transit: ');
define('MODULE_SHIPPING_USPS_TEXT_TOMORROW', 'Estimated transit: ');
define('MODULE_SHIPPING_USPS_TEXT_EXPRESS', 'Estimated transit: 1-2 days ');
define('MODULE_SHIPPING_USPS_TEXT_PRIORITY', 'Estimated transit: 2-4 days' );
define('MODULE_SHIPPING_USPS_TEXT_PARCELPOST', 'Estimated transit: 3-9 days ');
define('MODULE_SHIPPING_USPS_TEXT_FIRSTCLASS', 'Estimated transit: 2-5 days ');
define('MODULE_SHIPPING_USPS_TEXT_MEDIA', 'Estimated transit: 3-9 days ');
define('MODULE_SHIPPING_USPS_TEXT_PRINTEDMATTER', 'Estimated transit: 3-9 days ');
?>

Debbie D
Franklin County, VA "Moonshine Capitol of the World"
osCmax Mobile Template oscmaxtemplates.com

Link to comment
Share on other sites

YOu are still missing declerations in the language file

 

the file should look like this:

<?php
/*
$Id: usps.php 3 2006-05-27 04:59:07Z user $
 ++++ modified as USPS Methods 2.7 03/26/04 by Brad Waite and Fritz Clapp ++++

 osCMax Power E-Commerce
 http://oscdox.com

 Copyright 2006 osCMax2005 osCMax, 2002 osCommerce

 Released under the GNU General Public License
*/

define('MODULE_SHIPPING_USPS_TEXT_TITLE', 'United States Postal Service');
define('MODULE_SHIPPING_USPS_TEXT_DESCRIPTION', 'You will need to have registered an account with USPS. Click <a target="_blank" href="https://secure.shippingapis.com/registration/"><strong>HERE</strong></a> for registration details. USPS expects you to use pounds as weight measure for your products.');
define('MODULE_SHIPPING_USPS_TEXT_ERROR', 'An error occured with the USPS shipping calculations.<br>If you prefer to use USPS as your shipping method, please contact the store owner.');
define('MODULE_SHIPPING_USPS_TEXT_INSURED', 'Insured for');
define('MODULE_SHIPPING_USPS_TEXT_DAY', 'Day');
define('MODULE_SHIPPING_USPS_TEXT_DAYS', 'Days');
define('MODULE_SHIPPING_USPS_TEXT_WEEKS', 'Weeks');
define('MODULE_SHIPPING_USPS_TEXT_ESTIMATED', 'Estimated transit: ');
define('MODULE_SHIPPING_USPS_TEXT_TOMORROW', 'Estimated transit: ');
define('MODULE_SHIPPING_USPS_TEXT_EXPRESS', 'Estimated transit: 1-2 days ');
define('MODULE_SHIPPING_USPS_TEXT_PRIORITY', 'Estimated transit: 2-4 days' );
define('MODULE_SHIPPING_USPS_TEXT_PARCELPOST', 'Estimated transit: 3-9 days ');
define('MODULE_SHIPPING_USPS_TEXT_FIRSTCLASS', 'Estimated transit: 2-5 days ');
define('MODULE_SHIPPING_USPS_TEXT_MEDIA', 'Estimated transit: 3-9 days ');
define('MODULE_SHIPPING_USPS_TEXT_PRINTEDMATTER', 'Estimated transit: 3-9 days ');
?>

 

 

still the same thing........

Link to comment
Share on other sites

not to be a smart ass but are you loading the language file to the right place:

 

catalog\includes\languages\english\modules\shipping\usps.php

 

There is no reason for it not to show if that is where it is

Debbie D
Franklin County, VA "Moonshine Capitol of the World"
osCmax Mobile Template oscmaxtemplates.com

Link to comment
Share on other sites

While I would like to do that, right now I can not.. I do not use vanilla osc, but oscMAX and that is highly modified, so my version is going to differ greatly. When Jetta gets further along I will grab the latest osc version and do that yes, sorry but for now I just cant.

 

Phpmyadmin

configuration table --> structure

edit set_function from 255 to 1020

 

 

but running the statement imcluded in the latest README should do it

 

Thank you. I think I mixed up the files from admin and includes yesterday. I reloaded the files. After careful file review, I didn't have to make any mods to the files after all, just needed to upload the usps.php files. Thank you very much for the SQL Querry. That did the trick. I am all up and running now. :)

Link to comment
Share on other sites

not to be a smart ass but are you loading the language file to the right place:

 

catalog\includes\languages\english\modules\shipping\usps.php

 

There is no reason for it not to show if that is where it is

 

 

hehe.....I would never think you would be a smart ass =]....checked the path twice....we on the same page......my file

 

<?php

/*

$Id: usps.php 3 2006-05-27 04:59:07Z user $

++++ modified as USPS Methods 2.7 03/26/04 by Brad Waite and Fritz Clapp ++++

 

osCMax Power E-Commerce

http://oscdox.com

 

Copyright 2006 osCMax2005 osCMax, 2002 osCommerce

 

Released under the GNU General Public License

*/

 

define('MODULE_SHIPPING_USPS_TEXT_TITLE', 'United States Postal Service');

define('MODULE_SHIPPING_USPS_TEXT_DESCRIPTION', 'You will need to have registered an account with USPS. Click <a target="_blank" href="https://secure.shippingapis.com/registration/"><strong>HERE</strong></a> for registration details. USPS expects you to use pounds as weight measure for your products.');

define('MODULE_SHIPPING_USPS_TEXT_ERROR', 'An error occured with the USPS shipping calculations.<br>If you prefer to use USPS as your shipping method, please contact the store owner.');

define('MODULE_SHIPPING_USPS_TEXT_INSURED', 'Insured for');

define('MODULE_SHIPPING_USPS_TEXT_DAY', 'Day');

define('MODULE_SHIPPING_USPS_TEXT_DAYS', 'Days');

define('MODULE_SHIPPING_USPS_TEXT_WEEKS', 'Weeks');

define('MODULE_SHIPPING_USPS_TEXT_ESTIMATED', 'Estimated transit: ');

define('MODULE_SHIPPING_USPS_TEXT_TOMORROW', 'Estimated transit: ');

define('MODULE_SHIPPING_USPS_TEXT_EXPRESS', 'Estimated transit: 1-2 days ');

define('MODULE_SHIPPING_USPS_TEXT_PRIORITY', 'Estimated transit: 2-4 days' );

define('MODULE_SHIPPING_USPS_TEXT_PARCELPOST', 'Estimated transit: 3-9 days ');

define('MODULE_SHIPPING_USPS_TEXT_FIRSTCLASS', 'Estimated transit: 2-5 days ');

define('MODULE_SHIPPING_USPS_TEXT_MEDIA', 'Estimated transit: 3-9 days ');

define('MODULE_SHIPPING_USPS_TEXT_PRINTEDMATTER', 'Estimated transit: 3-9 days ');

?>

 

Link to comment
Share on other sites

Thank you. I think I mixed up the files from admin and includes yesterday. I reloaded the files. After careful file review, I didn't have to make any mods to the files after all, just needed to upload the usps.php files. Thank you very much for the SQL Querry. That did the trick. I am all up and running now. :)

 

Great news!!! slow and easy when modifying PHP pages!

 

My procedure (ADD warrants EVERYTHING have a proceedure and sticking to it or I am in deep stuff)

 

I use NoteTab Pro to edit my files

File > Open

While the open file box is in my face I choose the desired file, right click, > COPY, right click > PASTE

now I have my original there AND a copy of one I know works!

select the desired file once more and you're ready to start hacking away at it!

Debbie D
Franklin County, VA "Moonshine Capitol of the World"
osCmax Mobile Template oscmaxtemplates.com

Link to comment
Share on other sites

hehe.....I would never think you would be a smart ass =]....checked the path twice....we on the same page......my file

 

Rob, now thats really strange.. if you want.. private me, and give me FTP access I will take a quick peek

Debbie D
Franklin County, VA "Moonshine Capitol of the World"
osCmax Mobile Template oscmaxtemplates.com

Link to comment
Share on other sites

Here's what has been done so far on the new module:

 

1. Handling for domestic (by method) and international (flat for all methods) is working...

 

 

Is this in the 5.1.0 release? I don't see the flat for all international methods option.

 

I had 5.0.2 functioning correctly and just dropped in the USPS.PHP file into the modules/shipping director w/o any other changes as the readme said.

 

Are you talking about an "as yet unreleased" version?

Edited by gearheadgary

Gary

Link to comment
Share on other sites

Gary, no this version is still in test mode that has the international handling.. hang tight Jetta is making progress..

 

Rob, found your problem (ha created another, sorry I didnt do it tho!) the package 5.1.0 I left the S off the /languages/ folder

I have repaired and reloaded the contribution - I am surprised you are the only one who had that problem!

Debbie D
Franklin County, VA "Moonshine Capitol of the World"
osCmax Mobile Template oscmaxtemplates.com

Link to comment
Share on other sites

Is this in the 5.1.0 release? I don't see the flat for all international methods option.

 

It is in a work in progress. I gave a link to the work that I'm doing in a previous post (fulluvscents.com/uspstestfiles). If you want to grab any copies for your use or for testing, then by all means do so. To view code, just open the htm page and view source - just make sure to remove any leading or trailing white spaces at beginning and end. I make no warranties on functionality at any stage, but it is working on my end through the 10th version and I've made no changes to the general.php or language files. Debbie appears to be having problems with international. But, it works perfectly for me. So, until everything is sorted out I'm not releasing anything. The "as is no warranties" files are there though.

Link to comment
Share on other sites

hahah me too.. but some disater struck when Rob allowed me to FTP to his site.. the strangest thing happened that his entire file structure.. main site, original and new cart all gone.. That was quickly resolved with a backup from his hosting peeps, but we then spent a total of almost 5 hrs working on things.. I saw the issue fairly quickly, but after that we deleved into deeper waters :) His FF refused to allow him back in.. I could get in, he couldnt, finally I remoted into his PC to see what his FF was doing and had him switch to MSIE and he got in.. what a long strange trip it was, but I aqauired yet another great friend :)

 

the host peeps had no idea what happened when I FTP'd like that.. I mean nothing odd happened on this end, I configured the connection and connected, bing, in and all I saw was

/

thats it no one single file or folder, I was in his site on the public side not 5 minutes earlier.. the strangest thing..

Debbie D
Franklin County, VA "Moonshine Capitol of the World"
osCmax Mobile Template oscmaxtemplates.com

Link to comment
Share on other sites

It is in a work in progress. I gave a link to the work that I'm doing in a previous post (fulluvscents.com/uspstestfiles). If you want to grab any copies for your use or for testing, then by all means do so. To view code, just open the htm page and view source - just make sure to remove any leading or trailing white spaces at beginning and end. I make no warranties on functionality at any stage, but it is working on my end through the 10th version and I've made no changes to the general.php or language files. Debbie appears to be having problems with international. But, it works perfectly for me. So, until everything is sorted out I'm not releasing anything. The "as is no warranties" files are there though.

I gave it a shot and when I open the modules>shipping page in admin, I get:

 

Parse error: syntax error, unexpected T_IF in /home/monkeywr/public_html/includes/modules/shipping/usps.php on line 274

 

Should I have also included a language file? I didn't see one.

Gary

Link to comment
Share on other sites

I gave it a shot and when I open the modules>shipping page in admin, I get:

 

Parse error: syntax error, unexpected T_IF in /home/monkeywr/public_html/includes/modules/shipping/usps.php on line 274

 

Should I have also included a language file? I didn't see one.

 

yes in the contribution area you will find the full package which includes the language file

Debbie D
Franklin County, VA "Moonshine Capitol of the World"
osCmax Mobile Template oscmaxtemplates.com

Link to comment
Share on other sites

yes in the contribution area you will find the full package which includes the language file

To Clarify--

 

I am running 5.1.0 successfully.

 

I have applied the interim "Alpha" from fulluvscents, and received the above error.

 

What I'm asking: Is there a language file that accompanies the interim version from fulluvscents? (Since I'm allready running the latest released language file)

Gary

Link to comment
Share on other sites

To Clarify--

 

I am running 5.1.0 successfully.

 

I have applied the interim "Alpha" from fulluvscents, and received the above error.

 

What I'm asking: Is there a language file that accompanies the interim version from fulluvscents? (Since I'm allready running the latest released language file)

 

sorry, no.. use the same language file you curently have in place

Debbie D
Franklin County, VA "Moonshine Capitol of the World"
osCmax Mobile Template oscmaxtemplates.com

Link to comment
Share on other sites

Just to keep everyone up todate, I just fully tested Jetta's V14 and it's fabulous.. I think just a few odds and ends to debug, she added some REALLY REALLY great things in there :)

Debbie D
Franklin County, VA "Moonshine Capitol of the World"
osCmax Mobile Template oscmaxtemplates.com

Link to comment
Share on other sites

Tease. :(

 

Ha Ha Ha. Your lucky I'm going to share when it's done. Just a few more tweaks. I'm shooting for being done by Sunday night (EDST). The trademarks are going to be my biggest battle and I'm saving them for last.

Link to comment
Share on other sites

USPS 5.2.0 has been uploaded to the contributions as a complete package. Tested on 2.2RC2a, single page checkout, international and domestic all options in use, money order, credit card, and Paypal express - with customer logged into account before checkout.

 

Running on Apache 2.2.17, PHP 5.2.14, MySQL 5.0.91 Perl 5.8.8

 

There may be some debugging required in other shop types or servers.

 

Trademark legends are stripped. No decode command. I'd like to see the marks put to use, but the special characters (particularly the forward slash) and the complexity of the script are making it impossible to make one thing work without having an adverse affect on something else.

 

http://addons.oscommerce.com/info/487

 

Enjoy - and PLEASE BACK UP FILES AND DATABASE BEFORE INSTALLING (JUST IN CASE)

Link to comment
Share on other sites

Good grief! What a mess.

 

The last two weeks have been a mess. I personally feel now, like it is in complete order and am totally relieved to have a fully functional USPS module. No matter what you are running, you will NEED to update your module before May and this one is compliant with the new syntax. If you've already got a rather recent working module, you shouldn't need to do anything except replace the usps.php and the language file. No db changes, and no file modifications. If it does need debugging, I'd rather we get it sorted out now, than wait until May.

Link to comment
Share on other sites

I hope to test this tonight on a not yet live 2.3.1 version and will report in if no one else gets to it before I do. Rob that means you & me.. IM .. tonight..

Debbie D
Franklin County, VA "Moonshine Capitol of the World"
osCmax Mobile Template oscmaxtemplates.com

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...