varinder-kudosweb
-
6/8/2011 2:34:07 PM
RE:Sorting products based on two categories
helo, actualy im using 8 different fields, each having 1 checkbox which returns 'yes' when checked.
my initial idea was to pass a query string to be used by the repeater's where part, something like: categories.aspx?category1=yes
and filtering it with something like: category1 LIKE {%category1%} OR category2 LIKE {%category2%}...OR category8 LIKE {%category8%}
but, the above query doesnt seems to work (it ends up showing all the products in a random order) so, i reduced it to one where condition for each category repeater which works, i mean, now the link category1 takes you to a page called category1.aspx?category1=yes which has a repeater with a where condition like, category1 LIKE {%category1%}. and the other link takes you to a page called category2.aspx?category2=yes which again has a repeater with a where condition like, category2 LIKE {%category2%}.
But, in this way i ended up adding 8 different webparts doing pretty much the same thing.
so yea, my question is, whats the best way to approach this situation? - hope im clear, cheers :)
|