Duplicate values displayed in search box

I am searching for a brand in my product listings and when I do it displays duplicate values of the brands. There are product listings that have the same brand.

How do I only display the single brand? I want the user to search for only the single unique brand name.

Hi there

Try the operator :unique elements

At the Data Source add unique elements operator.

No that did not work.

That won’t work, you’re searching for the 1st product in your product list and not for unique brands.
How is your database structured?

Assuming each Product has a list of Brands and same brand is associated with multiple products and you are trying to display a list of unique brand names - try this in your dropdown:

Each product has “one” brand and that brand can be in other product listings.

Also it’s not a drop down that I am using, it’s a searchbox. I my users will have hundreds and possibly thousands of brands to select.

You could achieve that by using a plugin that removes duplicates from search boxes, I haven’t used it but you could give it a try.

As an alternative you could create a separate data type for Brands with unique brand names and setup your search box to find choices from the Brands database.
Also create a field of data type Brands in your Product list to link the 2 data types.

1 Like

That’s what I ended up doing for my category field for another reason. I will implement that.

Thanks @dianabologabv !

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.