Post by felipe123987 » Wed Aug 29, 2018 6:07 am

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.

Newbie

Posts

Joined
Wed Nov 25, 2015 7:55 am

Post by straightlight » Wed Aug 29, 2018 9:16 pm

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.

The most generated errors being found on Opencart forum originates from contributed programming. The increased counters are caused by posted redundancies of the same solutions that were already provided prior.

F. Rules:

- viewtopic.php?f=176&t=200480
- viewtopic.php?f=176&t=200804


Regards,
Straightlight


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by Johnathan » Wed Aug 29, 2018 10:44 pm

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.

Image
Image Image Image Image Image Image


User avatar
Global Moderator

Posts

Joined
Fri Dec 18, 2009 3:08 am

Who is online

Users browsing this forum: No registered users and 8 guests