Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Related products extension for SpreeCommerce.com
Ruby
Branch: master
Pull request Compare This branch is 14 commits ahead, 168 commits behind spree-contrib:master.

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
app
config
db/migrate
lib
test
.gitignore
README.md
Rakefile
Versionfile
spree.txt
spree_related_products.gemspec

README.md

Related Products

This extension provides a generic way for you to define different types of relationships between your products, by defining a RelationType for each type of relationship you'd like to maintain.

You can manage RelationTypes via the admin configuration menu, and you can maintain product relationships via Related Products tab on the edit product UI.

Possible uses

  • Accessories

  • Cross Sells

  • Up Sells

  • Compatible Products

  • Replacement Products

  • Warranty & Support Products

Relation Types

When you create a RelationType you can access that set of related products by referencing the relation_type name, see below for an example:

    rt = RelationType.create(:name => "Accessories", :applies_to => "Product")
     => #<RelationType id: 4, name: "Accessories" ...>
    product = Product.last
     => #<Product id: 1060500592 ...>
    product.accessories
     => []

You can access all related products regardless of RelationType by:

    product.relations
     => []

Discounts

If you install the spree-automatic-coupons extension you can also specify a discount amount to be applied if a customer purchases both products. Note: In order for the coupon to be automatically applied, you must create a coupon of type: RelatedProductDiscount and leave the code value empty (blank codes are required for coupons to be automatically applied).

Something went wrong with that request. Please try again.