Skip to main content

Drupal Commerce USPS Shipping

Published on
Just like my article for Drupal Commerce FedEx, I am writing up a quick run-through for Drupal Commerce USPS. Before we begin, make sure you have Physical Fields and Commerce Physical Product modules installed and attached to your product types not product display. Enable Commerce USPS module and let's get rolling. Screen Shot 2013-06-23 at 12.16.49 PM Screen Shot 2013-06-23 at 12.23.25 PMNow that the module is enabled we need to head over to USPS Web Tools website and create an account: Create a new account regardless if you or the client has a USPS website account already. From my research I could not find a way to enable USPS Web Tools into an existing account - if you know different let me know! To register with USPS Web Tools you will have to fill out your contact and company info. In my case I filled out the form with my clients information, then specified their website address and selected that the USPS Web Tools will be used "Exclusively on my Web site." Once you submit the form, USPS will send you an email titled "Important USPS Web Tool Registration Notice." This email contains your API username and password - archive this, print it, save it. Your account is now in testing mode. USPS utilizes this testing mode for API developers, which we are not, since we are using developed software. The module will not work using the test server - your account must be in production mode. In order to gain production access you will have to call USPS with your API username and tell them you are ready to have production access. Let them know you are using pre-developed software. The number is: 1-800-344-7779; it took me less than two minutes. Screen Shot 2013-06-23 at 12.31.52 PM Once you are off of the phone, it is now time to configure your USPS shipping methods. Navigate your way over to: admin/commerce/config/shipping/methods/usps/edit. Add the postal code for the location where the products will be shipped from and select the various shipping options the Commerce USPS module provides. The module automatically has the production URL. All that you need to do is simply just copy and paste your API username. Save the settings and give it a whirl!

I'm available for one-on-one consulting calls – click here to book a meeting with me 🗓️