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.

  • Tony Kiernan 278 posts 341 karma points
    Aug 16, 2011 @ 17:34
    Tony Kiernan
    0

    Admin area search: Exclude variants

    Is there anyway to set the internal searhc to only display parent products?

  • Søren Spelling Lund 1797 posts 2786 karma points
    Aug 17, 2011 @ 19:31
    Søren Spelling Lund
    1

    There is. You can replace our standard search with your own by modifying the admin UI. It would be pretty trivial to do the search and further filter the results before returning them to the user.

    Extending uCommerce Admin will tell you what you need to know about extending/modifying the UI.

    You can perform a search by using the class ProductSearchQuery and setting the appropriate fields on that.

    To execute the search you go

    var products = ObjectFactory.Instance.Resolve<IRepository<Product>>().Select(new ProductSearchQuery()));
    // Filter out variants from seach result
    products.Where(x => x.ParentProductId == null).ToList(); 

    Hope this helps.

  • Tony Kiernan 278 posts 341 karma points
    Dec 05, 2011 @ 13:06
    Tony Kiernan
    0

    Weirdly, I seem to have done this on my development version of the site and don't know where I made the change to upload it ot the live version.  Guess I need copy everything up

  • Søren Spelling Lund 1797 posts 2786 karma points
    Dec 13, 2011 @ 13:26
    Søren Spelling Lund
    0

    Did you get it going?

Please Sign in or register to post replies

Write your reply to:

Draft