Zen Cart Logo
Forums / Customization from the Admin / how do I redirect from (sorry item not found)?

how do I redirect from (sorry item not found)?

Locked

Views: 6,196

Results 1 to 13 of 13
This thread is locked. New replies are disabled.
16 Mar 2008, 7:13 AM
#1
b_funtomas avatar

b_funtomas

New Zenner

Join Date:
Mar 2008
Posts:
18
Plugin Contributions:
0

how do I redirect from (sorry item not found)?

How do i redirect from (sorry item not found) a sold out inactive item to the main page or new items in the category.

I tryed it in

admin - configuration - my store - missing page check - on

and this too

admin - configuration - index listing - show new products on main page - errors and missing products page - 1

Both won't work :(

Clicks come trough google search (indexed pages) to my sold out (inactive) item and my store shows an empty page :( Would be great to show here instead new items page

Who could help me out?

Thanks :)

16 Mar 2008, 10:55 AM
#2
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: how do I redirect from (sorry item not found)?

Now this is interesting. If I understand correctly, you are getting a near empty page when visitors or search engines attempt to come directly to a product info page for a product that is no longer available.

Your desire to redirect to a page where there are products is understandable, but Zen Cart - in theory - offers another solution. When somebody lands on this page they should, by default, see the new, feature, specials and upcoming boxes that also appear by default on the home page. But it's not working!

I've updated the relevant script and include it here -> Attachment #3583

Unzip it and add it to your includes/templates/YOUR_TEMPLATE_DIR/templates folder and see if it does what you would like. If not, then we can dive into core code to look at the redirect, though that will be a little more messy (and not done as an over-ride).

16 Mar 2008, 11:22 AM
#3
b_funtomas avatar

b_funtomas

New Zenner

Join Date:
Mar 2008
Posts:
18
Plugin Contributions:
0

Re: how do I redirect from (sorry item not found)?

Hello kuroi!

Thankx so much for reply!

I'll let u know if it works for me as soon as possible :)

Thankx to UK

Tomas

16 Mar 2008, 11:51 AM
#4
b_funtomas avatar

b_funtomas

New Zenner

Join Date:
Mar 2008
Posts:
18
Plugin Contributions:
0

Re: how do I redirect from (sorry item not found)?

That’s amazing ! :clap:Thanks to :smartalec: kuroi :clap:

I noticed that some fellows are eager to know how to solve this for their shop.

If you facing the same problem, I can confirm, it worked for me!

Just download the zip file from “KUROI” and replace it in your override with Dreamweaver or FTP Software.

Don't forget to save the file in your own template folder! Not in default template! This will save you some headache if you update your Zen Cart in the future.

Thanks Kuroi! You saved my Sunday, so I've got some more time with my family :bigups:

16 Mar 2008, 1:08 PM
#5
steven300 avatar

steven300

Totally Zenned

Join Date:
Jan 2008
Posts:
1,564
Plugin Contributions:
1

Re: how do I redirect from (sorry item not found)?

Will this be in 1.4?

12 Nov 2008, 9:17 PM
#6
ebaobao avatar

ebaobao

Zen Follower

Join Date:
Jul 2008
Posts:
495
Plugin Contributions:
0

Re: how do I redirect from (sorry item not found)?

The only problem I'm seeing here is that there will be duplicate content for different links. If you had a lot of items not found and they all redirect to your home page, then they will have the same content.

12 Nov 2008, 10:22 PM
#7
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: how do I redirect from (sorry item not found)?

No and no. Firstly the solution given here does not redirect to the home page. And secondly, the listing boxes that are displayed using this solution will usually show different products each time (unless you haven't got many).

12 Nov 2008, 11:23 PM
#8
ebaobao avatar

ebaobao

Zen Follower

Join Date:
Jul 2008
Posts:
495
Plugin Contributions:
0

Re: how do I redirect from (sorry item not found)?

Thank You kuroi,
I haven't tried your solution but I've already downloaded it and will be giving it a try.

On a side note, can you tell me how I should do 301 redirects for old links that don't exists? I've recently migrated to a new server with zen cart from a different shopping cart. But apparently a lot of old links exists that I have not redirected. How do I go about redirecting those links? Thanks.

13 Nov 2008, 6:14 PM
#9
ebaobao avatar

ebaobao

Zen Follower

Join Date:
Jul 2008
Posts:
495
Plugin Contributions:
0

Re: how do I redirect from (sorry item not found)?

Thanks for your help. I was wondering in regards to your solution when you display new products and specials on the page, does that page return status of 404? I'm hoping it doesn't return 404 since it is returning a page with info. I don't want google to keep reporting that I have 404s since our products stock updates quite a bit. Thanks for your input.

13 Nov 2008, 10:44 PM
#10
ebaobao avatar

ebaobao

Zen Follower

Join Date:
Jul 2008
Posts:
495
Plugin Contributions:
0

Re: how do I redirect from (sorry item not found)?

I've found out that it does indeed return 404 error. Now the question is how can I change it so that it doesn't return that code?

10 Mar 2009, 4:09 PM
#11
wastaboo avatar

wastaboo

New Zenner

Join Date:
May 2007
Location:
Montebello, CA
Posts:
40
Plugin Contributions:
0

Re: how do I redirect from (sorry item not found)?

:cool: try this here are some steps that help me maybe it can help you too http://www.isitebuild.com/301-redirect.htm :hug:

ebaobao:

Thank You kuroi,
I haven't tried your solution but I've already downloaded it and will be giving it a try.

On a side note, can you tell me how I should do 301 redirects for old links that don't exists? I've recently migrated to a new server with zen cart from a different shopping cart. But apparently a lot of old links exists that I have not redirected. How do I go about redirecting those links? Thanks.

10 Mar 2009, 9:24 PM
#12
natemobley avatar

natemobley

New Zenner

Join Date:
Feb 2008
Posts:
8
Plugin Contributions:
0

Re: how do I redirect from (sorry item not found)?

This is great. Thank you. I have one question though. How would you make it show my
index.php?main_page=index (which I have set to show my categories at the top)
instead of the "Featured", "New", and "Specials"

16 Oct 2009, 2:46 AM
#13
sutrosonics avatar

sutrosonics

New Zenner

Join Date:
May 2006
Posts:
10
Plugin Contributions:
0

Re: how do I redirect from (sorry item not found)?

Thank you for this patch. We were going crazy trying to figure out why it wasn't working via the control panel.