Forums Forums Search & Filter Pro Add existing parameters of query to shortcode

  • This topic has 16 replies, 2 voices, and was last updated 9 years ago by Ross.
Viewing 7 posts - 11 through 17 (of 17 total)
  • Ross Moderator
    #28162

    Hi Sergey

    The issue is I have no idea how that plugin works – and unfortunately from you explanations I’m still not following.

    With only 1000 active users’ its unlikely I’ll be changing the code of this plugin to accommodate that – why not use a more popular shop plugin, that you know we support – such as WooCommerce or Easy Digital Downloads?

    Purchasing does does not allow you to demand features that do not exist – it is your job to check what a plugin does before purchasing.

    S&F does exactly what it says it does, what is advertised on the product page and in the online demos.

    It may be possible to get setup with that plugin, but I generally only look into compatibility with 3rd party plugins if they are at least popular and can benefit many of our users.

    In regards to a refund – please read our policy which you have agreed to when signing up:

    If you have problems getting plugins to work, we will be happy to provide a full refund within 30 days of the original purchase. After 30 days, no refunds will be given. Before a refund will be granted, you must allow us to try and help solve any problem you have by opening a support ticket. NOTE: refunds will not be granted if you simply decide not to use the purchased products. We stand behind our products and will assist you in solving any problem you have, but we also expect you to adequately understand what you are purchasing and why.

    We do not provide refunds for features that do not exist – if you want to check that the plugin works, then follow the steps here, I’m sure there will be no issues:

    http://www.designsandcode.com/documentation/search-filter-pro/getting-started/creating-your-first-search-form/

    Thanks

    Anonymous
    #28170

    Hello Ross.

    You do not give evaluation version with limited time usage or same. Yeah, WP_SHOP is very unpopular plugin. But site have more than 20.000 goods, so it hard to migrate to Woocommerce etc. But your plugin have lack of documentation, and your demos give me only frontend of how plugin works.

    So I can only guess will your plugin work with WP_SHOP or not.

    Before a refund will be granted, you must allow us to try and help solve any problem you have by opening a support ticket.

    I opened this support ticket… This topic.

    If issue is: you doesn’t understand how plugin is work, then:
    1) I can translate all docs from http://wp-shop.ru/ to English, but my translation may be awful ๐Ÿ™ I can read English, but can’t speak English properly ๐Ÿ™

    OR:

    2) Just implement “Add existing parameters of query to Search&Filter PRO shortcode”. I can put technical task to you as many specifically, as you wish.

    This task:

    Once youโ€™ve created your Search Form you will want to add it to your theme/posts.
    As a Shortcode

    All Search Forms can be displayed using a shortcode. Click on Search & Filter in your admin sidebar to list all your Search Forms, their shortcodes will also be displayed.

    To use within your theme files simply call the do_shortcode function with the shortcode provided from the admin screen:

    <?php echo do_shortcode(‘[searchandfilter id=”1″]’); ?>

    I need Search&Filter PRO shortcode have optional parameter limitation as like: [searchandfilter id=”1″ limitation=”$additional_selection”].
    Your plugin should validate this parameter, and if it’s valid (like category=zerk_plitka), just add it to query “as is”. Other implementation (how to use it) is my problem ๐Ÿ™‚

    OR:

    3) I can implement this to your plugin, if you will implement my patch into next versions of Search&Filter PRO.

    Thanks.

    Ross Moderator
    #28566

    Hi Sergey

    To answer your questions:

    1) As mentioned, the plugin is working if you follow the instructions here:

    http://www.designsandcode.com/documentation/search-filter-pro/getting-started/creating-your-first-search-form/

    And you will be able to search your products – but I guess not directly one WP-Shop shop page – but it will be able to search your product post type – then the layout / integration would be upto you.

    2) There is a filter which allows you to modify the S&F query, so maybe you could use this to add your own custom parameters to the search query – kind of like you mention in the shortcode:

    http://www.designsandcode.com/documentation/search-filter-pro/2-0-upgrade-notes/#No_more_pre_get_posts

    3) I’m not sure I wan’t to include 3rd party code in the plugin without careful consideration.

    What I would be happy to do is, if you can find a working solution, implement some filters in the next version of S&F, which allow your modifications to work – which means you can continue to upgrade S&F with your modifications via filters staying in tact.

    Let me know!

    Thanks

    Anonymous
    #28663

    Hello, Ross.

    Can you give me usage samples of filter sf_apply_custom_filter?

    Maybe I can use this filter for my task?

    Thanks.

    Ross Moderator
    #28855

    Hi Sergey

    Its just the same as the $args object you pass to a new WP_Query – so this link should provide you with the necessary options:

    https://codex.wordpress.org/Class_Reference/WP_Query

    To take their category example and apply it to the S&F filter:
    https://codex.wordpress.org/Class_Reference/WP_Query#Category_Parameters

    =

    <?php
    function sf_filter_query_args( $query_args, $sfid ) {
      
      //if search form ID = 225, the do something with this query
      if($sfid==225)
      {
      	//modify $query_args here before returning it
            //only show results within categories with these IDs
      	$query_args['cat'] = '2,6,17,38';
      }
      return $query_args;
    }
    add_filter( 'sf_edit_query_args', 'sf_filter_query_args', 10, 2 );
    ?>

    Thanks

    Anonymous
    #28857

    Are you read my previous post? I asked about ANOTHER filter! Please read it closer!

    Hello, Ross.

    Can you give me usage samples of filter sf_apply_custom_filter?

    Maybe I can use this filter for my task?

    Thanks.

    Ross Moderator
    #28862

    Hi Sergey

    Yeah I got it the filter wrong because its not supposed to really be used ๐Ÿ˜‰ The filter I actually provided a code sample for is what you *might* want.

    You can use this to modify the query in many different ways – so you can restrict by certain categories, change date range, or use custom meta queries.

    So, programmatically you can detect the various search parameters from the other plugin, and feed them in through this filter. As long as you call the filter before either the search form or search results are displayed.

    The filter you mention actually is not yet documented as right now its not intended for general use – but all it does it take an array of Post IDs which the search results will be limited to.

    Thanks

Viewing 7 posts - 11 through 17 (of 17 total)