Sort category products

Adobe Commerce feature {width="20"} Exclusive feature only in Adobe Commerce (Learn more)

The position of products in a category can be specified manually by dragging and dropping products into position or by applying a predefined sort order. By default, products can be sorted by stock level, age, color, name, SKU, and price. Automatic sort overrides the current sort order and resets any drag-and-drop positions that were set manually. The sort order of colors and the minimum stock level that can be required for products to be included in the list are set in the Visual Merchandiser configuration.

NOTE
On the category pages, Out of stock products are always displayed after In Stock products on the product listing with all sorting types.

You can set up the category options separately for each store view to determine the selection of products, their relative position in the list, and the attributes that are available for category rules. However, there is a single, global sort order and product position in the catalog and they are shared across all store views, stores, and websites.

Step 1: Set the scope of the configuration

  1. On the Admin sidebar, go to Catalog > Categories.

  2. If necessary, choose the Store View where the settings apply.

    For a multi-store installation, the Store View setting applies the sort order to all available views within the store.

  3. In the category tree on the left, choose the category that you want to edit.

    Category tree {width="700" modal="regular"}

Step 2: Sort the products

NOTE
When sorting a category by a product attribute, products with the same attribute values are also sorted by their Product ID in the ascending order.

In the Products in Category section, click the tiles ( View tiles ) icon to show the product tiles in a grid. Use either the manual or automatic method to sort the products.

Product tiles {width="600" modal="regular"}

Method 1: Manual sort

  1. Set Sort Order to your preference.

    Sort order {width="600" modal="regular"}

  2. To apply the new sort order, click Sort.

  3. To save the sort order, click Save Category.

  4. When prompted, update any invalid indexers.

Method 2: Automatic sort

  1. Set Match products by rule ( Toggle yes ) to Yes.

  2. Set Automatic Sorting to your preference.

  3. To create a category rule, follow the instructions in the next step.

Step 3: Create a category rule

  1. Set Match products by rule ( Toggle yes ) to Yes.

  2. Click Add Condition.

  3. Choose the Attribute that is the basis of the condition.

  4. Set Operator to one of the following:

    • Equal
    • Not equal
    • Greater than
    • Greater than or equal to
    • Less than
    • Less than or equal to
    • Contains
  5. Enter the appropriate Value.

    Category condition {width="600" modal="regular"}

  6. To add another condition, click Add Condition and repeat the process.

Step 4: Save, refresh, and verify

  1. When complete, click Save Category.

  2. When prompted to refresh the cache, click Cache Management and refresh each invalid cache.

  3. In the storefront, verify that the product selection, sorting, and category rules work correctly.

    If you must make adjustments, change the settings and try again.

recommendation-more-help
af062d56-f22c-4537-813d-bedf8b92a071