Adds oportunity to make bundle of products.
Ruby HTML CoffeeScript Other
Pull request Compare This branch is 63 commits ahead, 5 commits behind romul:master.
Latest commit da6a91b Jul 15, 2016 @damianlegawiec damianlegawiec committed on GitHub Merge pull request #139 from spree-contrib/update_spree_dependencies
Set spree_backend to >= 3.1.0 and < 4.0 versions
Failed to load latest commit information.
app remove spree_wombat dependency from gemfile Apr 20, 2016
bin Use bin instead of script folder for Rails4 Mar 26, 2014
config added spanish locale file Nov 26, 2015
db/migrate WIP: Adding a bundle w/ user selectable variant to cart Mar 5, 2015
lib Modify engine.rb Mar 7, 2016
spec add capybara screenshot development dependency, upgrade capybara to 2… Apr 20, 2016
.gitignore Add rbenv files to gitignore. Jul 18, 2015
.rspec Cleanup spec dup and use document style. Aug 16, 2015
.travis.yml Test against ruby 2.2.4 and 2.3.0 Jul 14, 2016
CONTRIBUTING.md Update README and add contribution guidelines. Aug 16, 2015
Gemfile bump version to 3.2.0.alpha, change version of spree dependency to 3.… Apr 20, 2016
LICENSE.md Update LICENSE. Aug 16, 2015
README.markdown
Rakefile Adding style suggestions Oct 5, 2015
spree_product_assembly.gemspec Set spree_backend to >= 3.1.0 and < 4.0 versions Jul 15, 2016

README.markdown

Product Assembly

Build Status Code Climate

Create a product which is composed of other products.


Installation

  1. Add this extension to your Gemfile with this line:

    gem 'spree_product_assembly', github: 'spree-contrib/spree-product-assembly', branch: 'X-X-stable'

    The branch option is important: it must match the version of Spree you're using. For example, use 3-0-stable if you're using Spree 3-0-stable or any 3.0.x version.

  2. Install the gem using Bundler:

    bundle install
  3. Copy & run migrations

    bundle exec rails g spree_product_assembly:install
  4. Restart your server

    If your server was running, restart it so that it can find the assets properly.


Use

To build a bundle (assembly product) you'd need to first check the "Can be part" flag on each product you want to be part of the bundle. Then create a product and add parts to it. By doing that you're making that product an assembly.

The store will treat assemblies a bit different than regular products on checkout. Spree will create and track inventory units for its parts rather than for the product itself. That means you essentially have a product composed of other products. From a customer perspective it's like they are paying a single amount for a collection of products.

Using with spree_wombat

If you use this with spree_wombat make sure that you add this extension after spree_wombat in your Gemfile

This extension provides a specific serializer for shipments assembly_shipment_serializer, to use this in your Spree storefront make sure you configure spree_wombat like this:

config.payload_builder = {
  'Spree::Shipment' => {
    serializer: 'Spree::Wombat::AssemblyShipmentSerializer',
    root: 'shipments'
  }
}

Contributing

See corresponding guidelines.


Copyright (c) 2007-2015 Spree Commerce Inc. and contributors, released under the New BSD License