solidus
https://github.com/solidusio/solidus
Ruby
🛒 Solidus, the open-source eCommerce framework for industry trailblazers.
Spree::OrderUpdater#update_shipment_state
Updates the +shipment_state+ attribute according to the following logic:
shipped when all Shipments are in the "shipped" state
partial when at least one Shipment has a state of "shipped" and there is another Shipment with a state other than "shipped"
or there are InventoryUnits associated with the order that have a state of "sold" but are not associated with a Shipment.
ready when all Shipments are in the "ready" state
backorder when there is backordered inventory associated with an order
pending when all Shipments are in the "pending" state
The +shipment_state+ value helps with reporting, etc. since it provides a quick and easy way to locate Orders needing attention.Edit
git clone [email protected]:solidusio/solidus.git
cd solidus
open core/app/models/spree/order_updater.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-Spree--OrderUpdater-update_shipment_state-for-pr
# Commit to gitgit add core/app/models/spree/order_updater.rbgit commit -m "better docs for Spree::OrderUpdater#update_shipment_state"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-Spree--OrderUpdater-update_shipment_state-for-pr
hub pull-request
# Celebrate!