All Projects → solidusio-contrib → Solidus_related_products

solidusio-contrib / Solidus_related_products

Licence: bsd-3-clause
🍴 Related products extension for Solidus

Programming Languages

ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to Solidus related products

Ecommerce Codeigniter Bootstrap
Responsive, Multi-Vendor, MultiLanguage Online Store Platform (shopping cart solution)
Stars: ✭ 788 (+3326.09%)
Mutual labels:  ecommerce, ecommerce-platform
Nopcommerce
The most popular open-source eCommerce shopping cart solution based on ASP.NET Core
Stars: ✭ 6,827 (+29582.61%)
Mutual labels:  ecommerce, ecommerce-platform
Aimeos Laravel
Laravel ecommerce package for professional, ultra fast online shops, complex B2B applications and #gigacommerce
Stars: ✭ 5,204 (+22526.09%)
Mutual labels:  ecommerce, ecommerce-platform
React Storefront
React Storefront - PWA for eCommerce. 100% offline, platform agnostic, headless, Magento 2 supported. Always Open Source, Apache-2.0 license. Join us as contributor ([email protected]).
Stars: ✭ 292 (+1169.57%)
Mutual labels:  ecommerce, ecommerce-platform
Sylius
Open Source eCommerce Platform on Symfony
Stars: ✭ 6,598 (+28586.96%)
Mutual labels:  ecommerce, ecommerce-platform
Bagisto
An easy to use, free and open source laravel eCommerce platform to build your online shop in no time.
Stars: ✭ 4,140 (+17900%)
Mutual labels:  ecommerce, ecommerce-platform
Ec Cube
EC-CUBE is the most popular e-commerce solution in Japan
Stars: ✭ 591 (+2469.57%)
Mutual labels:  ecommerce, ecommerce-platform
Saleor Dashboard
A GraphQL-powered, single-page dashboard application for Saleor.
Stars: ✭ 278 (+1108.7%)
Mutual labels:  ecommerce, ecommerce-platform
Thirtybees
thirty bees - e-commerce that works for you
Stars: ✭ 580 (+2421.74%)
Mutual labels:  ecommerce, ecommerce-platform
Wellcommerce
Open-source E-Commerce software
Stars: ✭ 499 (+2069.57%)
Mutual labels:  ecommerce, ecommerce-platform
Magento Lts
Official OpenMage LTS codebase | Migrate easily from Magento Community Edition in minutes! Download the source code for free or contribute to OpenMage LTS | Security vulnerability patches, bug fixes, performance improvements and more.
Stars: ✭ 622 (+2604.35%)
Mutual labels:  ecommerce, ecommerce-platform
Vc Platform
VirtoCommerce Platform repository
Stars: ✭ 828 (+3500%)
Mutual labels:  ecommerce, ecommerce-platform
Paid Memberships Pro
The most complete member management and membership subscriptions plugin for your WordPress site.
Stars: ✭ 293 (+1173.91%)
Mutual labels:  ecommerce, ecommerce-platform
Solidus
🛒Solidus, Rails eCommerce System
Stars: ✭ 3,985 (+17226.09%)
Mutual labels:  ecommerce, ecommerce-platform
Workarea
Workarea is an enterprise-grade Ruby on Rails commerce platform
Stars: ✭ 290 (+1160.87%)
Mutual labels:  ecommerce, ecommerce-platform
Yupe
Yupe! is an open source Yiiframework-based online e-commerce solution. Demo https://demo.yupe.ru/
Stars: ✭ 596 (+2491.3%)
Mutual labels:  ecommerce, ecommerce-platform
AquilaCMS
AquilaCMS is an Open Source and "all in one" ecommerce solution, self hosted, built using nodejs (MERN stack)
Stars: ✭ 69 (+200%)
Mutual labels:  ecommerce, ecommerce-platform
React Storefront
Build and deploy e-commerce progressive web apps (PWAs) in record time.
Stars: ✭ 275 (+1095.65%)
Mutual labels:  ecommerce, ecommerce-platform
Example Storefront
Example Storefront is Reaction Commerce’s headless ecommerce storefront - Next.js, GraphQL, React. Built using Apollo Client and the commerce-focused React UI components provided in the Storefront Component Library (reactioncommerce/reaction-component-library). It connects with Reaction backend with the GraphQL API.
Stars: ✭ 471 (+1947.83%)
Mutual labels:  ecommerce, ecommerce-platform
Jet
Jet is an e-commerce framework for Amber / Crystal
Stars: ✭ 18 (-21.74%)
Mutual labels:  ecommerce, ecommerce-platform

Solidus Related Products

CircleCI codecov

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 or via Related Products section on the edit variant UI.

Possible uses

  • Accessories
  • Cross Sells
  • Up Sells
  • Compatible Products
  • Replacement Products
  • Warranty & Support Products

Installation

Add solidus_related_products to your Gemfile:

gem 'solidus_related_products'

Bundle your dependencies and run the installation generator:

bin/rails generate solidus_related_products:install

Usage

Relation Types

You can create four different RelationTypes:

Applies From Applies To Bi-Directional available
Spree::Product Spree::Product Yes
Spree::Product Spree::Variant No
Spree::Variant Spree::Product No
Spree::Variant Spree::Variant Yes

Bi-Directional You can optionally set the bi-directional flag (if available) to automatically create the inverse relation, the flag can be set only on the type creation and can't be changed later, this is needed to avoid unpredictable behavior in the case that the flag is changed. Keep in mind that if you remove one side of the relation, also the other hand will be removed, the same way happens for the description. The discounts are disabled for Bi-Directional by setting the discount amount to be only zero, this is needed because it's not clear how this feature should behave in this case.

The following examples use a Spree::Product -> Spree::Product relation type.

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 = Spree::RelationType.create(name: 'Accessories', applies_from: 'Spree::Product', applies_to: 'Spree::Product')
 => #<Spree::RelationType id: 4, name: "Accessories" ...>
product = Spree::Product.last
 => #<Spree::Product id: 1060500592 ...>
product.accessories
 => []

Since respond_to? will not work in this case, you can test whether a relation_type method exists with has_related_products?(method):

product.has_related_products?('accessories')
# => true

if product.has_related_products?('accessories')
  # Display an accessories box..
end

You can access all related products regardless of RelationType by:

product.relations
 => []

Discounts You can optionally 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 promotion leaving the code value empty, and adding an Action of type : RelatedProductDiscount (blank codes are required for coupons to be automatically applied).

Development

Testing the extension

First bundle your dependencies, then run bin/rake. bin/rake will default to building the dummy app if it does not exist, then it will run specs. The dummy app can be regenerated by using bin/rake extension:test_app.

bin/rake

To run Rubocop static code analysis run

bundle exec rubocop

When testing your application's integration with this extension you may use its factories. Simply add this require statement to your spec_helper:

require 'solidus_related_products/factories'

Running the sandbox

To run this extension in a sandboxed Solidus application, you can run bin/sandbox. The path for the sandbox app is ./sandbox and bin/rails will forward any Rails commands to sandbox/bin/rails.

Here's an example:

$ bin/rails server
=> Booting Puma
=> Rails 6.0.2.1 application starting in development
* Listening on tcp://127.0.0.1:3000
Use Ctrl-C to stop

Updating the changelog

Before and after releases the changelog should be updated to reflect the up-to-date status of the project:

bin/rake changelog
git add CHANGELOG.md
git commit -m "Update the changelog"

Releasing new versions

Please refer to the dedicated page on Solidus wiki.

License

Copyright (c) 2010-2015 Brian Quinn and contributors, released under the New BSD License

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].