Many customers wish to sort their products in a certain order, perhaps to push the more popular products up the list or highlight certain product lines.
This can be setup in a number of ways (importing the data from your accounting ERP product custom fields, or even from a .csv file we integrate to the site if you don't have enough fields available in your accounting system) but for the purposes of this example, we'll focus on controlling this through the admin area.
The sort order can be set via a product userfield on the site and will display in the correct order inside each category.
It's a good idea to navigate to the product listing page of the category you'd like to set a product sort order for.
Edit the sort order field
1. Login to the admin area
2. Navigate to Products > Products in the drop-down list at the top of the Admin:
3. Select the product (or search) that you'd like to add a sort to.
4. Click the Additional Fields tab:
5. Navigate to the Product Sort Order field (Note: your field may have a slightly different name.)
6. Enter the value of the sort order for this product. It's easiest to utilise a numeric method 01, 02 etc. If you have more than 100 products in the category, ensure you allow 3 numerals 001, 002. Note: Any products in the category without a sort order will automatically display to the top.
7. Click Save
8. The sort order updates once a day at midnight - so you'll want to make sure to have your data updated in advance before you want the sort changes showing up.
If you're using only one field to sort by - we have the option to set this to work with numerical values ie. without leading zeros.
However if you're using our multi-sort option via drop-down:
NOTE: in this example Popularity is used for a custom sort vs. the rest in the drop-down are standard data sets. The custom sort can be renamed to anything you like eg. "Most Popular" or "Top Sellers" etc.
then alphanumeric is the only option available for sorting - even if the only values in the field are numerical.
A Note About Sorting Numbers
Numerical sorting is when a list of numbers is sorted based on their numeric value. In this type of sorting, smaller numbers come first and larger numbers come last. For example, when you apply numerical sorting to the list [1, 2, 10, 12, 24, 25, 105, 243], the sorted list would be:
1, 2, 10, 12, 24, 25, 105, 243
Alphanumeric sorting, on the other hand, is when a list of numbers and letters is sorted based on their alphanumeric value, which takes into account both their numeric and alphabetic values. In this type of sorting, numbers are still sorted based on their value, but letters are sorted based on their position in the alphabet. For example, when you apply alphanumeric sorting to the list [1, 2, 10, 12, 24, 25, 105, 243], the sorted list would be:
1, 10, 105, 12, 2, 24, 243, 25
Notice how the numbers are still sorted based on their value, but the order of "10" and "12" is switched because "10" comes before "12" alphabetically. Similarly, "105" comes before "12" because "1" comes before "2" alphabetically.