WooCommerce AJAX Product Filter (or WooCommerce AJAX Layered Navigation) adds advanced product filtering to your WooCommerce shop. It provides rich Interface for users to filter products by custom attributes, hierarchical categories, WooCommerce product meta fields, WordPress custom post meta fields, custom taxonomies,... at realtime.
You can build your own store advanced filters with drag and drop in a minute. There is no limit on the number of filters you add to shop; so customers can filter products by nested categories, price, dimension, size, color, weight, rate, sales count,... unlimited more product attributes in three types of UI: Slider, Drop Down and checkbox list. Filters can even be applied on product search results. So you can search and apply filters on your products results.
Filter results are loaded via AJAX at realtime but don't worry about SEO Woo AJAX Product Filter uses HTML5 PushState and for old browsers HashTag fallback.
This plugin is best for stores with a lot of products and items or multiple product attributes.Thank you for purchasing my plugin. If you have any questions that are beyond the scope of this help file, please feel free to contact. Thanks so much!
After installation, widgets are ready to use. "Woocommerce AJAX Product Filter" installs 9 widgets:
Widgets have some common settings:
If you select no categories / no attributes sidebar is dispalyed in all categories / all attributes.
A shortcode is a WordPress-specific code that lets you do things with very little effort.
The usage is pretty simple; put shortcode inside a post, page or..., the selected filters appears to users.
By installing this plugin you can use shortcode inside WordPress native "text widget".
To make shortcode and function work, you should go to WordPress admin > Appearance > Widgets page and add Filters to generated sidebars.
If you want to use shortcode at sidebar make sure that you put it at your theme sidebars not this plugin generated sidebars.
This section is for advanced users. If you don't know what is this section for or don't know what are you doing; Get help from a developer or freelancer or a friend.
Define a JavaScript function and name it wcsl_before_ajax E.G:
function wcsl_before_ajax(){ alert("ajax request is starting"); }wcsl_before_ajax will be fired before every AJAX request. Note that wcsl_before_ajax function is going to be asynchronous.
Define a JavaScript function and name it wcsl_ajax_done E.G:
function wcsl_ajax_done(){ alert("successful request"); }wcsl_ajax_done will be fired after a successful AJAX request.
Define a JavaScript function and name it wcsl_ajax_fail E.G:
function wcsl_ajax_fail(){ alert("request failed."); }wcsl_ajax_fail will be fired when AJAX request fails to complete.
Define a JavaScript function and name it wcsl_after_ajax E.G:
function wcsl_after_ajax(){ alert("after ajax request."); }wcsl_after_ajax will be fired after each AJAX request (done or fail).
Define a JavaScript function and name it wcsl_on_update E.G:
function wcsl_on_update(){ var my_areas = new Array(); my_areas[0] = "p.woocommerce-result-count"; return my_areas; }wcsl_on_update should return an array of jQuery selectors. Each array item is proccessed as a jQuery selector and will be updated on each AJAX request
function wcsl_on_update(){ var my_areas = new Array(); my_areas[0] = "div.woo-pagination"; return my_areas; }
<ul class="products"> <li>Product 1</li> <li>Product 2</li> <li>Product 3</li> </ul>
<span class="codenegar-shop-loop-wrapper"> Product 1 Product 2 Product 3 </span>