I have installed the following modules:

  1. Commerce Shipping module (7.x-2.2)

    Shipping UI

  2. Commerce USPS module (7.x-2.0)

  3. Commerce Physical Product (7.x-1.x-dev)

Checkout without shipping is working fine.Now in checkout settings I have enabled shipping service and info.

I am able to see USPS shipping method config and rules which are set to default (for now). I tried using different rules but can't see any shipping method in the checkout screen.

I have set production account username and url of the USPS.com (this probably isn't the problem).

I want to know step by step procedure to configure the shipping method and rules to add USPS shipping service.

I have 3 products types from which only one will have shipping service,I can see "Shipping" line item type but how to implement it to the product type so that shipping is shown on the checkout screen or is it optional?

  • I am getting this error on the checkout shipping page, "Undefined property: stdClass::$shipping_rates in commerce_shipping_rate_apply() (line 212 of /sites/all/modules/commerce_shipping/commerce_shipping.rules.inc)". Jul 19, 2016 at 14:31

1 Answer 1


Have a lok at the README.txt that comes with the Commerce USPS module, here is the content of it:

About this module

Commerce USPS module provides shipping calculations from the USPS WebTools API


This module depends on the Commerce module (http://www.drupal.org/project/commerce).

In addition, the following modules are required:


  1. Install and enable the module and all dependencies (be sure to use the latest versions of everything). Add dimensions and weight fields (new field types via the Commerce Physical module) to all shippable product types. Populate dimensions and weight fields for all products.

  2. Configure the "Shipping service" checkout pane so that it is on the "Shipping" page. The "Shipping service" checkout pane MUST be on a later page than the "Shipping information" pane. (admin/commerce/config/checkout)

  3. Configure the USPS settings (admin/commerce/config/shipping/methods/usps/edit). You'll need to create USPS WebTools account and obtain a username via https://secure.shippingapis.com/registration/.


Eventually, all of these limitations may be addressed. For now, be warned.

  1. Single "Ship from" address for all products.

  2. Doesn't ensure product dimensions are less than default package size dimensions. In other words, if you have a product that is 1x1x20 (volume=20) and your default package size is 5x5x5 (volume=125), even though the product won't physically fit in the box, these values will be used to calculate the shipping estimate.

  3. Doesn't play Tetris. For example, if you have an order with 14 products with a combined volume of 50 and your default package size has a volume of 60, the shipping estimate will be for a single box regardless of if due to the packaging shape they don't actually fit in the box.

  4. Doesn't limit the weight of packages. If you're trying to ship a box full of lead that weighs 600lbs, this module will let you (instead of breaking the order into more packages).

  5. Doesn't account for packing material. If you need to account for packing material, then you may want to adjust product dimensions accordingly.


Calculating estimated shipping costs is a tricky business, and it can get really complicated really quickly. Knowing this, we purposely designed this module with simplicity in mind. Here's how it works:

  1. Every order must contain at least one package.

  2. The number of packages is determined by calculating the total volume of all products in the order, dividing by the volume of the default package size, and rounding up.

  3. The weight of each package is determined by dividing the total weight of all products in the order by the number of packages.

If you need custom functionality, you have several options:

  1. Determine if it is something that can be generalized to suit a number of users and submit it via the issue queue as a suggestion for inclusion in this module.

  2. Hire one of the maintainers to create a custom module that interfaces with Commerce UPS to add your custom functionality.

  3. Break open a text editor and start coding your own custom module.

Apart from that, the module's project page contains this extra info:

Please refer to the README.txt file for additional information about how this module works and how to set it up.

  1. Install and enable the module and all dependencies.

  2. Add dimensions and weight fields (new field types via the Commerce Physical module) to all shippable product types.

  3. Populate dimensions and weight fields for all products.

  4. Configure the USPS settings (admin/commerce/config/shipping/methods/usps/edit). You'll need to create USPS Web Tools account and obtain a username https://secure.shippingapis.com/registration/ and call USPS to have the account moved into production (tell them you are using 3rd party software).

  • Yes, I have already read this documentation and also have Physical module installed. It explains about Physical module ,USPS config settings etc, But it does not explain how to actually setup the shipping method and rules (using the default method is not showing up on checkout screen). I wanted to know those steps. Jul 19, 2016 at 11:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.