[ic] Related items component

Ed LaFrance edl at newmediaems.com
Tue Nov 18 10:33:35 EST 2003

At 10:02 AM 11/18/2003 -0500, you wrote:
>Hello everyone,
>I'm writing a "related items" component to put in the flypage that will
>suggest items that have the roughly the same title.  I've basically
>copied the promo component and adjusted it to suit my needs.
>Basically I pass the title of the current item to my component and using
>the following block, get the first 3 words to pass to the search loop.
>  $tmp_title=$Tag->control(title);
>  @words = split/\s/, $tmp_title;
>  $Scratch->{tmp_title} = join(" ", @words[0,1,2]);
>  return;
>Now, I get items returned and they all match correctly (my search is
>below), but I always get the current item returned as the first result.
>What I'd like to do is to be able to shift the first item of the array
>off so that the item the user is looking at doesn't appear in my related
>items area.
>Can anyone offer suggestions on how I'd go about doing this?

Well, you did not post the code that needs to be changed, so you limited 
the likelihood of getting a useful response... but I would think that if 
the body of the component is the results of a search, you could make it a 
coordinated search and exclude the current item by sku. You could also use 
a [loop-next] to skip a result if it matches the current item. And there 
are other ways, I'm sure.

- Ed

New Media E.M.S.              Technology Solutions for Business
11630 Fair Oaks Blvd., #250   eCommerce | Consulting | Hosting
Fair Oaks, CA  95628          edl at newmediaems.com
(916) 961-0446                http://www.newmediaems.com
(866) 519-4680 Toll-Free      (916) 961-0447 Fax

More information about the interchange-users mailing list