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.

  • Kim Bantz Rasmussen 81 posts 310 karma points
    Nov 14, 2013 @ 15:37
    Kim Bantz Rasmussen
    0

    Make a list of all buyers that bought a specific product

    Hi,

    How do I make a list of all the buyers who bought a specific product? My end goal is to have a list with product name, product description and a list of the buyers with name, address and so on.

    Best regards
    Kim 

  • Nickolaj Lundgreen 233 posts 1132 karma points
    Nov 14, 2013 @ 15:50
    Nickolaj Lundgreen
    0

    Maybe something like this:

    var testSku = "1234";
    
    var completedOrderLines = PurchaseOrder.All().Where(x => x.CompletedDate != null).SelectMany(x => x.OrderLines).Where(x=> x.Sku == testSku);
    
    var customerEmails = completedOrderLines.Select(x => x.PurchaseOrder.Customer).Distinct();
    

    Not testet. There is a lot of performancce optimization potential if you want

  • Kim Bantz Rasmussen 81 posts 310 karma points
    Nov 18, 2013 @ 11:50
    Kim Bantz Rasmussen
    0

    Hi Nickolaj,

    It looks like frontend, isn't is possible to make a list backend? Otherwise I have to make a 'secret' page where you can make requests.

    Best regards
    Kim 

  • Nickolaj Lundgreen 233 posts 1132 karma points
    Nov 18, 2013 @ 11:58
    Nickolaj Lundgreen
    0

    You could make a custom node in the uCommerce section ,or extend one of the existing uCommerce UI's (pretty sure there is a guide for the last one, haven't tried it). A "secret" page is also possible (with some integration to the umbraco user login for some security).

Please Sign in or register to post replies

Write your reply to:

Draft