solidus

https://github.com/solidusio/solidus

Ruby

🛒 Solidus, the open-source eCommerce framework for industry trailblazers.

Spree::Stock::Coordinator#build_packages

Build packages as per stock location

It needs to check whether each stock location holds at least one stock
item for the order. In case none is found it wouldn't make any sense
to build a package because it would be empty. Plus we avoid errors down
the stack because it would assume the stock location has stock items
for the given order

Returns an array of Package instances

Source | Google | Stack overflow

Edit

git clone [email protected]:solidusio/solidus.git

cd solidus

open core/app/models/spree/stock/coordinator.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-Spree--Stock--Coordinator-build_packages-for-pr


# Commit to git

git add core/app/models/spree/stock/coordinator.rbgit commit -m "better docs for Spree::Stock::Coordinator#build_packages"


# Open pull request

gem install hub # on a mac you can `brew install hub`

hub fork

git push <your name> -your-name--update-docs-Spree--Stock--Coordinator-build_packages-for-pr

hub pull-request


# Celebrate!