Shipping calculators still include cancelled items in shipping cost
Open
@senemsoy is already working on this.
Since Sep 2, 2026.
changelog:solidus_core
confirmed
- Dominant language
- Ruby
- Stars
- 5.3k
- Forks
- 1.4k
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 62
Description
Steps to reproduce
- Complete order with many items and flexirate shipping calculator
- Cancel items in shipment
- Adjustment created does not take into account shipping cost
- Cost on shipping was not changed even though less items will be shipped
Expected behavior
After an item is cancelled the calculator should only calculate cost based on what is actually going to ship.
Actual behavior
Shipping calculators are calculating cost on all items even if they are cancelled:
- https://github.com/solidusio/solidus/blob/master/core/app/models/spree/calculator/shipping/flexi_rate.rb#L12
- https://github.com/solidusio/solidus/blob/master/core/app/models/spree/calculator/shipping/flexi_rate.rb#L12
- https://github.com/solidusio/solidus/blob/054e4bd75c65166d316f3f63be85efb48736bcdb/core/app/models/spree/calculator/shipping/per_item.rb#L14
- etc.
System configuration
Solidus Version: 2.1 (seems to be in all)
Extensions in use: core, frontend, backend
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.