Magento. Redirect from disabled product to last product category.
A simple example of a redirect to a last product category if product has status Disabled
. Use observer and watching the event controller_action_predispatch_catalog_product_view
.
Everything that’s needed:
Declare observer in config.xml
And add tis methods to ../Models/Observer.php