• Resolved marcoquantum

    (@marcoquantum)


    Hi I can see the widget on my sidebar and brands are listed correctly, but if I check a brand and click the button to apply filter the pages reloads with all products, no filtering is done.

    The url of the pages reloaded end with /?pwb-brand-filter=strida
    If I change the url removing “-filter” it woks!

    Working url
    /?pwb-brand=strida

Viewing 3 replies - 1 through 3 (of 3 total)
  • Yes Please remove “-filter” in two file

    perfect-woocommerce-brands/assets/js/pwb_frontend_functions.js like

    currentUrl = currentUrl.replace(/&?pwb-brand=([^&]$|[^&]*)/i, “”);

    if( currentUrl.indexOf(“?”) === -1 ){
    currentUrl = currentUrl + ‘?pwb-brand=’+marcas;
    }else{
    currentUrl = currentUrl + ‘&pwb-brand=’+marcas;

    and in perfect-woocommerce-brands/classes/class-perfect-woocommerce-brands.php

    if( !empty($_GET[‘pwb-brand’]) ){

    $terms_array = explode(‘,’,$_GET[‘pwb-brand’]);

    Hi @vikaslive,

    I tried your fix but I still get the /?pwb-brand-filter on the URL once I apply the filter. Could it be that we still need to remove this “-filter” from other files?

    Thank you!
    Francisco

    For some strange reason it is not working on Chrome but it is working fine on Firefox. I tried disabling cache on Chrome but still won’t budge.

    Either way, seems that the problem is not on the code.

    Thank you again for the tip.
    Francisco

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Filter by brand widget not working’ is closed to new replies.