• Resolved redwing13

    (@redwing13)


    Hello Stanislav,

    First of all – thank you for this great plugin and for your support. Alas, during the usage, I encountered problems which are primarily related to filtering.

    Straight to the point – when I choose: make + model + year + category + subcategory it shows correctly items that I assigned. But problem kicks in, just if I skip selecting subcategory. (any other combination works, e.g. just make or make + model with skipping rest). Instead of showing filtered assigned vehicles’s products from that category, it just shows regular WP/Woo SHOP page for that Category and thumbnails of it’s subcategories – without any correlations to chosen vehicle model and products.

    For much better user navigation, I set WP Product Catalog display as Show Subcategories. Problem is somewhat “fixable” if I set WP to – show products, but… in that case it is a mixed mess, confused for users. Same goes for show subcategories + products.

    —-

    2nd issue:

    Some of my (sub)categories have at least 2,3 pages. If I select vehicle filter widget within opened (sub)category page, it perfectly sorts out products for vehicle. But, if I go to 2nd, 3rd or whatever page of category and try filter – it just adds upon existing permalink ending with page/2/?s=&ymm_search… and ofc, it doesn’t work.

    I was able to kind of a “fix” it by using Infinity Scroll plugin and getting rid of pages, but…

    —–

    Just to add, I tested it on Wamp and live site, with different combinations of versions and of course deleting many plugins to avoid conflicts. Can it be somehow related to WP Hestia theme or is it due to YMM plugin itself? Any ideas? 🙂

    Again, thanks a lot for your efforts.

    All the best,
    Goran

    • This topic was modified 7 years, 7 months ago by redwing13.

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Pektsekye

    (@pektsekye)

    Hello,

    This plugin can filter only a category page with products for now.

    I will try to fix the pages problem.

    Stanislav

    Plugin Author Pektsekye

    (@pektsekye)

    Hello,

    >But problem kicks in, just if I skip selecting subcategory.

    I have tried to reproduce it on my localhost and it does not redirect me to the sub category that will display just sub categories.
    Can you check if it works the same with the original version of this plugin without modifications?

    To fix the pagination problem try to add the code:

    
          if (url == ''){
            var currentUrl = window.location.href;
            if (currentUrl.indexOf('/page/') != -1){
              url = currentUrl.replace(/\/page\/\d+\//,'/').replace(/\?.*/, '');
            }  
          }
    

    after the line:

    
          var url = categoryUrl ? categoryUrl : this.submitUrl;
    

    in the file:
    wp-content/plugins/ymm-search/view/frontend/web/main.js

    Let me know the result

    Stanislav

    Thread Starter redwing13

    (@redwing13)

    Hello,

    I added the code, which fixes pagination problem. Thx! 🙂

    Regarding the first issue – I did as you instructed plus more variations, but same story. Just to add – if chosen category has no sub ones, it shows correctly.

    It seems that WP setting of Product catalog; category display – show subcategories, is in the conflict with YMM and preventing it to do the job… Since it is set to not show any product from the category. Is there a way to overcome it somehow?

    Anyway, topic 50% solved!

    Plugin Author Pektsekye

    (@pektsekye)

    Hello,

    This plugin cannot filter a category page with sub categories.

    Even if it can do it after clicking on any subcategory icon the customer will see a not filtered page.

    I think one of the possible solutions is to hide the Search button until all subcategories are selected.

    Try to replace the code:

    
                  if (this.rootCategoryIds.length > 0){
                    this.addCategorySelect(this.rootCategoryIds);
                    if (this.wordSearchEnabled){
                      this.extraContainer.addClass('or-search');                  
                    }                  
                  }                
                  this.extraContainer.show();
                  if (this.wordSearchEnabled){              
                    this.searchAnySelButton.hide();
                  }
    

    with:

    
                  if (this.rootCategoryIds.length > 0){
                    this.addCategorySelect(this.rootCategoryIds);
                    if (this.wordSearchEnabled){
                      this.extraContainer.addClass('or-search');                  
                    }                  
                  }                
                  this.extraContainer.show();
             //     if (this.wordSearchEnabled){              
                    this.searchAnySelButton.hide();
             //     }
    

    in the file:
    wp-content/plugins/ymm-search/view/frontend/web/main.js

    Let me know the result

    Stanislav

    Plugin Author Pektsekye

    (@pektsekye)

    Hello,

    You can try to use the “Filter sub categories” modification:
    http://hottons.com/ymm_modifications

    Stanislav

    Thread Starter redwing13

    (@redwing13)

    Hello,

    I tested it, both solutions work as intended. Most likely, I will be permanently using your Filter Sub categories mod – among few others… Hopefully other users will find it very useable, too.

    Thanks a lot again, topic 100% solved!

    ★★★★★

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘YMM filtering – 2 issues’ is closed to new replies.