Acro CommerceAcro Commerce
Dimitris Bozelos
By Dimitris Bozelos

Senior Software Developer


Posted in

September 5, 2017

All Articles

Shipping Price Matrix: Define Shipping Costs in Drupal Commerce | Article

Shipping Price Matrix: A Drupal Commerce Module for Shipping Costs

It is very common that the shipping costs for delivering products ordered online depend on the weight of the packaged products and the number of packages. Sometimes, however, store owners determine that shipping service costs need to be directly related to the value of the order. For such cases, Acro Commerce has recently sponsored the development of the Commerce Shipping Price Matrix module.

What does the module do?

The Shipping Price Matrix module provides a new shipping method that can be added to Drupal Commerce sites. A price matrix is a list of entries that define how much the cost of a shipping service should be depending on the value of the order. For example, you can create a price matrix that says:

  • Orders with a value less than $30 should have a shipping cost of $5
  • Orders between $30 and $70 should have a shipping cost equal to 10 percent of the order subtotal with a minimum $5 cost
  • Orders between $70 and $150 should have a shipping cost of 8 percent of the order subtotal to a maximum of $10
  • Orders over $100 should have free shipping

Our price matrix may look like the following:

Shipping price matrix - Screen 2

Price matrices can be conveniently uploaded as CSV files so that store owners can manage them outside of the website.

Advanced functionality

Some more advanced functionality has been cooked into the Shipping Price Matrix module. What if an order contains many products, one or more of which are eligible for free shipping? The module allows you to calculate the shipping costs based on the order subtotal, excluding those products. This can be done in two ways:

  1. You can exclude certain product types from the shipping cost calculation. Say you have a store selling T-shirts and jeans, among other things. You want to provide free shipping for all T-shirts, but not for jeans and other product types. You can do exactly that.
  2. You can also exclude individual products from the shipping cost calculation based on a custom field that you can add to your products. By default, this field would be set to “No” (meaning don’t exclude) but store owners can set it to “Yes” when editing individual products. Products marked with a “Yes” in the field will be excluded from the order subtotal that will be used to calculate the shipping costs.

Here’s an example of what the module’s configuration looks like:

Shipping price matrix - Screen 1

What’s next?

We have just released the first version of the module, and we certainly look forward to getting feedback from store owners and the Drupal community. One functionality we are looking to add is the ability to configure whether taxes or promotional discounts should be considered when calculating the shipping costs.

If you are looking for a way to calculate shipping costs based on a price matrix, this module might be exactly what you’re looking for! Reach out to our team and we can help you determine whether it’s the right fit for your site.

Get the business insight you need to succeed! Free strategic consultation!
June 29, 2026

State of composable commerce for B2B 2026 | Acro Commerce

Composable rewards discipline and punishes shortcuts. What delivered ROI across real mid-market B2B builds in 2026, what backfired, and what comes next.
June 18, 2026

Acumatica spotlight: agent-ready APIs | Acro Commerce

A clean API layer over Acumatica lets AI agents and dealers move at machine speed without overrunning entitlements. Catalogue, pricing and quoting exposed.
June 17, 2026

Acumatica spotlight: AI-ready data | Acro Commerce

The ERP already holds the truth. Reshaping Acumatica product attributes and rolling out schema turns an invisible catalogue into an AI-cited source.