Copied to clipboard

Flag this post as spam?

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


  • Tim Schaeps 9 posts 90 karma points
    Jan 17, 2017 @ 09:21
    Tim Schaeps
    0

    Merchello Filter groups - Product Filters -> not working?

    Hi,

    I'm starting to use merchello and I discovered the functionality of product groups (as described here: https://our.umbraco.org/projects/collaboration/merchello/merchello/79449-get-list-of-products-from-collections-merchello by @rustyswayne on Sep 01, 2016 @ 12:31

    I'm trying to get this working, but I can only create such a filter, but not populate it with values. Is there something that I'm missing?

    I would really like to use this functionality as it really suits my needs

    Thank you in advance!

  • Rusty Swayne 1655 posts 4993 karma points c-trib
    Jan 17, 2017 @ 17:56
    Rusty Swayne
    0

    Hi Tim,

    Once you setup a filter - have you gone back to individual products and added the products to the filters?

    Add to Filter

    Select the filter

  • Tim Schaeps 9 posts 90 karma points
    Jan 17, 2017 @ 19:35
    Tim Schaeps
    0

    Hi Rusty,

    I have tried, but i'm already stuck in step 0. enter image description here

    Clicking the + does nothing to add the test "value" as an option of this collection. Do you see what I mean? I cannot do what you propose as that the second step of your procedure renders only empty (without checkboxes) lists

    I practice, I will always create my products programatically, so if I can find out the way to do this with code, then I would be happy too of course. (I'm creating an api that serves as an integration point with an on premise pos/inventory system)

    thx

    Tim

  • Rusty Swayne 1655 posts 4993 karma points c-trib
    Jan 17, 2017 @ 21:54
    Rusty Swayne
    1

    OK - you found a bug (easy one) that must have been caused by a tweak I did in the last version. Hit return instead of hitting the plus button =) - somehow I wound up creating an issue with the ng-click on the + icon ...

    Fixing that now.

  • Rusty Swayne 1655 posts 4993 karma points c-trib
    Jan 17, 2017 @ 22:13
    Rusty Swayne
    100

    Hi Tim - You can fix this in your site by:

    Open the /App_Plugins/Merchello/Backoffice/Merchello/dialogs/filtergroupfilters.addedit.html

    On or about line 24:

    find:

     <input type="text" name="filterName" data-ng-model="filterName" merch-enter="addFilter()" /> <merchello-add-icon do-add="addAttribute()"></merchello-add-icon>
    

    and change the addAttribute() call in the <merchello-add-icon do-add="addAttribute()"></merchello-add-icon>

    to

      <merchello-add-icon do-add="addFilter()"></merchello-add-icon>
    

    Originally the filters were referred to as specified filter attributes in the concepts and I wanted to simplify the naming ... so I changed it to simply Product Filters =) and forgot to change that reference.

  • Rusty Swayne 1655 posts 4993 karma points c-trib
    Jan 17, 2017 @ 21:56
  • Tim Schaeps 9 posts 90 karma points
    Jan 18, 2017 @ 17:07
    Tim Schaeps
    0

    Just one more question, do you perhaps have some documentation on how to do this in code? I already found a lot of useful info in the fasttrackdatainstaller class, but this doesn't seem to be visible in any of the exposed merchello services... or am I wrong?

    Thx!

  • Rusty Swayne 1655 posts 4993 karma points c-trib
    Jan 18, 2017 @ 17:46
    Rusty Swayne
    0

    I don't think I'm following here - are you asking about documentation as to how to programatically populate a filter? If so we don't as of yet (but we've been working on a couple of implementation that we're hoping to turn into some concept posts - not that it helps you now ...). Be happy to try to answer questions though ...

  • Tim Schaeps 9 posts 90 karma points
    Jan 18, 2017 @ 18:54
    Tim Schaeps
    0

    yes, that is what I'm asking :) Do you think it is not possible at all, or just not documented? Because if it is the latter, then I'll find my way... At this point, I have already been able to create the filter, now I'll try to do the population of the filter and the linking of it's values to the product

  • Tim Schaeps 9 posts 90 karma points
    Jan 18, 2017 @ 20:49
    Tim Schaeps
    0

    Ok, Happy to see that I discovered that the filters are in fact ientitycollections which can be created the same way, but with a different key and that the options in the filters are also ientitycollections. Knowing this, I was able to generate the filter with it's options, but when it comes to linking the option with the product, I get stuck. I thought that it would be simply using the AddToCollection method on IProduct, but this seems too easy. The link isn't made and I hope that it is because I'm missing something.

    Do you have a pointer perhaps? I would be really glad if I get this working! :)

  • Tim Schaeps 9 posts 90 karma points
    Jan 19, 2017 @ 14:41
    Tim Schaeps
    0

    Ok Man, I figured it out, it is thus in fact possible :)

    Thx for making such an awesome solution!

    T

  • Tim Schaeps 9 posts 90 karma points
    Jan 18, 2017 @ 15:57
    Tim Schaeps
    1

    Cool Man! thank you, now it's working! Now onto to the next step :)

  • Rusty Swayne 1655 posts 4993 karma points c-trib
    Jan 19, 2017 @ 16:27
    Rusty Swayne
    0

    Awesome to hear and sorry I did not get a chance to reply with "Yes, it's possible earlier" =)

    I've done a few custom filters. Two use event triggers to add products to and from various filters and a third that uses a background task that groups products into price ranges ...

    In a nutshell, Filters are essentially a specialized kind of product collections where the top level collection is the "FilterGroup" and the child collections are the actual "Filter(s)". It is important to set the isFilter value of each of these collection records to True (bit 1) INCLUDING THE ROOT FilterGroup collection itself. Just pointing that out as it's caught me before in troubleshooting =)

  • Tim Schaeps 9 posts 90 karma points
    Jan 19, 2017 @ 20:28
    Tim Schaeps
    0

    Haha! Don't worry about it! You have I life too I guess ;-)

    The case that you mention here is indeed interesting! (I didn't think about the price ranges, but that is possible too in my implementation... Thx for the idea!

    Also, thx for pointing out that the flag must be set on both levels. I first did it only on the root level of the filter, and then saw in the DB that it had to be done on both levels. Good to have the confirmation though!

    Next up... Visualization!

    T

Please Sign in or register to post replies

Write your reply to:

Draft