Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


These support forums are now closed for new topics and comments.
Please head on over to http://eureka.ucommerce.net/ for support.

  • Andrei 68 posts 130 karma points
    Oct 13, 2010 @ 18:00
    Andrei
    0

    Get a list with distinct values of a property only from products which have that property

    Hi,

    I have this situation: some products have a property called "Brand", others don't. And in one page I need to list down all possible brands, so that users can click a brand and get a list of all products with that brand. For that, I have to make a query that takes only the products that have the property "Brand" and get a result set with distinct values of this property. Is it feasible to take this approach for listing brands without affecting too much on performance? Or what would be a good approach for this situation?

    Also I thought about making the Brand as a category, but I could end up with too many categories. 

  • Søren Spelling Lund 1797 posts 2786 karma points
    Oct 14, 2010 @ 11:16
    Søren Spelling Lund
    0

    Hi Andrei,

    Are you working through .NET or XSLT for this one?

  • Andrei 68 posts 130 karma points
    Oct 14, 2010 @ 13:27
    Andrei
    0

    Hi Søren,

    I made an xslt extension function where I try to get the list with some LINQ query, but not very successful :). If it can be done from xslt, I would like to know that too, I am just starting to get familiar with the API.

  • Søren Spelling Lund 1797 posts 2786 karma points
    Oct 14, 2010 @ 15:31
    Søren Spelling Lund
    0

    Take a look at the first question in this article http://www.dpawson.co.uk/xsl/sect2/N2696.html it should do the trick for you.

    Let me know if you need some .NET code as well :)

Please Sign in or register to post replies

Write your reply to:

Draft