I am currently working with PrestaShop 1.7.8.7. At the moment, I have inactive products in my product catalog, and when I try to access the page of one of these products, I am naturally redirected to a 404 error page. I know that in the PrestaShop admin panel, I can manually choose the type of redirection and the target page for each product, but I would like to automate this process so I don’t have to do it manually for each of my products.
The desired outcome is as follows: all my inactive products should be redirected to their parent category.
Could you guide me on how to make these modifications and/or suggest alternative solutions to automate the redirection of my inactive products to their parent category?
So far, I have attempted to create a module, create an override file, and create a PHP script to generate the redirections in my .htaccess file, but none of these three solutions have worked.
Ambre Ramos is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.