solidus
https://github.com/solidusio/solidus
Ruby
🛒 Solidus, the open-source eCommerce framework for industry trailblazers.
Spree::OrderMerger#merge!
Merge a second order in to the order the OrderMerger was initialized with The line items from `other_order` will be merged in to the `order` for this OrderMerger object. If the line items are for the same variant, it will the quantity of the incoming line item to the existing line item. Otherwise, it will assign the line item to the new order. After the orders have been merged the `other_order` will be destroyed. order the OrderMerger was initialized with. specified, the order user association will not be changed.
Edit
git clone [email protected]:solidusio/solidus.git
cd solidus
open core/app/models/spree/order_merger.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-Spree--OrderMerger-merge--for-pr
# Commit to gitgit add core/app/models/spree/order_merger.rbgit commit -m "better docs for Spree::OrderMerger#merge!"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-Spree--OrderMerger-merge--for-pr
hub pull-request
# Celebrate!