SpreeCommerce Favorite Products

Marking a product as favorite is creating a collection of products you like and might want to buy in the future. Obviously, it’s super convenient as you don’t have to search from thousands of products each time you want to have a look at or buy something from your own personal favorites.

For more information, read on or watch a video.Our SpreeCommerce Favorite Products Extension adds the following features to a SpreeCommerce store :

  1. Ability for the customer to ‘Mark a product as favorite’ on the product detail page.
  2. Favorite Products tab on header of the fronted store
  3. Favorite Products tab in the administrator section for the store owner to view favorites of all customers.

It is an open source extension. The following are the steps to install, test and contribute for improvement and/or expansion.

Installation


Add spree_favorite_products to your Gemfile:

gem ‘spree_favorite_products’, github: ‘vinsol/spree_favorite_products’, branch: ‘3-0-stable’

For older versions of spree

# Spree 2.2.x

gem ‘spree_favorite_products’, ‘2.2.3’

# Spree 2.2.x

gem ‘spree_favorite_products’, ‘2.0.3’

# Spree 2.2.x

gem ‘spree_favorite_products’, ‘1.0.0’

Bundle your dependencies and run the installation generator:

# Spree 2.1.x

bundle exec rail g ‘spree_favorite_products:install

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

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

require ‘spree_favorite_products/factories’

Contributing


  1. Fork the repo.
  2. Clone your repo.
  3. Run bundle install.
  4. Run bundle exec rake test_app to create the test application in spec/test_app.
  5. Make your changes.
  6. Ensure specs pass by running bundle exec rspec spec.
  7. Submit your pull request.

You can access the code here. follow us on twitter for more updates.