Magento 2 Experts — Hyvä Theme, Tailwind CSS & SEO from a Single Source ›

Magento 2 Sort Direction per Category

Magento 2 Extension Hyvä Ready Magento 2.4.x

SKU: CATEGORYSORTDIRECTION1

  • Set ascending or descending right in the category form
  • Inheritance for subcategories, overridable where needed
  • The visitor's choice always wins
  • Correct arrow in the Hyvä toolbar, no extra JavaScript
Auf Lager
€79.00

Einmaliger Kauf · inkl. 12 Monate Updates · zzgl. MwSt.

No download, but personal setup

No download, but personal setup. This product is not a downloadable software package for self-installation. With your order, you commission Mironsoft to individually set up this module in your shop. We will get in touch with you within 2 business days — we'll sort out the details and payment together then.

This offer is aimed at business owners and companies running a Magento 2 shop.

Overview

Magento 2 sort direction per category: the missing piece of default sorting

When you create a category in Magento 2 you can choose a default sort field, such as price, name or position. The matching Magento 2 sort direction cannot be set per category, though. As a result new arrivals may start with the oldest product on top, or the cheapest items sit at the very end until the visitor touches the toolbar. That costs clicks and revenue.

Mironsoft Category Sort Direction is a Magento 2 extension for Hyvä shops that closes exactly this gap. It adds a direction field to the category form, inherits the value down to subcategories and adds a global default per sort field. Mironsoft sets the module up in your shop.

6 Features

Features of the Magento 2 sort direction at a glance

Magento lets you pick the sort field per category, but not the Magento 2 sort direction. This module closes exactly that gap.

Direction per category

Ascending or descending, right in the category form under the display settings.

Inheritance

Subcategories adopt the direction of their parent until they get a value of their own.

Default per sort field

A global rule such as “price ascending, newest descending” applies whenever a category sets nothing.

Visitor choice counts

If a visitor sorts manually, their selection applies. Your setting is only the starting state.

Hyvä toolbar

The direction arrow shows the real state from the first view, via Alpine.js and without an extra script.

Cache and SEO safe

The Magento 2 sort direction creates no new parameter URLs, canonical tags and the full page cache work as before.

01One field in the category form

Set the Magento 2 sort direction right in the category form

The category form gets an extra field “Default sort direction” under the display settings, with the values Inherit, Ascending and Descending. It works together with the existing “Default product listing sort by” field and needs no maintenance anywhere else.

  • Values: Inherit, Ascending, Descending
  • Works per store view, e.g. a different direction in an outlet store
  • New categories start with “Inherit”
Catalog › Categories › Display Settings
Default Product Listing Sort By
Price
Default sort direction
Ascending
Inherit from parent category
No
Example: effect across the category tree
Sort field and direction per category
New arrivalsCreated at · descending
New arrivals › Autumninherited · descending
Special offersPrice · ascending
02Inheritance and global rules

One value in the tree, many categories controlled

Set the direction once on a top-level category and all subcategories adopt it. Where a category has neither its own nor an inherited value, the global default per sort field from the configuration applies, and finally the stock Magento behaviour.

  • Priority: own value, parent category, default per sort field, Magento default
  • Single subcategories can deviate on purpose
  • No data migration, existing categories stay untouched
03Visitor choice and edge cases

Visitor choice stays in charge: set a default without being pushy

The module only decides how a listing is sorted when nobody has chosen anything. If a visitor picks another sort field or direction in the toolbar, the URL parameter applies as before. The search results page stays on relevance so result quality does not suffer.

  • Search results are not modified
  • Sorting by “Position” can be excluded from the direction rule
  • No reindex needed, clearing the category cache after saving is enough
Stores › Configuration › Mironsoft
Module enabled
Yes
Apply direction to sort by “Position”
No
Default for Price
Ascending
Default for Created At
Descending
Hyvä toolbar · category “New arrivals”
State on first request
Sort byCreated at
Directiondescending (default)
URL/new-arrivals.html
04Hyvä toolbar and cache

Magento 2 sort direction in the Hyvä toolbar and the full page cache

The Hyvä toolbar receives the starting direction on the server and shows the arrow correctly from the first paint, without a script flipping the state afterwards. The full page cache stores the category as usual, because the direction belongs to the category and not to the visitor.

  • Toolbar arrow and label match the starting state
  • No flicker after load
  • Category cache tags are cleared on save
Use cases

Where the Magento 2 sort direction per category pays off in practice

New arrivals and promotions

A “New in” category sorts by creation date descending so the newest product comes first, without anyone maintaining positions.

Price entry point in the outlet

In an outlet or clearance area the cheapest item comes first. The right Magento 2 sort direction speaks to price-conscious visitors immediately and lowers bounce rates.

B2B and spare parts

Part numbers or article names ascending: buyers find positions in the familiar order without switching the toolbar.

Seasonal categories

Popularity first before Christmas, price first in summer. You change the direction on the category in seconds, not in code.

Comparison

Magento 2 default vs. Magento 2 sort direction with the module

The table shows what changes in daily work once the direction becomes controllable per category.

CriterionWithout the moduleWith the module
Direction per categoryNot provided, one value for allAscending, descending or inherit
SubcategoriesEach one separately, no inheritanceParent category value is adopted
Default per sort fieldNot possibleGlobal rule, e.g. price ascending
Visitor sorts manuallyWorksWorks unchanged, takes priority
Changes by editorsDeveloper neededDirectly in the category form
New URL variantsNot relevantNone, the starting state belongs to the category
Setup

Setting up the Magento 2 sort direction in four steps

1

Alignment

Together we clarify which categories should get which Magento 2 sort direction.

2

Setup

Mironsoft installs the module in your shop and creates the global defaults.

3

Testing

We check categories, subcategories, search and Hyvä toolbar on a staging system.

4

Handover

You get a short walkthrough, afterwards your editors maintain the direction themselves.

05How the purchase works

No download — personal setup instead

Mironsoft Category Sort Direction is not listed here as a ready-made download file for self-installation. The purchase is a service commission: we get in touch with you after the purchase, install the module in your shop, and agree together on which categories get which Magento 2 sort direction and whether the global defaults per sort field are set.

Important to know

Your purchase does not include a download link. We will get in touch with you within 2 business days — we'll sort out the details and payment together then. This offer is aimed at business owners and companies running a Magento 2 shop.

FAQ

Frequently asked questions

Everything you need to know about scope, priority of the visitor's choice and the purchase process.

How can I set the sort direction per category in Magento 2?
Magento only offers the sort field per category. With this module the category form gets an additional field for the Magento 2 sort direction, either Ascending, Descending or Inherit.
How do I sort a category descending by default in Magento 2?
Set the sort field as usual, for example Created at, and choose Descending in the new field. Without a visitor selection the listing then appears that way.
What happens when a visitor sorts manually?
Their selection applies via the URL parameter. The module's setting only defines the starting state of the listing.
Does the sort direction affect search results?
No. The search results page stays on relevance sorting so result quality remains unchanged.
Does the setting apply to subcategories too?
Yes, through the Inherit option. A subcategory can deviate with a value of its own.
Does it replace an extension with additional sort options?
No, it complements one. This module only sets the direction. New sort options such as bestsellers come from a separate Mironsoft module and both can be combined.
Does the Magento 2 sort direction work with Hyvä?
Yes, the module is built for Hyvä themes. The toolbar arrow shows the starting state correctly, without additional JavaScript.
Do I need to reindex after saving?
No. The direction is applied when the product list is built. After a change, clear the cache of the affected categories.
Can the direction differ per store view?
Yes, the field supports store views. An outlet store may therefore sort differently from the main shop.
Can I download and install the module myself?
No. This offer is not a download product. After the purchase we install and configure the module for you personally in your shop.
Write Your Own Review
You're reviewing: Magento 2 sort direction – Mironsoft Category Sort Direction
loader
Loading...

You submitted your review for moderation.

This form is protected by reCAPTCHA - the Google Privacy Policy and Terms of Service apply.

Magento 2 sort direction – Mironsoft Category Sort Direction

Magento 2 sort direction – Mironsoft Category Sort Direction

€79.00