We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 26401
    • 247 Posts
    I see that msearch development has been suspended, and that miniShop2 apparently can be used to search minishop items.

    Is it possible

    Is there any documentation on implementing the search functionality?

      • 42046
      • 436 Posts
      Minishop2 items are just resources so can be searched using any MODX search addon. So you could use AdvSearch http://rtfm.modx.com/extras/revo/advsearch or if you're willing to pay for it, mSearch2 http://store.simpledream.ru/packages/ecommerce/msearch2.html that was specifically developed for miniShop2.
        • 26401
        • 247 Posts
        I just need to be able to join a table to do a search on it, if adv search can do it, I'll use that.

        I was tempted to write my own query for a moment...
          • 46309
          • 79 Posts
          Did you find a solution for this? I was trying to do it but no success.
          It will be great to have such an option or solution to filtering the products in minishop2.
          As Dan wrote you, there is a msearch2 addon for this, but it's paid.
          Just for your info, here you can find a solution displaying the results with thumbnails in minishop2 with SimpleSeacrh:

          http://forums.modx.com/thread/91462/simplesearch-displaying-results-with-images#dis-post-500730
            peace&love / bike&ride
            • 26401
            • 247 Posts
            Thanks Deyan, I"m trying to look through your other post, but I don't see any reference to minishop content as a source for searching content, I'm trying to figure out the join
              • 46309
              • 79 Posts
              In your SimpleSearch call:
              [[SimpleSearch?
              &containerTpl=`mySearchContainerTpl`
              &tpl=`mySearchResultsTpl`
              &ids=`3` //it's my Catalog Resource ID]]

              you have to specify th your Catalogue Resource ID, whre the simple search should look at.

              The mySearchResultsTpl chunk (shows [[+results]]) it’s the tpl.msProducts.row chunk inside, from Minishop2 folder with chunks. The default SearchResultsTpl replaced by mySearchResultsTpl is placed in core/components/simplesearch/elements/chunks/searchresults.chunk.tpl folder):
              <div class="sisea-result">
              <!-- tpl.msProducts.row-->
              <ul class="search-products-row">
                  <li class="products-list">
              <a href="[[~[[+id]]]]">
                      <div class="image-wrapper">
                      <img class="items" src="[[+image:phpthumbof=`w=180&h=180`&`zc=1`]]" alt="[[+pagetitle]]"/>
                      </div>
                      <div class="products-details">
                          <div class="title"><h4>[[+pagetitle]]</h4></div>
                          <div class="price"><h4>[[+price]] EUR</h4></div>
                      </div>
                      </a>
              </li>
              </ul>
              <div class="extract"><p>[[+extract]]</p></div>
              </div>


              If you want you can place your code in details to see what can we do about the search results.
                peace&love / bike&ride
                • 26401
                • 247 Posts
                I guess I'm just not seeing how from this code simplesearch knows to look through the modx_ms2_products table as well.

                Are you sure that simple search is doing that, not just displaying the contents of ms2, if it finds the resource through another result?

                I wanted to use a plugin that indexes the search, so that it can give faster results, the way msearch does, but this is becoming a bit complex. I would just get the mSearch2, but I don't know how to install it. There seems to be a minimum Russian language knowledge required.

                I've ended up putting the article that I"m trying to find in a TV, but I'n not able to search that with msearch nor simplesearch. mSearch should be able to index TVs, but I'm just not seeing the article show up when I search for it

                @SELECT `article` AS `article` FROM `modx_ms2_products` WHERE `id` = [[+id]]



                I have not tried advanced search yet because I didn't want to install the zend library, but I might try that next

                  • 46309
                  • 79 Posts
                  Yeah, I'm pretty sure - I've done it on one of my site. Unfortunatelly it's on Bulgarian language, but you can try the search bar in the upper right corner. It's about mobile accessories, so you can try with a search word Samsung or iPhone and you will see the results:
                  http://kalafche.com/catalog/
                  You have to specify the ID of your catalogue Resource, also the Products inside must be searchable.
                  As far as I know msearch it's not supporting minishop2, you have to buy the msearch2 add-on for that - it costs about 40 Euro. And till the moment there is no English documentation about msearch2, also minishop2. The Russian guys wrote me, that they are working on the English documentation, but no deadline. If you want to buy it, you have to speak with them about the instalation and the documentation and they should help you with the implementation. Here is a link:
                  http://www.simpledream.ru/contacts.html
                  I didn't try Advanced search in details, but think it's almost the same like SimpleSearch.
                    peace&love / bike&ride
                    • 26401
                    • 247 Posts
                    Thanks Deyan,

                    I did end up getting msearch to work.

                    There were a few errors in the code, I'm not sure if they are because of components updating or just by omission, but I've changed some code and was able to get it to index the article


                    This is my indexer
                    [[!mSearch?
                    &indexer=`1`
                    &limit=`500`
                    &indexFields=`_,article,pagetitle,longtitle,description,introtext,content,_`
                    ]] 
                    


                    The first last item is an underscore, because the first and last items are ignored unless you modify the indexer. Essentially the indexer keeps the ` character, and splits on a comma, so just adding the underscore (or anything else) will look for `_ and _` , but the fields in between are looked up properly.

                    So there it is, mSearch can do what it is supposed to, I just wish it didn't take me so many hours to figure out
                      • 26401
                      • 247 Posts
                      Also, there's a setting for the mSearchIndexer plugin, where indexFields can be set to include (in my case) article