ID Status Date Product
#18330005 Closed WooCommerce Product Filter
Paul A

Hi,

I love your product! :)

When I have my widget set up with an assortment of Attribute and Category filters it works very well on the woocommerce index page – and also works well as I select my filters (thus refining my search) – but when I get all the way to the product page, the sidebar widget appears empty. Everything from the widget area disappears – even the search reset button…

 

 

Paul A

Sorry – missed one attachment – should be three (3) attachments

Farhad Ahmadi

Hi,

Thanks for contacting.

Please note that filters only appear at product’s archives (like Recent Products, Products Tags, Products Categories, Products Search, Product attributes,…) It’s for WordPress performance.

Products details page has nothing to filter, so the plugin doesn’t load there.

Thanks.

Paul A

Yes, I understand all that. Thanks.

 

However, for the search mechanisms of the product catalog to entirely disappear for the site visitor once he searches / filters / all the way down to a product page looks bizarre. I’ve never seen any other web site where the primary means of searching the store vanishes once you land on a product page.

There is no explanation provided to the visitor.

Is there any way I can override this?

Farhad Ahmadi

You can edit the plugin to change this behaviour, but it’s not logical to have filters when there is no product to filter.

You may add some other stuff in the sidebar when it shows single product page or completely hide sidebar using CSS.

This behaviour is a performance feature of this plugin, the plugin doesn’t waste the resources when there it’s not required.

Thanks.

Paul A

Hi,

In your reply you said “You can edit the plugin to change this behaviour”

Can you tell me where in the plugin code I can do this?

Thanks.

Farhad Ahmadi

Open wp-content/plugins/woocommerce-product-filter/helper.php

Browse to line 439

Create a new line and enter this code in it:

if(is_singular('product')){

return true;

}

I haven’t tested the above code, but it should work or at least you get the point.

Thanks.

Paul A

Thank you. Will try this.

Paul

Write a reply

The ticket has been closed. If you feel that your issue has not been solved yet or something new came up in relation to this ticket, you can re-open it by clicking this link.