Home › Forums › WoodMart support forum › Problem with the product filters, not sorting products properly
Problem with the product filters, not sorting products properly
- This topic has 15 replies, 3 voices, and was last updated 4 years, 8 months ago by Artem Temos.
-
AuthorPosts
-
December 16, 2019 at 5:09 pm #163627
bigdropParticipantI have set up the product filters to work with AND logic.
I have created several filters based on my attributes.
On the shop page when I use two (or more filters) the result products show wrong products.EX. if I use as filters the color Natural and as texture Fabric (bot color and texture are attributes) I get as a result 3 products. The products are: “STAFILI”, “XI” and “DEMOSTHENES”.
The “STAFILI” comes in Fabric texture but does not have a Natural color option (in any texture).
The “XI” comes in Fabric texture but does not have a Natural color option (in any texture).
The “DEMOSTHENES” comes in Natural color but only on Fur or Leather texture. The Fabric version of this product comes only in Black, Brown and Multicolor.What is the problem? How can I fix this?
December 17, 2019 at 7:51 am #163701
Aizaz Imtiaz AwanKeymasterHello,
I have test your site with those filters, color Natural and as texture Fabric. As the three products shown in the result.
The “STAFILI” comes in Fabric texture and also containing a Natural attribute inside attribute tabs. That’s why it is shown.
Screenshot for clarification: https://jmp.sh/noyUlRh
When I remove the “Natural” attribute and then check back your filter then the “STAFILI” did not shown anymore which is correct.
You can check the result in this screenshot: https://jmp.sh/bCIwURb
Same thing applied for product “XI” and “DEMOSTHENES”. You have added all the attributes even if you do not use them in your variations. So I suggest you to only add those attributes which you want to use in your variations. In this way your filters working just fine.
Best Regards.
December 20, 2019 at 6:44 pm #164306
bigdropParticipantHi,
I have modified the products and removed all the unwanted attributes.
The problem is that the filter is not working properly again.I need it to have AND logic.
If select color red and texture fur, the products shown must have a variation that has the both attributes.December 21, 2019 at 6:54 am #164350
Aizaz Imtiaz AwanKeymasterHello,
When I tried your products with specific attributes the filter working just fine as expected.
Exactly which combinations you used for your filter and you did not get your expected result? Because when I test red color with “Fur” texture three products shown..
Screenshot for clarification: https://jmp.sh/GFI5lmk
All of these three products having those two attributes you can check from product settings.
Best Regards.
December 22, 2019 at 7:55 pm #164537
bigdropParticipantOn the same search that you have performed. The result is 3 products:
Demosthenes, Greek Hermes and Xi. Please check the 3 links below. None of this products has a variation that is red fur. The fur come in other colors and the red color come in other textures.
When I set up the search widget I use the AND for Query type.https://ibb.co/3z1cwcN
https://ibb.co/wCR62Xd
https://ibb.co/W56F4GKWhen the query type is AND then it should only show products that has variations that are Red color and Fur.
Like this https://ibb.co/z5WqN9mDecember 23, 2019 at 6:10 am #164584
Aizaz Imtiaz AwanKeymasterHello,
Yes, I have noticed that those three products does not have any variation which contains combination of red color and fur texture. But whenever I delete any of those two attributes from attributes then the filter working fine accordingly. That’s a little strange that the products does not have a specific combination of variation and still shown in result.
Could you please switch to parent version of theme and deactivate all the third party plugins which is not related to the theme and also if you have added any custom css, or js code then remove it for a while and then check back after clearing your site and browsing cache.
In case if the issue is still there after doing all these steps. Then remain the plugins as disable and let me check with theme default plugins and allow me to troubleshoot your site. You can take a whole site backup in that case.
Best Regards.
December 23, 2019 at 8:41 am #164619
bigdropParticipantHi,
I gave disabled all the non related plugins.
Switch to parent theme.
Delete any custom css.
Delete all caches.The problem is still there.
December 23, 2019 at 10:10 am #164643
Aizaz Imtiaz AwanKeymasterHello,
I have test your site, Which php version are you using currently? I try to add a plugin to check your php version but it is asking for a password.
Also I add a test product and two more filters “testColor” and “testTexture” and the query type as “AND” but still your filters works on the basis of variations. When I check the results on the basis of variation combinations it display incorrect results. And also display the product even the variation does not exist, but when I remove that attribute then the item is also removed from the search results.
Screenshot: https://jmp.sh/5PN45IF
Link for product: http://sandals.tsite.eu/wp-admin/post.php?post=10497&action=edit
Have you add any function hooks somewhere in your funtion.php or in some other file.
Best Regards.
December 27, 2019 at 10:35 am #165207
bigdropParticipantI have installed the plugin for displaying the php version and also one more for displaying the mysql version.
I have updated the wordpress to latest version.
The parent theme is clean (as downloaded).
I have reinstalled the parent theme.
Any modifications made are in child theme.WordPress 5.3.2
PHP version: 7.3.13
MySQL: 5.7.28December 27, 2019 at 12:29 pm #165220
Aizaz Imtiaz AwanKeymasterHello,
You contain some Js code in global custom JS area under theme settings. Kindly undo that code and also some of the third party plugins still active just disable them and check back,Or allowed me to test with default plugins.
Best Regards.
December 27, 2019 at 3:49 pm #165254
bigdropParticipantOnly the required plugins are active and the two plugins for displaying the php version and the mysql version. If you no longer need those two plugins, deactivate them.
I have removed the Global JS. This code was provided to me by you, here https://xtemos.com/forums/topic/change-image-on-hover-and-click-instead-of-just-ckick/
December 29, 2019 at 7:45 am #165367
Artem TemosKeymasterHello,
Could you please check how it works with some default WordPress theme like twentysixteen to understand is it our theme issue or not? You can use WooCommerce product filters that are standard WooCommerce widget to filter your products.
Regards
December 29, 2019 at 11:18 am #165389
bigdropParticipantSwitched to storefront theme. But it still does not work.
December 29, 2019 at 4:22 pm #165435
Artem TemosKeymasterIt is the way it works by default in WooCommerce. “AND” doesn’t mean that it will search for variations. If the product contains two colors and two sizes, it will not search for the combination of color+size, but for both attributes separately.
December 29, 2019 at 6:43 pm #165441
bigdropParticipantThis is so wrong. Do you know if there is any plugin that could make this work properly?
December 29, 2019 at 6:58 pm #165444
Artem TemosKeymasterSorry, but we didn’t face any plugins that work in this way.
-
AuthorPosts
- You must be logged in to create new topics. Login / Register