Support Forums

The forums are closed and will be removed when we launch our new site.

Looking for support? You can access the support system via your account.

Forums Forums Search Search Results for 'woocommerce'

Viewing 8 results - 1,981 through 1,988 (of 1,988 total)
  • Author
    Search Results
  • #1954

    Ross
    Keymaster

    Hey Chris,

    Its best to first make sure the plugin is working properly without AJAX, have you tried this and does it work ok?

    If the url does not update then it is likely a JavaScript error, which prevents the S&F scripts from running and effectively the AJAX request.

    Have you tried looking at your JS console in firebug or chrome’s inspector? If there are errors there (not warnings) then you will need to fix these first.

    Let me know.

    Thanks 🙂


    Chris Lambert
    Participant
    This reply has been marked as private.

    Chris Lambert
    Participant

    Ross,

    Sorry for jumping in. I have just downloaded your plugin also and am having the same problem.

    Set the search &bFilter to be a widget in the woocommerce sidebar as I want to it be able to filter my products (instead of the standard woo filters (i.e. I want to use tags better).

    I set up a quick test form and it shows it just wont affect anything and the URL isn’t changing.

    Any ideas? (I am download debug to test and see if there are issues there).

    settings

    #1807

    Ross
    Keymaster

    Hey Petr

    Yes, basically you need to create your own template, and create a widget area specifically for this page…

    1) Make sure custom template is ticked in admin
    2) Make sure you enter a slug (ie product-search)
    3) Create your custom template

    Now that you are using a slug you can access your search results like:
    yoursite.com/product-search and if you are using a custom template then you can restrict S&F to only appear on this template.

    Now the tricky part…. I had to do quite a lot of modification to get it working with the mystile theme exactly how I wanted.

    First I duplicated the archive-product.php from the woocommerce templates folder and called this products-search.php and put this in my theme folder.

    Then I create and register a sidebar, so…. Add this code to functions.php of your theme:

    register_sidebar(array(
    	'name'=> 'Search & Filter Form Widgets',
    	'id' => 'search_filter_form_widget',
    	'before_widget' => '',
    	'after_widget'  => '',
    	'before_title'  => '<h2 class="widgettitle">',
    	'after_title'   => '</h2>'
    ));

    Now you will find a new widget area to add S&F widget.

    We need to include this in our products-search.php though so we must create a sidebar first…

    Create a new file in your theme folder called sidebar-search-form.php and add the code:

    <?php 
    /**
     * Sidebar Template
     *
     * If a <code>primary</code> widget area is active and has widgets, display the sidebar.
     *
     * @package WooFramework
     * @subpackage Template
     */
    	global $woo_options;
    	
    	if ( isset( $woo_options['woo_layout'] ) && ( $woo_options['woo_layout'] != 'layout-full' ) ) {
    ?>	
    <aside id="sidebar" class="col-right">
    
    	<?php dynamic_sidebar( 'search_filter_form_widget' ); ?>
    	
    </aside><!-- /#sidebar -->
    <?php } // End IF Statement ?>

    Now we have a sidebar that loads our custom widget area…. but this is still not in our template… so in the template product-search.php add:

    <?php 
    	get_sidebar('search-form');
    ?>

    And there you have it! A new widget area just for your custom template 🙂

    #1802

    jospo
    Participant

    Hi,

    When reading this forum I noticed that Search & Filter does not work when any of “restrict widget” plugins are enabled. I tried some of them (Widget Logic, Widget Logic By Path, Display Widget, Restrict Widget, Widgets Controller, Widget Context), but with none of them AJAX search seems to work.

    Is there any way how to restrict Search & Filter widget to specific page AND to use AJAX search?

    Also do you have any suggestions what custom search template should I use (or create) to display search results in the same way as on your Woocommerce demo site? I am using Divi theme.

    Thanks!
    Petr

    #1019

    Ross
    Keymaster

    Hey Ken

    The way all the taxonomy fields are displayed are using a hook in to WordPress’ own function –
    http://codex.wordpress.org/Template_Tags/wp_list_categories

    So the logic behind the count function is handled by WordPress and seems to be the recommended way that this works (WordPress is not always right though).

    In my experience, for example when dealing with other real world data, is that posts that are of a child category, will also be added to the parent category.

    For example with the WooCommerce sample data you have singles and albums (as a product post type), which both have the parent category of music (if your not familiar with the sample data its just a load of test products with categories and tags – see it in action).

    All the singles have both checked music and singles as their category in the post edit screen. So the count would not be misleading and you could search in just the parent category or a child category easily.

    It depends on how you look at it I guess, if I saw a parent category with no no posts and then child categories with posts I would find that a bit confusing, I would assume a parent category is the sum of its parts (ie the children).

    So for now, what you need to do is also add the posts to the parent category to make those number exactly accurate. I’ll have a think some more about this logic I do plan on more customisations but it won’t be something I’ll update soon.

    Let me know if you have any suggestions/comments.

    Thanks

    #809

    Dmitry Veselov
    Participant

    Hi Ross,

    I hope you can help me on this. I’m keen to use Search & Filter Pro with a WooCommerce site but currently they don’t seem to work together. After adding widget Submit button just reloads a page without any effect on its content. URL stays the same, products are same.

    I’ve tried to change settings but without any effect as well

    Here’s screen of a page.
    http://i.imgur.com/FHac6qK.png

    Settings
    http://i.imgur.com/j77wNcR.png

    Thanks in advance

    #803

    In reply to: Ajax auto submit


    Ross
    Keymaster

    Hey Tim, a couple of bits of good news for you 🙂

    1) There was a conflict with Custom post type UI – we are both using the same menu position in our plugin, so one will be shown and one will be hidden… I will email you an updated file with this fix..

    2) Your Ajax only working once… I was just setting S&F again on another site and ran in to this exact issue (well its not an issue, just an oversight on my part). Essentially it was the content selector I was using to load results (#content).

    The default setting of #content *seemed* to work ok but I was getting the same problem as you. The problem is the selector is supposed to target your content area only (ie your list of posts/results) – your search widget is not supposed to be inside this selector otherwise there will be problems.

    For my woocommerce setup I changed this to #main and it worked fine – this is because the div with the ID of #main did not include the search widget itself.

    Hope that makes sense? 🙂

Viewing 8 results - 1,981 through 1,988 (of 1,988 total)