goodylabs / spree_sort_by

Spree extension that gives ability to sort by name, price and more...

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SpreeSortBy

Add this line to your application.rb file

   #Hash that maps url param to model attributes for search
    config.sort_params = {"relevance" => "spree_products.sort_position ASC", "relevance_desc" => "spree_products.sort_position DESC", "price" => "spree_prices.amount ASC","price_desc" => "spree_prices.amount DESC", "name" => "spree_products.name", "name_desc" => "spree_products.name DESC" }

Installation

Add spree_sort_by to your Gemfile:

gem 'spree_sort_by'

Bundle your dependencies and run the installation generator:

bundle
bundle exec rails g spree_sort_by:install

Copyright (c) 2013 [name of extension creator], released under the New BSD License

About

Spree extension that gives ability to sort by name, price and more...

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:Ruby 99.2%Language:JavaScript 0.8%