Auto-fix for unpublished products

Our customer have alot of products. And very many products get’s old and unpublished and replaced by similar products.
We have a big problem with 404:s on our site. So were thinking of how we should solve this. And just wondered if someone has a nice solution that dosent have to be handled manually.

We have some ideas but wanted to know if someone has a smart solution for this.

Litium version: 6.2

A simple solution is to never unpublish product instead add a statusfield that you check on the product page when it loads. if you have liked the replacement product or have a field for replacement article number you can just do a 301 redirect to the new product. and dispay a product replaced by this product. you should the also add rule so that search and order produtlistnigs on the website exclude product with replaced status if you dont want them to be displayed.

You could also add code to the 404 page to figure out if the url is a product link and if so to what product and the figure out what to redirect to.

1 Like

True, maybe thats the best approachable way to get what we want.