AND – OR function and filter page layout adjustment
-
Hello, we are optimizing the filter, however it seems missing some major options, such as the and or function. Now it’s not possible to filter more then one attribute. You can’t choose the and / or function in the backend of the filter, because it doesn’t exist??
Furthermore we can’t adjust the filtered page. The layout is awfull now, but where to find the page to adjust it? I think this isn’t possible eather?
We use the pro version, but this 2 things are for us very important. So I hope you have the answer for us?
Thanks!
The page I need help with: [log in to see the link]
-
Hello crvdh14,
I would like to ask you to kindly elaborate on the question about not being able to filter by more than 1 attribute. Of course you can filter by as many attributes as you wish, as well as their combinations! The filters utilize the default AND relationship between the queries of the separate filters. The OR option has never been offered by our plugin, as it would be rather counter-intuitive in case of product filtering. Here you can read the documentation article on customizing the filtering logics within a single filter.
As for adjusting the filtered page, if you are talking about the filters’ own layout, it is determined by the settings of each individual preset. Go to annasta Filters > Filter Presets tab of your WP admin, and click on the Edit Preset (cog) button of the needed preset. Click here for the relevant section of our Getting Started tutorial.
In addition to the options offered by the preset settings page, you can visit the “annasta Filters” section of the WordPress Customizer (Appearance > Customize). It allows you to adjust various aspects in the appearance of your filters.
In case you meant the product list layouts, it is not determined by the filters, but by your theme. If your theme (or 3d party layout plugin) doesn’t support the Dedicated AJAX mode, just switch it back to “Enhanced compatibility”.
In case you use Elementor, please keep in mind that the filters only support the native WooCommerce (and not the Elementor proprietary) loop. Here is the documentation article on Elementor compatibility.
One last remark: the 3d party “Load more” pagination that you currently have on your shop page will most likely not support your filtered product lists. If you wish to use the “Load more” pagination style, set the pagination back to the WooCommerce default in your theme options, and try the annasta Filters > Product lists > Pagination settings for AJAX-powered pagination options compatible with the filters.
HI, I tested everything I could, but still no possibility to filter in the right way. I have several product categories and sub-categories. After that some attributes. Whenever I try one product category and then choose one attribute, the filter, filters immediately, without giving me the change to choose another attribute.
As for the page we use Elementor, I tried your idea of not using the loop, but instead the product archive products, same issues, so there was no difference. Also we can only use page numbers instead of ‘load more’ and that’s not wat we want to use.
So I tried it, but it seems not working? Maybe you can try it again and you’ll see the same?
Thanks!
Dear @crvdh14,
Thank you so much for clarifying the issue of not being able to filter for more than 1 attribute! I now see that you simply wish to implement the delayed filters submission. To do that please use the Filtering style preset setting:
- The AJAX with button submission option will add the “Filter” button at the end of your preset. All the filters will get submitted only upon pressing this button. You can enable additional submit buttons with the help of the Enable button submission setting on filter level, on whichever filter you need.
- The AJAX with delegated submission option of the Filtering style setting will delay the filters’ submission till any of the “Filter” submit buttons of the page is pressed (including those belonging to other presets). Once again, you can additionally use the Enable button submission setting on the needed filters.
We are experiencing an issue with the Annastra Product Filter plugin on our WordPress website.
The Problem:
When a user applies a product attribute filter (e.g.
pa_patterns-filter=aquarelon the page), the filtering works as expected. However, when the user then removes this applied filter, the product display on the page breaks.Steps to Reproduce the Problem:
- Navigate to: ‘https://youpri.nl/product-categorie/kinderbehang/‘
- Apply a product attribute filter. For example, select an attribute from the “Patterns” filter. This will change the URL to something like: ‘https://youpri.nl/product-categorie/kinderbehang/?archive-filter=1&pa_patterns-filter=aquarel’
- Then click to remove the applied filter (e.g. click the ‘x’ next to “aquarel” or deselect it).
- The page then loads incorrectly, with a broken display. The URL in the address bar changes to something like:
<a href="https://youpri.nl/product-categorie/kinderbehang/?archive-filter=1">https://youpri.nl/product-categorie/kinderbehang/?archive-filter=1</a>
Important Observations:
No JavaScript Console Errors: When the page breaks after removing the filter, we checked the browser developer console, and there are no JavaScript errors present.
URL Update Behavior: Crucially, when the page breaks, the URL in the address bar is not immediately updated correctly. It seems to hold the intermediate URL for a moment. Only when we manually refresh the page does the URL correct itself in the address bar and the page is displayed correctly.
Caching Plugin Disabled: We have temporarily disabled our caching plugin (WP Rocket) and confirmed that the issue persists, indicating that it is not a caching issue.
Theme: We use the Elementor theme.
We suspect a conflict, possibly related to how our AJAX-based filtering interacts with Elementor’s product display or WooCommerce’s AJAX handling when removing filters.
Hello @crvdh14,
From what I can see, the main problem lays in the non-standard HTML selectors used by your theme (or the Elementor plugin). Have you followed these guidelines when building your shop page in Elementor? Moreover, some custom script seems to trigger page reloads on your AJAX filters and there may be other less obvious issues.
To resolve the non-WooCommerce HTML selectors please go to annasta Filters > Product lists tab of your WP admin and try the following:
- Set the AJAX mode to enhanced compatibility
- Open the Custom Selectors section and set the Products list selector field to this:
.elementor-loop-container.elementor-grid - Save the settings and reload your shop page to test this setup.
Hello @crvdh14,
We haven’t heard back from you for a while, so I will go ahead and mark this thread as resolved. You are welcome to open a new topic if you ever have any further questions!
The topic ‘AND – OR function and filter page layout adjustment’ is closed to new replies.