No release in over 3 years
Calculate weight based charges for a Spree order
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

~> 4.0.0
>= 0.7.0
>= 1.24
>= 4.2.8
>= 0.5.1
>= 0.3.2
~> 3.1.0
~> 3.1.0
>= 0.24.1
~> 4.0.0
~> 0.9.0
~> 1.3.9

Runtime

~> 2.4.0
 Project Readme

Solidus Weighted Shipping

CI Codecov Release candidate Ruby License

Solidus Weighted Shipping calculates rates from weight bands you define. It prices each Solidus package locally, without carrier accounts or network calls.

It supports:

  • weight-band rates and overflow parcels
  • per-item weight and dimension limits
  • a fallback for missing product weights
  • package-level handling fees
  • order-level free shipping
  • validated, exact-decimal configuration

Requirements

Ruby 3.3 or newer and Solidus 4.6.2, 4.7, or 4.8 are supported. See the tested compatibility matrix for the exact Ruby and Rails combinations.

Installation

This checkout is versioned 4.0.0.pre. To use it before the first stable release, add the GitHub repository to your Gemfile:

gem "solidus_weighted_shipping",
  github: "futhr/solidus-weighted-shipping",
  branch: "main"

After 4.0.0 is published, use the normal RubyGems dependency:

gem "solidus_weighted_shipping", "~> 4.0"

Run bundle install, then choose Weighted Shipping as the base calculator for a shipping method in Solidus admin.

Configuration

Enter one maximum weight: price band per line. Weights use the store's product weight unit and prices use the order currency:

1: 6
2: 9
5: 12
10: 15
20: 18

The calculator also exposes item limits, handling rules, a free-shipping threshold, and a default item weight. Invalid configuration disables the rate instead of guessing a checkout price. The logic reference documents every boundary and scope.

Migrating from spree_postal_service

The gem and calculator have new names. Stop application processes, replace the old dependency, then preview the database conversion from the new bundle:

DRY_RUN=1 bin/rake solidus_weighted_shipping:preferences:migrate

Follow the migration guide for the required deployment order and rollback plan.

Development

bin/setup
bin/sandbox
bin/rake
bin/rake quality:coverage
bin/rake quality:lint
bin/rake quality:mutation

Start with the configuration guide. Changes are welcome through CONTRIBUTING.md; security reports belong in SECURITY.md.

License

Solidus Weighted Shipping is available under the BSD 3-Clause License.