PluginUs.Net - Business Tools for WooCommerce and WordPress

[realize your idea - make your dreams come true]

Support Forum

You need to log-in to create request (topic) to the support

Filter results appears two times

The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday. If you have problems with registration ask help on contact us page please
If you not got email within 24~36 business hours, firstly check your spam box, and if no any email from the support there - back to the forum and read answer here. DO NOT ANSWER ON EMAILS [noreply@pluginus.net] FROM THE FORUM!! Emails are just for your info, all answers should be published only here.
The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday.

Hi,

I'm using Wordpress 5.7.2, Woodmart theme v 6.0.4, Woocommerce 5.5.2 and Woof (pro) v 2.2.5.3

To ajaxify the filters, I have deactivated the Woodmart functionnality (woodmart theme settings → Shop → Ajax shop) and enable Woof's one.

Everything seems to works except the default product listing still appearing above the filtered results.

What's needed to do to correct this double display ?

hello

In this case, you need to customize the theme template.

It looks like this template doesn't use the standard hooks - 'woocommerce_before_shop_loop' 'woocommerce_after_shop_loop'

Without these hooks, the ajax mode won't work

In fact these 2 hooks are called.

As you can see in the private section's link I've added red text content in this 2 hooks.

But seems likes it's called more than once depending on the filter's result.

Which php function is called by your plugin for ajax page redraw ? Seems like it call the original Woocommerce product loop without taking care of the active theme product loop modifications (child-theme/woocommerce/archive-product.php).

Is that right or am I missing something ?

Hello

You are a little wrong.

In fact these 2 hooks are called. - Yes, but not where necessary. From the text of the hook, you can guess that one is called at the beginning of the product template and the other at the end of the product template. But it seems that first these two hooks are called and then the products are displayed

But seems likes it's called more than once depending on the filter's result. - No! This is called only once and has nothing to do with filtering at all.

Which php function is called by your plugin for ajax page redraw - We use the standard function -  wc_get_template_part('content','product'); - and this function determines where to get the template.

Ok thank's for the clarification ! I will try to update the Woodmart theme and will post here the solution if I find it.

Could you provide some popular theme that are tested and are fully compatibles with your extension in Ajax mode ?

Thank's in advance

 

Hello

Unfortunately, I cannot give such information. Themes are constantly updated and Ajax functionality is added to them

About Woodmart :

I advise you to find in the theme where these hooks are called/ And I think it is possible to fix it in the child theme.

Thank's for your reply.

We finally arrive to make the filters works with the theme support.

Last thing we need to do is to execute a javascript code just after the AJAX is complete.

Is there a hook for that ? Or where should I include the script.

Thank's a lot for your feedback. If we arrive to make it works with Woodmart we'll post here the full solution so that your customer can benefit from it.

Hello

Please use  this  field - https://share.pluginus.net/image/i20210927135021.png

OR  JS  action - woof-ajax-form-redrawing