Help - Search - Members - Calendar
Full Version: Any contribution for discontinued products?
osCommerce Community Support Forums > osCommerce Online Merchant v2.x > Contributions / Add-Ons > Contribution Development

I would like some input from other people on what they do with discontinued products. I have been thinking for a few months on doing a contribution to deal with them, since I haven't found any and I really do not know what everyone else usually does with products they do not sell any more.

The problem, you have a product in catalog and run out of stock. The product gets very well on Google, so you do not want to deactivate it, and people keep geting to your store on that product and asking when you will have more. Now, it might be a product you will have again in the future, or maybe a product that has been discontinued by the manufacturer and you will not sell it again, but you might have a different product that replaces the old one in your catalog.

Now, let's do some thinking on what to do if you are not going to have that product again.

I do not think that disabling the product on your catalog is a good idea, since it might rank very well on Google for several keywords. You might have a new product that maybe it even has the same name, but when Google points to your store, it is pointing to the old product, because it has been there for years, it has a better rating, maybe many people have posted links on forums recommending your product, etc. If you disable the product, all that work and all the "fame" that URL might have goes down the toilet. But, we could maybe add a new field to the products table that defaults to NULL, maybe a "products_replacement" field, that when it is set up it will point to a product number that replaces the given product.

So, maybe our product_id 22 has been discontinued and has been replaced by product_id 33, so on product_id 22 we would change product_replacement from NULL to 33. And then maybe on application_top we could make it so if we see we are dealing with a product_info, and the given product_info we want to see has a product_replacement set, we would give a "HTTP/1.0 301 Moved Permanently" error and give the new URL that replaces the discontinued product.

Now, this could probably even work if the product is disabled from the admin section.

But, we could even go one step further, and on application_top check if the visitor is a spider or not. If it is a spider, we would just hand out the 301 header above. If it is not a spider, and if we still have the product enabled, we would show the product as we always had it on the catalog, but with a new module (like the "also purchased" or "related products" modules) on top that would warn the customer that the product is out of stock and discontinued, but here you have the product that replaces it in catalog, please check it out.

Doing it this way would probably also mean having to modify many queries everywhere on our store, because the product would be enabled, and maybe we do not want it showing up everywhere when browsing the catalog. Or maybe product_info could be modified a little bit, so if the product is disabled on the admin section, but it has a product_replacement set, it will show the product anyway if someone goes direct to the product_info, but this way it won't show up when browsing the store, searching, etc.

I would like to see some input on other people that have found this problem before, and how they solved it (if they did). Yeah, just removing the product is the easy answer... Or just editing the product and replacing it with the new one is another one, but not the right way to do it.

Any hints will be appreciated on the subject.

So... noone has ever needed to do anything like this, or ever worried about what to do with a product they do not sell any more? sad.gif
What I did was the following....

In product_info.php - you will find the following:

if ($product_check['total'] < 1) {

The code just below that is shown when a product is disabled "Product not found"

Replace that with the code that usually displays the product, remove the "add to cart" link and price - and you have more or less what you are looking for!

Like so....

A basic way of doing it - but effective!
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.