Hi,
I have recently made a new build of a website using opencart. All 301 redirects from the old site are working fine in the .htaccess file.
I now need to disable some of the products on the store, however, I don't want the "product not found" page to be shown & I can't seem to get these pages to redirect to the category page.
For example, I would like www.example.co.uk/category/sub-cat/product-1/ to be redirected to www.example.co.uk/category/sub-cat/ but can't figure out why this isn't redirecting. I thought this could be due to a caching issue but it appears not.
Any help is greatly appreciated. Thank you.
I have recently made a new build of a website using opencart. All 301 redirects from the old site are working fine in the .htaccess file.
I now need to disable some of the products on the store, however, I don't want the "product not found" page to be shown & I can't seem to get these pages to redirect to the category page.
For example, I would like www.example.co.uk/category/sub-cat/product-1/ to be redirected to www.example.co.uk/category/sub-cat/ but can't figure out why this isn't redirecting. I thought this could be due to a caching issue but it appears not.
Any help is greatly appreciated. Thank you.
You can simply replace 'error/not_found' in product controller with 'catalog/category'. Should work.
Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com
This is not a good idea.thekrotek wrote:You can simply replace 'error/not_found' in product controller with 'catalog/category'. Should work.
Instead, create a 301 redirect in your .htaccess file
Opencart Hosting Plans, Domain Registration, Microsoft and Google Email and More
Visit our website for great deals and most importantly, fast and friendly support - www.evolvewebhost.com
Active Member
You could do this with Redirect Manager, but you'd need to do it for each URL you want to redirect. If you want something that automatically does it, you'll need a small modification to do that. I actually have this on my list for future extension ideas, but need to finish up a few other projects first.
If you need it immediately, you can probably hire a developer to do this mod for you for not too much. If you need to find a developer, you should post a request in the OpenCart "Commercial Support" forum, which is checked by a number of OpenCart developers. You can also try checking out the OpenCart "Partners" area.
If you need it immediately, you can probably hire a developer to do this mod for you for not too much. If you need to find a developer, you should post a request in the OpenCart "Commercial Support" forum, which is checked by a number of OpenCart developers. You can also try checking out the OpenCart "Partners" area.
Of course it's not. Why have two-lines VQMod, when you can have a bunch of rules for every disabled product in .htaccess? Let alone the perfect opportunity to edit .htaccess again, when disabled product becomes available! Mmm...EvolveWebHosting wrote:This is not a good idea.
Instead, create a 301 redirect in your .htaccess file
In this particular controller visitor is redirected to 'error/not_found' page exactly, when product is not found (disabled). There's absolutely no reason to have an extension to do such simple task. Either edit file directly or create a VQMod, which will inject one super simple replacement.
Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com
Who is online
Users browsing this forum: Amazon [Bot] and 72 guests