Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WooCommerce Product Filtering with AJAX

I am trying to understand where the functionality for Woocommerce resides that handles AJAX requests on the Product Archive Pages. So for example when you use the Select Dropdown Form on the Shop page, or when you add a Woocommerce Sidebar Widget like the Layered Nav, or the Product Categories widget. Which WC file either PHP and or Jquery is handling the AJAX request and then returning the Sorted/Filtered data back to the page.

Ultimately what I am trying to do is hook into the default woocommerce AJAX functionality so I can extend it to fade in each product list item <li> separately, or any number of CSS3 effects, like transform 3D. As well as adding a switch button that toggles between Grid and List views for product category pages.

But I just can't find where in the Woocommerce files this is happening.

Any help is very much appreciated.

like image 336
Benjamin Avatar asked Nov 20 '13 20:11

Benjamin


People also ask

What is Ajax product filters?

BeRocket AJAX Product Filters plugin gives the option to create advanced WooCommerce products filters by a large variety of parameters and also give settings to customize the view of these filters. Advanced Woo Search has built-in support for BeRocket filters plugin.

How do I enable product filters in WooCommerce?

To use WooCommerce inbuilt filters, go to Appearance > Widgets and drag & drop the following filters in your sidebar: “Filter Products by Attribute“, “Filter Products by Rating” and “Filter Products by Price“.


1 Answers

As far as I know the basic WooCommerce plugin does not provide AJAX ability for Product Archive Pages.

If you like to add Ajax filtering and Ajax reload of Product Archive page you can use:

a) WooCommerce commercial plugin: http://www.woothemes.com/products/ajax-layered-navigation/

b) Free WordPress plugin called 'YITH WooCommerce Ajax Navigation': http://wordpress.org/plugins/yith-woocommerce-ajax-navigation/

c) WooCommerce AJAX Product Filter plugin: http://codenegar.com/woocommerce-ajax-product-filter/

or something similar.

like image 94
zdenekca Avatar answered Oct 03 '22 13:10

zdenekca