Sort Categories and Products
Copyright © 1999, William Weiland
Overview
The sorter.mv(c) module gives you the ability to sort your categories and products. You can sort the categories by name or code and the products by name, code, price, or entry date (internal ID number). Product sorts can be done either ascending or descending.
Setup
1) In admin, click Add Modules
2) Click the file upload button
3) Browse to find the file on your hard drive and upload
4) Click Add to add it to the domain
5) Then in admin click on Stores
6) Click the image to the left of your store name
7) Click on Utilities
8) Check the box next to the Sort Module
9) Click Update

Configuration (Merchant versions 4.14 - 4.24)
1) Label for Count: As example, you could put (%category_count%)%category_parent% in the input. The first token will display the count in the category. The second will display a character of your choosing if the category is a parent category and there are sub-categories that can be viewed.
2) Parent Token Replacement: As example, a + character would display the + after the category name if it is a parent.
3) Number for Image: If the product order number is less than the trigger, it will display the chosen image. You can have multiple tiers and images. For example 7|25 would display the first image if the order number is less than 7 and the second image if 7 or more but less than 25.
4) Image path: Path of the images. If you have multiple tiers you can have multiple images. In the above example you could have graphics/new.gif|graphics/sale.gif which would display the new image for the first tier and the sale image for the second tier.

Usage
1) In admin, click on Stores
2) Click the image to the left of your store name
3) Click the image to the left of Utilities under your store
4) Click the link to the Sort Categories and Products
5) Choose the desired sort order

Usage Options
1) Sort Categories - You can sort the categories by name, code, or entry date. Many stores find that their categories are best sorted by category code rather than category name. This way they can create codes which will put their categories in the order they want. While most may actually coincide with category names being alphabetical, stores can rearrange the categories to put things like "Specials" or "Close Out" at the top of bottom of the list. The customer does not see the category code, they only see the results of the sorted list.

2) Sort Products - The products can be sorted by name, code, price, or entry date. The product sorting can be done either as either ascending or descending. Most stores will sort the products by name. The very quick sort is done storewide with one button click. The storewide sort results in the products being sorted in all of the category screens, the product list screen, and the search screen.

3) Sort Products Within Category - You can sort the products within individual categories differently than the sorting in the store at large. So while the product list and most categories might be sorted alphabetically, you could have others sorted by price as ascending or descending. You can sort the products by a specific category and then on the next screen, make minor changes to re-arranged that sorting. This gives you the ability to move certain products to the top for more customer visibility.

4) Move Products to Top - You can also list up to 1999 product codes in the order you want them and they can appear before any other products on the product list, search and each category screen. This ability to assign a sort order number also makes it possible to display an image, e.g. new or hot, to all products with a sort order number less than the trigger you assign.

5) Count Products In Categories - You can also elect to count the products in each category. If you do, the counts will be available at runtime in Merchant. By having the data in a quick lookup table, Merchant does not have to count the products in each category as it displays the category list in the category tree. It simply shows the previously stored totals. This option cannot be used in stores which use availability groups to hide products from some customers because the totals would show the amounts for all products in each category. The sorter module provides OpenUI hook points to display the products in category total after the category name. To use that option, your store needs to have the OpenUI installed. Alternatively, the module has a token which can be run by other 3rd party modules to report the products in category totals. That method may or may not require the OpenUI, depending on the module which is going to use the token.