Page 1 of 1
Redirect URL's of old products to another or category
Posted: Wed Aug 29, 2018 6:07 am
by felipe123987
Good afternoon from Colombia, I would like to make a consultation which I could not find an answer.
How can I do the redirects of the url's of very old or discontinued products, so that this old url goes to a url of a current or new product, or that simply forces you to go to the initial category, so that it does not remain with an error when deleting that product or deactivating it.
Thank you in advance to anyone who can help me with that topic.
Re: Redirect URL's of old products to another or category
Posted: Wed Aug 29, 2018 9:16 pm
by straightlight
While the OC version has not been posted, if there are no extensions offered on the Marketplace about this request already, the best option would be to either create a filter or to use the Override Engine to expand the getProduct() method before actually loading the product detail page. This methodology would avoid the need on redirecting the user to another product ID as it would prevent confusions to users and to search engines.
Re: Redirect URL's of old products to another or category
Posted: Wed Aug 29, 2018 10:44 pm
by Johnathan
You can do this using htaccess, but the syntax is a bit complicated. For more information on that, here's a tutorial on that:
https://mediatemple.net/community/produ ... rite-rules
If you prefer not to mess with htaccess, I have a
Redirect Manager extension that can do this within the OpenCart admin panel. It lets you redirect any OpenCart URL to any other page you want, including discontinued products or other URLs that don't resolve normally.
Feel free to take a look at the screenshots and demo site, and if you're interested let me know at
www.getclearthinking.com/contact if you have any further questions.