Developer forum

Forum » Development » CriteriaGroup -> Custom search filtes

CriteriaGroup -> Custom search filtes

Martin Skov Nielsen
Reply

This might be a trivial question, but since I don't seem to have any luck making it work, I'll have to ask...

How does one create these and figure out what fields to add...


This code seems to work, but when I try to use the out commented part I'm missing results...

        // Critera to select all products in entire shop as basis for further filtering, by current URL-group etc
        public override SearchQueryElement ComposeQuery()
        {
            CriteriaGroup group = new CriteriaGroup();
            group.Add(new Criteria("shopid", "SHOP1"));

     //       var group = new CriteriaGroup(new Criteria("shopid", "SHOP1"), CriteriaSeparator.And, new Criteria("groupshierarchy", "*"));

            return group;
        }

So any pointers on how to do this will be appriciated...


Replies

 

You must be logged in to post in the forum