stop duplicate prodIDs being added to to listPrepend
Posted on 2010-11-30
i'm using this:
<cfparam name="client.recentlyViewed" default="">
<cfset viewString = url.prodID & "|" & rsgetProduct.product_Name & "|" & request.scndcatName>
<cfset client.recentlyViewed = listPrepend(client.recentlyViewed, viewString)>
to store recently viewed products on my site in the client side cookie.
i then display the recently viewed products to the customer on another page.
the prodID is always unique. how can i stop duplicate prodIDs being added to the 'client' so i downt output dupes?