Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Spree extension, provides various ways to select products to highlight -- WORK IN PROGRESS
Ruby
Branch: master
Pull request Compare This branch is 5 commits ahead of fabien:master.

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
app
config
db/migrate
lib
spec
.gitignore
LICENSE
README.markdown
Rakefile
highlight_products.gemspec

README.markdown

Highlight Products

This is an extension for Spree, put together by jomz and upgraded for Rails 3 by joshmcarthur

This extension makes it possible to 'highlight' certain products that you can then easily show on the homepage for example. Highlighting a product updates a newly added timestamp on the Product model. There is also a named scope Product.highlighted, which selects all products that have been highlighted, and orders them so that the first in the result is the last one highlighted. There is no 'unhighlight' button.

I started off with paulcc's promotions extension, but the only thing left of it is the best_sellers method, which I moved to the Product model.. There is an other extension also called promotions, which better deserves the name, as it's about actual promotions (lowered prices), and not about promoting something to the home page.

Installation

  • Add extension to your Gemfile gem 'highlight_products', :git => 'https://github.com/3months/spree-highlight_products.git', :branch => 'rails3'
  • Run bundle install
  • Copy migrations and assets to your application by running rake highlight_products:install
  • Run rake db:migrate to update your schema, and reboot the server.

Usage

Highlight products from the admin/products index page. Then you can use Product.highlighted(:limit => 3) anywhere to get the last 3 highlighted products.

Something went wrong with that request. Please try again.