Restrict Duplicates

4 posts by 2 authors in: Forums > CMS Builder
Last Post: July 4, 2008   (RSS)

I have a list of products like this:
product1 collection=avanti category=kitchen
product2 collection=cellum category=bathroom
product3 collection=brodi category=kitchen
product4 collection=avanti category=kitchen

product1 & product4 have the same collection and category but I only want to show one. How can I filter out the products with the duplicate collection/category?

I hope this explains what i am trying to do.

thanks

Re: [IronVictory] Restrict Duplicates

By Dave - June 30, 2008

Hi IronVictory,

Can you just limit your results to 1 with:
'limit' => '1',

Do you want to display one one on the website or prevent users from select more than one of the same combination on the backend?
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] Restrict Duplicates

By IronVictory - July 3, 2008

hi Dave,
What I want to do is only display one for each collection. So in my example, on the live site I want one "avanti" to show along with a "cellum" and "brodi" - even though there are two avanti products. Limiting 1 seems to only show 1 total. Does that make sense?