Sorting Products In Categories With Product Attributes

📘

If you have a lot of products in a category and need a faster way to specify a custom sort position within your categories, you can use this method.

Step 1: Create A Product Attribute

Start by creating a "Text" attribute in Products>Attributes.
We recommend naming it something that would make sense to your customers when they see it as a sort option. (i.e. Best Sellers)
Specify "Allow Customers to Sort Products by this Attribute"

1293

Step 2: Update Your Products With A Value For This Attribute

We recommend using a CSV for this operation as it is the fastest. Create a CSV with 2 columns:

  • SKU
  • best_sellers (or whatever the "code" is of the attribute created in step 1)
    Using numeric values for the second column works best (i.e. 1 - 99999)

Example below:

skubest_sellers
ABC-123998
DEF-321999

Once you are ready to upload and import your CSV file, go to Products > Product List > Importer and select Import Behavior = Append.

❗️

Error messages when importing

If you get error messages for your CSV file import, please view our Troubleshooting CSV Files article.

Specify New Attribute As The Default Sort Order For Your Category Products

Navigate to Web Settings > Product Settings > Catalog > Sorting
Update "Product Listing Sort By" to the new attribute you created in Step 1.

827

Then all you need to do is Re-index and Flush Cache.