Commit 48c5ed73c7711b8a26c246956478f723040d52ec
1 parent
e45d17e5
Exists in
master
and in
28 other branches
Delete ProductCategorization stuff
It was replaced by faceted search
Showing
4 changed files
with
9 additions
and
57 deletions
Show diff stats
app/helpers/product_category_viewer_helper.rb
app/models/product_categorization.rb
| ... | ... | @@ -1,13 +0,0 @@ |
| 1 | -class ProductCategorization < ActiveRecord::Base | |
| 2 | - belongs_to :product_category, :foreign_key => 'category_id' | |
| 3 | - belongs_to :product | |
| 4 | - | |
| 5 | - extend Categorization | |
| 6 | - | |
| 7 | - class << self | |
| 8 | - alias :add_category_to_product :add_category_to_object | |
| 9 | - def object_id_column | |
| 10 | - :product_id | |
| 11 | - end | |
| 12 | - end | |
| 13 | -end |
app/views/search/_product_categories_menu.rhtml
| ... | ... | @@ -1,42 +0,0 @@ |
| 1 | -<% if @product_category %> | |
| 2 | - <h3 class="current-cat-path"> | |
| 3 | - <%= @product_category.hierarchy.map {|cat| ((cat == @product_category) ? content_tag('span', cat.name) : link_to((cat.name), params.merge({:product_category => cat.id}))) }.join(' → ') %> | |
| 4 | - </h3> | |
| 5 | -<% end %> | |
| 6 | - | |
| 7 | -<% if product_categories_menu %> | |
| 8 | - | |
| 9 | -<div id="product-categories-menu"> | |
| 10 | - <ul> | |
| 11 | - <% if product_categories_menu.empty? %> | |
| 12 | - <% if @product_category %> | |
| 13 | - <li class="cat-empty"> <%= _('There is no sub-categories for %s.') % @product_category.name %> </li> | |
| 14 | - <% else %> | |
| 15 | - <li class="cat-empty"> <%= _('There is no categories.') %> </li> | |
| 16 | - <% end %> | |
| 17 | - <% end %> | |
| 18 | - <% product_categories_menu.each do |cat, hits, childs| %> | |
| 19 | - <li class="cat-parent" > | |
| 20 | - <%= link_to( | |
| 21 | - cat.name + " " + content_tag('small', "(#{hits})"), | |
| 22 | - params.merge({:product_category => cat.id}) | |
| 23 | - ) %> | |
| 24 | - <% if !childs.blank? %> | |
| 25 | - <div> | |
| 26 | - <ul> | |
| 27 | - <% childs.each do |child, child_hits| %> | |
| 28 | - <li class="cat-child"> <%= link_to( | |
| 29 | - child.name + " " + content_tag('small', "(#{child_hits})"), | |
| 30 | - params.merge({:product_category => child.id}) | |
| 31 | - ) %> </li> | |
| 32 | - <% end %> | |
| 33 | - </ul> | |
| 34 | - </div> | |
| 35 | - <% end %> | |
| 36 | - </li> | |
| 37 | - <% end %> | |
| 38 | - </ul> | |
| 39 | -</div> | |
| 40 | - | |
| 41 | -<% end %> | |
| 42 | - |
db/migrate/20110814172228_drop_product_categorization.rb
0 → 100644