You are here:  » Product Not Found


Product Not Found

Submitted by clare on Sun, 2007-10-07 01:47 in

With the updating of datafeeds, sometimes pages that get spidered disappear and so when for example, a google search result is clicked on, it lands on a page saying
"product not found"
(eg- http://www.mysite.com/shopUK/product/BEKO-CA5411FFW-Fridge-Freezer.html)

mysite being findallsorts

It is probably not possible, but I am asking anyway, whether instead of that page coming, somehow the dashes and url could be removed so that that search term BEKO CA5411FFW Fridge Freezer could be passed to search.php so that instead of a blank page search results for that product would come up which would probably show another one or similar.

Its a long shot I know, but if you have any ideas what to do with such things, so that SE listings that have become invalid actually go to a useful page. I mean the search option is still there, another thing I could do I guess, is change the wording of the result, to suggest on that landing page to try search again in search box, if it isnt possible to pass the query through directly and show results.

Submitted by support on Sun, 2007-10-07 03:08

Hi Clare,

Yes, that can be done. In products.php you will find the following code on line 58:

  $banner["h2"] .= "(".translate("product not found").")";

If you replace that with the following, the page will redirect (302) to the search results for the product name:

  header("Location: ".$config_baseHREF."search.php?q=".urlencode($q));
  exit();

Cheers,
David.

Submitted by clare on Tue, 2007-10-09 17:23

Thanks, I didnt think it would be possible, this is really good news.

Submitted by Diana on Fri, 2007-10-12 20:25

David, that is such a great tip! It solved the problem of what to do with the 4000+ pages I have kept that were indexed by Google from a company that went out of business.
Now instead of sending them to a product page that has nowhere to go from there, I can show them options.

You just made lemonade out of my lemons!
Thanks, Diana

Submitted by crounauer on Thu, 2007-11-08 16:46

In addition to the above code changes I have also added this to the .htaccess file which deals with 404 doc not found error.

ErrorDocument 404 /index.php

Regards,
Simon

Compare Sports Prices