• Resolved tommicarleman

    (@tommicarleman)


    Hi,

    I noticed that when I’m using the dropdown filter, it does not get updated when I change it – for example, when I go to the page, and choose an option, it still says “Filter” but the url does change – and when I refresh the page, the selection is correct – and when I then try to remove the selection, the url and product list does change, but the filter does not.

    Thanks!

    https://www.ads-software.com/plugins/yith-woocommerce-ajax-navigation/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author YITHEMES

    (@yithemes)

    Hi,

    I think your theme don’t use the standard WooCommerce classes.

    Please read the last post of this topic:
    https://www.ads-software.com/support/topic/the-page-doesnt-update-after-clicking-on-a-filter?replies=4

    and let me know if you solve your issue!

    Thread Starter tommicarleman

    (@tommicarleman)

    The classes seem to be correct, the products list, count and pagination all update when using the filters.
    It’s only the filter selection that does not change. And there does not seem to be any js errors either.

    Plugin Author YITHEMES

    (@yithemes)

    Hi, please can you send me the link of your website ?

    Thread Starter tommicarleman

    (@tommicarleman)

    Ok, I know the issue now:

    In yith-wcan-frontend.js:188 you have “var id = t.attr(‘id’);” – in my case the element that it tries to update does not have any ID, just classes, so it ends up being “undefined”

    And then because I’m running roots as the base template, its default way to registering sidebar widgets is without ID:

    register_sidebar( [
    		'name'          => __( 'Primary', 'sage' ),
    		'id'            => 'sidebar-primary',
    		'before_widget' => '<section class="widget %1$s %2$s">',
    		'after_widget'  => '</section>',
    		'before_title'  => '<h3>',
    		'after_title'   => '</h3>'
    	] );

    So I just changed <section class=”widget %1$s %2$s”> to <section class=”widget %1$s %2$s” id=”%1$s”> and it works again!

    Thanks for the help, and sorry for the inconvinience.

    Plugin Author YITHEMES

    (@yithemes)

    You’re welcome!

    Yes it’s correct!
    good works.

    If you like our plugins and support, please give us a 5-star review!
    Thanks.

    YIThemes

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Dropdown filter selection not changing after click’ is closed to new replies.