Have recently added a very simple feature to a ecommerce site to disable the viewing of some Items and Collections (of Items). Added a field called 'ItemDisplay' with the value of '1' for visible and '0' for hidden to turn products on or off. The query looks something like this on the page displaying all the Items in a Collection:
$query_ITEM = sprintf("* FROM collections, items WHERE collections.CollectionID = items.CollectionID AND items.CategoryID=%s AND items.ItemDisplay = 1 AND collections.CollectionDisplay = 1 ORDER BY collections.CollectionRank", $colname_ITEM);
It works well for visitors entering the site thru the front door however my question is if a visitor has bookmarked the page before it was hidden, how do I stop them revisiting the page (and ordering what's unavailable on the page)??
I think I need a query to precede the above query to check if the items.ItemDisplay = 0 AND/OR collections.CollectionDisplay = 0 THEN display the message "Sorry this item is no longer available or temporarily unavailable" ELSE continue with the above query????
Any ideas please, I'm not a PHP programmer, just a hack!