← All modules

Magento 2 module

Catalog Product Redirect

Sends visitors of disabled or out-of-stock product pages to another product, either with a permanent or temporary redirect or by showing the other product under the same address.

When a product is switched off or sold out, its page either disappears or shows a product nobody can buy, although visitors keep arriving from search engines, bookmarks and links. This module lets you name a replacement product for both cases. Visitors are then redirected to the replacement, or the replacement is shown directly under the old address.

Features

  • Separate settings for disabled products and for products that are out of stock.
  • Four behaviours: “None” (default), “Internal” (the replacement product is shown under the original address), “Permanent” (redirect with status 301) and “Temporary” (redirect with status 302).
  • Settings can differ per store view.

Configuration

There are no store settings. The module adds four product attributes that you fill in per product in the product edit page: “Redirect Disabled” and “Redirect Disabled Product” for disabled products, “Redirect Out of Stock” and “Redirect Out of Stock Product” for products that are out of stock. The attributes are added to the default group of every attribute set during installation.

Good to know

The replacement product is entered by its product ID. Make sure the replacement product itself is enabled and visible, otherwise visitors still end up on an unavailable page. Use “Permanent” when the replacement is final, so search engines transfer the old page to the new one.

Installation

Install the module with Composer in your Magento root directory:

composer require infrangible/m2-catalog-product-redirect

Then enable it and update the store as described in the installation guide. Composer installs the required modules listed on this page automatically.