Free Magento 2 Discontinued Products Module: Retire a Product, Not Its Page

Every catalog has products that stop. A supplier drops a model, a part is replaced by a newer revision, a variant is no longer made. The shop is then left with a product page that still looks alive, and three bad options for dealing with it.

Leave it live, and shoppers add something to the cart that you cannot ship. Disable it, and an indexed URL that people bookmarked, linked and found in search turns into a 404. Delete it, and you lose the history on top of that. In all three cases the buyer meets a dead end exactly where a good store would point to what to buy instead.

This is the problem our free Magento 2 extension, Discontinued Products, was built for. It follows our posts on spare parts and on what B2B buyers actually want from a self-service portal, where “this item is gone, what do I order now?” came up again and again.

The Idea: Retire a Product, Not Its Page

The module keeps the product and its URL in the catalog and changes what the product is allowed to do. You mark it as discontinued, and from that moment it cannot be bought anywhere on the storefront. The page stays, so the URL keeps working for bookmarks, old emails and search results, and the page now helps the shopper move on.

What the Shopper Sees

You choose between two behaviors per product.

  • A message and suggestions. The “Add to Cart” button is replaced by a message you control, and a “Replacement Products” block shows the alternatives you picked. This fits cases where there is no single obvious substitute.
  • A redirect to one replacement. Anyone who opens the old product URL is sent straight to the replacement product. This fits cases where a new revision simply took the old one’s place.

If the redirect target is misconfigured, for example the SKU no longer exists, the module does not send the shopper into a broken page. It falls back to showing the discontinued product with its message.

Blocked Everywhere, Not Just on the Product Page

A lot of “discontinued” setups only hide the button on the product’s own page. Here, a discontinued product cannot be added to the cart from category listings, from search results, or through a direct cart or API call either.

For configurable products the check works per variant. Discontinue one color and size combination and only that combination is blocked, while the rest of the product keeps selling normally.

What the Admin Does

On the product edit page there is a dedicated Discontinued Products tab with three things:

  • the “Product Discontinued” toggle;
  • an optional redirect with a SKU, validated on save, so it must exist and cannot point to the product itself;
  • a picker for the replacement products shown on the page.

The default message and a master on/off switch live under Stores, Configuration, Bro Solutions, Discontinued Products.

Works With Quick Order

The reorder flow is where a discontinued item hurts most. A buyer pastes a list of SKUs from last year’s order, and one of them no longer exists.

If you run our Quick Order module, install the free connector, brosolutions/quick-order-discontinued-connector. Adding a discontinued SKU to a Quick Order list then shows its replacement suggestions inline, and “Add to Cart” stays blocked until every discontinued line is removed or swapped. There is nothing to configure.

Hyvä Storefronts

The core module works on any theme. For Hyvä, a small companion module, brosolutions/discontinued-products-hyva, restyles the message and the Replacement Products block with Hyvä’s own Tailwind components.

Where This Gets Scoped Wrong

We have seen the same mistakes on catalogs with or without our module.

  • Redirecting to something unrelated. Sending a retired part to the home page or a broad category feels tidy and helps nobody. A redirect should land on a product that really replaces the old one. If there is no such product, use the message and suggestions instead.
  • Forgetting who owns the flag. The flag is set per product in the admin. If your ERP or PIM also pushes product data, decide up front which system owns “discontinued”. Otherwise an import can quietly bring a retired product back to life.
  • Retiring hundreds of SKUs one click at a time. When a whole range goes at once, plan how the flag and the replacements get set, instead of working through the admin product by product.

Installation

composer require brosolutions/discontinued-products
bin/magento module:enable BroSolutions_DiscontinuedProducts
bin/magento setup:upgrade

For Hyvä, add brosolutions/discontinued-products-hyva as well. The module is free and released under the MIT license. Source code is on GitHub.

Need Help With Discontinued Products in Magento?

If your product lifecycle lives in an ERP or PIM, or a large range is about to be retired and you need the replacements mapped and imported, that is the kind of custom Magento work we do. Write to contact@brosolutions.net and tell us how your catalog handles retired products today.