Code Monkey home page Code Monkey logo

spree_drop_ship's Introduction

Spree Drop Ship

Build Status Code Climate Coverage Status Dependency Status

What is drop shipping?

"Drop shipping is a supply chain management technique in which the retailer does not keep goods in stock, but instead transfers customer orders and shipment details to either the manufacturer or a wholesaler, who then ships the goods directly to the customer." - wikipedia

So the main goal with spree_drop_ship is to link products to suppliers and forward orders to the appropriate suppliers.

Once an order is placed for a product that belongs to a supplier a drop ship order is created for the product's supplier. This drop ship order is then sent to the supplier (via Email by default). The supplier then follows a link to the order within the email where they are prompted to confirm the order.

After the supplier has confirmed an order and is ready to ship, they can log into the site and update the drop ship order shipping method, and tracking number. Once they 'ship' the order the customer will receive their shipment notification, and the drop ship order will transition to a completed state.

Drop Ship Order's make use of the State Machine similarly to the usual Order, Payment, and Shipment models within Spree. The following are the drop ship order states and what they represent:

  • Active: Is the initial drop ship order state indicating that it has been created.
  • Delivered: Represents that the drop ship order's supplier has been notified of the order i.e. supplier's notification has been delivered. By default email notifications will be sent automatically, but you may want to customize things to use an API instead.
  • Confirmed: Represents that the supplier has confirmed receiving the drop ship order notification & information.
  • Complete: Represents that the drop ship order has been shipped, and the supplier's work is complete.

Spree Drop Ship used with Spree Marketplace allows handling payments to your suppliers via ACH direct deposits. This is still currently a work in progress, and any input is welcome.

Integrations

Spree Drop Ship will support several other Spree extensions being used by scoping information by supplier.

Some extensions that can be used in conjunction with Spree Drop Ship:

  • spree_digital
  • spree_editor
  • spree_group_pricing
  • spree_marketplace
  • spree_related_products

Please Note: If you intend to use any of these extensions you should install them before installing spree_drop_ship so that spree_drop_ship's migrations are run last. You should also place spree_drop_ship AFTER all other extensions in your Gemfile.

Installation

Here's how to install spree_drop_ship into your existing spree site AFTER you've installed Spree:

Add the following to your Gemfile:

gem 'spree_drop_ship', github: 'jdutil/spree_drop_ship'

Make your bundle happy:

bundle install

Now run the generator:

rails g spree_drop_ship:install

Then migrate your database if you did not run during installation generator:

bundle exec rake db:migrate

And reboot your server:

rails s

You should be up and running now!

Sample Data

If you'd like to generate sample data, use the included rake tasks:

rake spree_sample:load               # Loads sample data into the store
rake spree_sample:suppliers          # Create sample suppliers and randomly link to products
rake spree_sample:drop_ship_orders   # Create sample drop ship orders

Demo

You can easily use the spec/dummy app as a demo of spree_drop_ship. Just cd to where you develop and run:

git clone git://github.com/jdutil/spree_drop_ship.git
cd spree_drop_ship
bundle install
bundle exec rake test_app
cd spec/dummy
rake db:migrate db:seed spree_sample:load spree_sample:suppliers spree_sample:drop_ship_orders
rails s

Testing

Be sure to bundle your dependencies and then create a dummy test app for the specs to run against.

bundle
bundle exec rake test_app
bundle exec rspec spec

Todo

  • suppliers should be able to manage option types and values (unsure about whether to scope to supplier or not, but thats probably best solution for everyone)
  • Stock Items should automatically be set to backorderable false if the variant doesnt belong to the stock locations supplier.
  • Must allow suppliers to edit their stock location addresses & require it.
  • Return Authorization UI
  • Better documentation
  • Determine how best to handle single product having multiple suppliers. Needs to move supplier association to variant level.
  • related products should only allow suppliers own products to be related
  • depending on how we handle suppliers selling the same product we should consider not creating stock items at all for variants / stock locations supplier doesnt own. that way we would no longer need the packer_decorator. This would require we go the route of creating a variant for each different supplier. (supplier as option type?)

Contributing

In the spirit of free software, everyone is encouraged to help improve this project.

Here are some ways you can contribute:

  • by using prerelease versions
  • by reporting bugs
  • by suggesting new features
  • by translating to a new language
  • by writing or editing documentation
  • by writing specifications
  • by writing code (no patch is too small: fix typos, add comments, clean up inconsistent whitespace)
  • by refactoring code
  • by resolving issues
  • by reviewing patches

Donating

Bitcoin donations may be sent to: 1L6akT6Aus9r6Ashw1wDtLg7D8zJCVVZac

Copyright (c) 2012-2013 Jeff Dutil, released under the New BSD License.

spree_drop_ship's People

Contributors

anthonycreates avatar bhelx avatar jdutil avatar jfields avatar jsqu99 avatar rafeeqskr avatar rterbush avatar simonhildebrandt avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.