So how do you permanently display out of stock (inactive) products in your catalog?
It's not as easy as it sounds, especially if your PHP skills are limited to a basic understanding of how it works (or less).
The specific reference that you have to remove is "p.products_status = '1' and " (without the quatation marks and remember to also delete the space after "and" otherwise it will leave a double space) It can be found in all of the following files:
Root (main folder where OSC is located)
index.php
product_info.php
popup_image.php
advanced_search_result.php
products_new.php
product_reviews.php
product_reviews_write.php
reviews.php
specials.php
tell_a_friend.php
includes/boxes/
best_sellers.php
reviews.php
specials.php
includes/functions/
general.php
I used Ultra Edit to search for and modify the files, but I guess any text editor will do. Please backup these files before changing anything!!!
To display the products in the catalog, you only need to delete "p.products_status = '1' and " in the following files (Some files have more than 1 reference so make sure you delete ALL of them!):
Root (main folder where OSC is located)
index.php
product_info.php
popup_image.php
advanced_search_result.php
Additionally you can also edit the following files, depending on whether you want customers to see and write reviews/tell a friend/display best sellers/see specials on Out of Stock products (I only edited all the "reviews" files, since I only wanted customers to be able to write and read reviews on Out of Stock products):
Root (main folder where OSC is located)
product_reviews.php
product_reviews_write.php
reviews.php
specials.php
tell_a_friend.php
includes/boxes/
best_sellers.php
reviews.php
specials.php
includes/functions/
general.php
Personally I can't see why anybody would want to display Out of Stock items for New Products, but if that's what you want also edit "products_new.php"
If you have display product count enabled and you would like to include the Out of Stock Items in the product count in the Categories Box, delete only "p.products_status = '1' and " under the description heading "Return the number of products in a category" in "includes/functions/general.php". I didn't since I only want it to display the number of In Stock items.
IMPORTANT NOTE:
1. These modifications should dislplay all In and Out of Stock products in your Catalog
2. When you view the product it will still display the original Product Info i.e. it does not indicate that it is Out of Stock until you "Add to Cart". To compensate for this I activated "Display Product Quantity" under OSC Admin, which retruns "0" under quantity if something is Out of Stock.
3. I'm not qualified in PHP, so BACK UP YOUR ORIGINAL FILES (This message will self destruct as soon as anybody tries to blame me for screwing up their site)
4. There's probably a better and easier way to do this.
Good luck
Rudi aka The Green Mamba
Edited by The_Bear, 01 November 2004, 12:05.














