it's a really easy fix to shopwishlist.asp and I'll post it in here for any others that may want to add it. It stops the user from seeing the "View" and "Order Now" links on any product where the cname matches "Not Available". And I also added a stock column to the wish list so that the customer can see how many are in stock and if the stock is 0 the "Order Now" link is removed. We have quite a few customers who use the Wishlist for items that they order on a regular basis so it seemed like a good time for an overhaul. For any product that you hide, you change the cname field to Not Available but keep the description as is so the customer can see what the product was. Better to let the customer know why the "Order Now" link is hidden. We occasionally have to hide products even though they may still be in stock, so the stock check alone is not enough.
Right, here's the code
Open shopwishlist.asp (make a backup copy just in case)
Find Sub Formatwishlistentry (line 125 approx.)
Add the code highlighted in red (and green if you want to add a stock column)
Sub Formatwishlistentry (conn, catalogid)
dim rc, price, fieldvalue
CartGetProduct catalogid, rc
if rc>0 then exit sub
my_link="shopwishlist.asp?action=delete&id=" & catalogid
fieldvalue="<a href=""" & my_link & """>" & getlang("LangCommonDelete") & "</a>"
If strcname<>"Not Available" then
my_link="shopquery.asp?catalogid=" & catalogid
fieldvalue="<a href=""" & my_link & """>" & getlang("LangCommonView") & "</a>"
FormatProductcolumn " " ' no view
If strinventoryproducts="" AND strcname<>"Not Available" AND lngcstock>0 then
my_link="shopaddtocart.asp?catalogid=" & catalogid
fieldvalue="<a href=""" & my_link & """>" & getlang("LangCommonOrderNow") & "</a>"
FormatProductcolumn " " ' no buy
If you want to add a stock column find sub WriteWishlistheaders (line 170 approx) and add the code highlighted in green
parserecord fieldnames, fields, fieldcount,","
for i = 0 to fieldcount
Response.write ReportHeadColumn & Captions(i) & ReportHeadColumnEnd
Here's a screen shot of our wishlist with 3 products all with a different status. I use the ccode field instead of the cname field
However, there is another way that the customers can order hidden products - through links to products from Google to shopexd.asp. Please have a look at this thread for a fix to that - thanks to Steve for posting this
I hope all this helps,