Home Forums WoodMart support forum Problem with the product filters, not sorting products properly

Problem with the product filters, not sorting products properly

Viewing 16 posts - 1 through 16 (of 16 total)
  • Author
    Posts
  • #163627

    bigdrop
    Participant

    I 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?

    #163701

    Hello,

    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.

    #164306

    bigdrop
    Participant

    Hi,

    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.

    #164350

    Hello,

    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.

    #164537

    bigdrop
    Participant

    On 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/W56F4GK

    When 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/z5WqN9m

    #164584

    Hello,

    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.

    #164619

    bigdrop
    Participant

    Hi,

    I gave disabled all the non related plugins.
    Switch to parent theme.
    Delete any custom css.
    Delete all caches.

    The problem is still there.

    #164643

    Hello,

    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.

    #165207

    bigdrop
    Participant

    I 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.28

    #165220

    Hello,

    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.

    #165254

    bigdrop
    Participant

    Only 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/

    #165367

    Artem Temos
    Keymaster

    Hello,

    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

    #165389

    bigdrop
    Participant

    Switched to storefront theme. But it still does not work.

    #165435

    Artem Temos
    Keymaster

    It 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.

    #165441

    bigdrop
    Participant

    This is so wrong. Do you know if there is any plugin that could make this work properly?

    #165444

    Artem Temos
    Keymaster

    Sorry, but we didn’t face any plugins that work in this way.

Viewing 16 posts - 1 through 16 (of 16 total)