Module: Workarea::Search::Storefront::Product::Sorting
- Included in:
- Workarea::Search::Storefront::Product
- Defined in:
- app/models/workarea/search/storefront/product/sorting.rb
Instance Method Summary collapse
-
#category_positions ⇒ Hash
A hash of the position the product has in each category.
- #search_positions ⇒ Object
Instance Method Details
#category_positions ⇒ Hash
A hash of the position the product has in each category. Used for featured sorting.
11 12 13 14 15 16 |
# File 'app/models/workarea/search/storefront/product/sorting.rb', line 11 def category_positions Catalog::ProductPositions.find( model.id, categories: categorization.to_models ) end |
#search_positions ⇒ Object
18 19 20 |
# File 'app/models/workarea/search/storefront/product/sorting.rb', line 18 def search_positions Workarea::Search::Customization.positions_for_product(model.id) end |