[ic] inactive items - flypage still works for them.

John1 list_subscriber at yahoo.co.uk
Wed Jun 16 13:15:30 EDT 2004


On Wednesday, June 16, 2004 10:09 AM, jamie at versado.net wrote:

[snip]
> We use it to mark products as discontinued and so don't want people to
> be able to buy them. However we don't want to 404 people who arrive
> at a product page via search engines, so we modify the flypage to mark
> inactive products as discontinued, remove the price and disable the
> buy button.
>
[snip]
> If you want to make inactive products (nearly) completely inaccessible
> then you need to check for the inactive flag at the start of the
> flypage and offer a 404 error if it is set:
>
> [if-item-field inactive]
> [tag op=header]
> Status: 404 Not found
> Content-type: text/html
> [/tag]
> [tmp page_title]Sorry, the page was not found[/tmp]
> @_NOLEFT_TOP_@
> <h1>[scratch page_title]</h1>
> <p>The requested page was not found.</p>
> @_NOLEFT_BOTTOM_@
> [else]
>
> ....
>
> [/else]
> [/if-item-field]
>
Jamie, thanks for your excellent and really useful reply!

Your point about search engines is a good one - I think I may just go for an
"Out of stock", and disable the buy button.

But, this makes me think - if someone retrieves a cached page for an
inactive product, will they be able to click the "Buy" button.  i.e. Does
the "Order" routine automatically check the "inactive" status and reject
attempts to order inactive items?  I guess I should test this out.

Also, thanks for the [tag op=header] solution - this is a useful bit of code
to know.



More information about the interchange-users mailing list