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

Magento 2 out of stock products last – in category and search listings

Magento 2 Extension Hyvä Ready OpenSearch Magento 2.4.x

SKU: OUTOFSTOCKATLAST1

  • Sold-out items last in category pages and search results
  • Under every sort order, including price, name or position
  • Directly in the OpenSearch index, pagination and filters stay consistent
  • Threshold and exceptions configurable per category and store view
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.

Magento 2 extension for Hyvä

Magento 2 out of stock products last – in category and search listings

For Magento 2 out of stock products last, this module solves the problem without making you hide sold-out items. Available products come first, sold-out ones follow behind, no matter whether your customers sort by price, name or position. The order is built directly in the OpenSearch index, so page count, hit count and filters stay correct.

Many shops keep sold-out products visible on purpose because the pages rank and returning customers search for them. The catch: they occupy the best spots in the category and visitors click on items they cannot buy. The extension reverses that order without touching inventory management. We set it up in your Hyvä shop.

6 features

Features for Magento 2 out of stock products last: the overview

Six building blocks make sure available goods come first while the list stays consistent.

Category and search

The same rule on category pages and on the search results page.

Independent of sort order

Whether price, name or position: available products always come first.

Sorting in the search index

The order is built in OpenSearch, not by reshuffling the page afterwards.

MSI aware

Uses the salable quantity of the assigned stock, not just a flag.

Threshold

Define at which remaining quantity a product counts as sold out.

Exceptions

Individual categories can be excluded, e.g. collectibles or discontinued items.

01Why in the index

Magento 2 out of stock products last: why the order has to be built in the search index

If sold-out items are pushed back only after the page is loaded, page 1 suddenly has few results and page 3 suddenly has available ones. The module therefore writes a sort criterion into the OpenSearch index and orders the result set before the page is cut. Page count, product count and layered navigation stay correct.

  • One extra sort field in the search index
  • Applies before the page is cut, not after
  • Layered navigation counts remain correct
Category · sorted by price ascending
Order in the list (example)
Product Ain stock
Product Bin stock
Product Csold out
Stores › Configuration › Out Of Stock At Last
Enabled
Yes (store view English)
Salable quantity threshold
0
Treat backorder as
Available
Excluded categories
Discontinued
02Defining stock status

Defining stock status: what counts as sold out for Magento 2 out of stock products last

By default a product counts as sold out when its salable quantity is 0. A threshold lets you treat small remaining quantities the same way, for instance when only one display piece is left. Products with backorders allowed can be classed as available or as sold out.

  • Threshold for the salable quantity
  • Backorders as available or sold out
  • Stock changes are picked up on reindex
03A note on display

Keep sold-out products visible and still move them back

The module only sorts what Magento shows anyway. If your shop hides sold-out products, there is nothing to sort. If you would rather hide nothing but favour what is available, you get the best of both: full visibility for SEO and returning visitors, good positions for what can ship.

  • No interference with inventory management
  • Sold-out pages stay reachable for search engines
  • Can be combined with back-in-stock alerts
Search result · example
Hits for "power adapter"
Hits 1–8in stock
Hits 9–10sold out
Use cases

When Magento 2 out of stock products last pays off

Three situations for Magento 2 out of stock products last where the order directly affects revenue and bounce rate.

Large ranges with high turnover

If you carry thousands of items, a share is always out of stock. Without sorting by availability those items fill the first page. With the module shoppers first see what could be in the parcel tomorrow.

Seasonal and discontinued items

After the season the pages stay reachable for search engines but drop out of sight. The item keeps its place in the catalog without pushing current goods aside.

Shops with order limits and single pieces

With collectibles or remainder stock the status flips quickly. A threshold helps to consistently put items with zero or almost zero remaining quantity at the back.

Comparison

Magento 2 out of stock products last: with and without the module compared

With Magento 2 out of stock products last the difference shows mostly in pagination and upkeep.

AspectWithout the moduleWith the module
OrderSold-out items sit in the middle of the listAvailable first, sold out afterwards
Sort by price or nameStock status plays no roleApplies to every sort order
PaginationReshuffling by script makes pages jumpSorting before the page cut in the index
Layered navigationCounts can deviateCounts stay correct
UpkeepManual positions in the categoryAutomatic on every reindex
Sold-out pagesEither hidden or disturbingly up frontVisible but placed at the back
Process

How we set up Magento 2 out of stock products last in your shop

Setup of Magento 2 out of stock products last is done personally by Mironsoft so index and stock sources fit together.

1. Check inventory

For Magento 2 out of stock products last we clarify whether you use MSI and which source is decisive for the store view.

2. Installation

The module is set up and the sort field is added to the OpenSearch index.

3. Define rules

Threshold, handling of backorders and excluded categories are agreed with you.

4. Reindex and review

After the first reindex we check the order in your most important categories together.

Delimitation

Magento 2 out of stock products last compared with bestseller sorting and stock texts

This module sorts by availability and works in the background under every sort order. It is not an additional sort option in the dropdown. If you also want a choice such as Best Sellers, use the Mironsoft module Bestseller Sorting: both apply in sequence, available before sold out first, then by sales.

Showing stock status texts, icons and colours is in turn the job of the Stock Status Text module. Out Of Stock At Last only changes the order in the list. There is nothing special to consider legally as long as you state delivery times and availability correctly on the product page.

04How the purchase works

No download — personal setup instead

Magento 2 out of stock products last is not listed here as a ready-made download file for self-installation. The purchase is a service commission: we get in touch after the purchase, set the module up in your shop, run the first reindex and check the order in your most important categories together with you.

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 about Magento 2 out of stock products last

Everything important about sorting, the index, and how the purchase of the extension works.

Do I have to change the sort order in my categories?
No. The chosen sort order stays; sold-out products are only placed behind the available ones within that order.
Why does it only work with OpenSearch?
The ordering must happen before the page is cut. That works reliably in the search index, which Magento 2.4 uses for categories and search anyway.
Does the order change right after a sale?
The order changes with the next index update. With your indexer on update-on-save or cron, that is usually shortly afterwards.
Does this hide sold-out products?
No, they stay visible, just further back. If you want to hide them completely, use the Magento default setting.
Does it work with multiple sources (MSI)?
Yes, the salable quantity of the stock assigned to the store view is used.
How can I show out-of-stock products at the end of the category in Magento 2?
For Magento 2 out of stock products last, activate this module for the store view, set a threshold, and after the reindex available products come before sold-out ones.
How can I order search results by availability in Magento 2?
The module also acts on the search results page. The sort criterion lives in the OpenSearch index so it works together with every other sort order.
Does the module work with Hyvä?
Yes. It only changes the order of hits in the index and needs no frontend code of its own, so there are no conflicts with your Hyvä theme and no additional JavaScript.
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 personally in your shop.
Write Your Own Review
You're reviewing: Magento 2 out of stock products last – Mironsoft Out Of Stock At Last
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 out of stock products last – Mironsoft Out Of Stock At Last

Magento 2 out of stock products last – Mironsoft Out Of Stock At Last

€79.00