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

Jamie Neil jamie at versado.net
Wed Jun 16 05:09:49 EDT 2004


John1 wrote:
[snip]
> I suppose I could manually test for the inactive flag on the flypage and
> bounce the user to the "missing" page, or alternatively, display an "Out of
> stock" message.  But I was wondering if there was an easier way - shouldn't
> "HIDE_FIELD inactive" prevent the product from being viewable anywhere?  I

I suppose it depends on what you use the inactive flag for.

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.

> would like to make it physically impossible for a customer to view or
> purchase a product that has been made inactive.
> 
> I'd be grateful for any suggested solutions.

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 Neil | <jamie at versado.net> | 0870 7777 454
Versado I.T. Services Ltd. | http://versado.net/ | 0845 450 1254


More information about the interchange-users mailing list