Home › Forums › WoodMart support forum › product category filter widget issue
product category filter widget issue
- This topic has 10 replies, 2 voices, and was last updated 4 years, 4 months ago by Artem Temos.
-
AuthorPosts
-
October 31, 2019 at 8:55 am #153738
GassigeherParticipantHello there, I just found out that there is an issue with the ajax funktionality when I use the product filter widget. After using an attribute filter the product filter doesn´t respond anymore.
When I deactivate the filter works again. Any idea how we still can use ajax?October 31, 2019 at 9:10 am #153751
Artem TemosKeymasterHi,
Could you please send us a link to your website where we can see this issue?
Kind Regards
October 31, 2019 at 10:12 am #153777
GassigeherParticipantHello there. Please see private content.
October 31, 2019 at 10:53 am #153790
Artem TemosKeymasterWe don’t see any problems on your website with filters at the moment https://gyazo.com/87e9363891f09d0414897b58a7add9f8
October 31, 2019 at 10:55 am #153793
GassigeherParticipantBut try to change the location after using the attribute filter
October 31, 2019 at 10:55 am #153794
Artem TemosKeymasterCould you please disable all plugins that are not related to our theme and provide us your admin access so we can check it?
Thank you in advance
October 31, 2019 at 11:08 am #153805
GassigeherParticipantOk
October 31, 2019 at 12:11 pm #153836
Artem TemosKeymasterYes, you are right. But it is not a filter but categories widget. We will fix this issue in our next theme update.
October 31, 2019 at 12:13 pm #153838
GassigeherParticipantok, so it´s nothing I did wrong – just something wrong with the theme? Hope update will come soon. Thank you anyway.
October 31, 2019 at 12:46 pm #153843
Artem TemosKeymasterYes, it is our theme’s bug. It will be fixed in the update for sure.
December 5, 2019 at 9:18 am #161228
Artem TemosKeymasterHello there,
Unfortunately, we are not able to fix this without WooCommerce modification. For now, please edit the file
wp-content/plugins/woocommerce/includes/widgets/class-wc-widget-product-categories.php
and remove the code http://prntscr.com/q6hohh
Then, go to Theme Settings -> Custom JS and put the following code one document ready
product_cat(); jQuery(document).on('pjax:complete', function(xhr, textStatus, options) { product_cat(); }); function product_cat(){ jQuery('.widget_product_categories').each(function() { var $select = jQuery('.dropdown_product_cat'); $select.change(function(e) { e.stopPropagation(); var home_url = woodmart_settings.home_url; var this_page = ''; if ( jQuery(this).val() != '' ) { if (home_url.indexOf('?') > 0) { this_page = home_url + '&product_cat=' + jQuery(this).val(); } else { this_page = home_url + '?product_cat=' + jQuery(this).val(); } } else { this_page = woodmart_settings.shop_url; } jQuery.pjax({ container: '.main-page-wrapper', timeout: woodmart_settings.pjax_timeout, url: this_page, scrollTo: false, }); }); if (jQuery().selectWoo) { $select.selectWoo({ placeholder: 'Select a category', minimumResultsForSearch: 5, width: '100%', allowClear: true, language: { noResults: function() { return 'No matches found'; }, }, }); } }); }
-
AuthorPosts
- You must be logged in to create new topics. Login / Register