Copied to clipboard

Flag this post as spam?

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


  • Supun Livera 8 posts 102 karma points
    Apr 22, 2016 @ 21:44
    Supun Livera
    0

    Merchello - Query Products

    Hi All,

    I'm trying to query for products in Merchello using the following query.

    var queryResult = _merchello.Query.Product.Search(1, 20).Items.Select(x =>  (ProductDisplay)x).Where( x => x.Length == 620);
    

    Although I have a product with the defined Length, the query returns 0 results?

    enter image description here

  • Rusty Swayne 1655 posts 4993 karma points c-trib
    Apr 25, 2016 @ 14:25
    Rusty Swayne
    0

    Hi Supun,

    How may products do you have in your catalog? The query you are running returns a max of 20 products.

    Also, you are not including variants in the the Linq query, so if your product has any options, it is not being considered in your expression...

  • Supun Livera 8 posts 102 karma points
    Apr 25, 2016 @ 16:53
    Supun Livera
    0

    Hi Rusty,

    Thanks for the reply.

    I have about 150 products and no variants. I tried querying for 150 products but still can't get a result.

    However if I change the query to search by name, I get the expected results but still the dimension fields are empty.

    Thanks in advance for your help.

  • Rusty Swayne 1655 posts 4993 karma points c-trib
    Apr 26, 2016 @ 14:30
    Rusty Swayne
    0

    Thanks Supun - sounds like you may have found a bug since the dimensions should not be empty. Can you log this at http://issues.merchello.com and post your code snippets so I can have a look?

    Much appreciated!

  • Supun Livera 8 posts 102 karma points
    Apr 27, 2016 @ 07:28
    Supun Livera
    0

    Sure, will do.

    Thanks for a great product.

Please Sign in or register to post replies

Write your reply to:

Draft