Home Forums WoodMart support forum Woodmart Preventing Filters From Showing On Shop Page After Search Query

Woodmart Preventing Filters From Showing On Shop Page After Search Query

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #576877

    crazyhegyis
    Participant

    When i search a product on woodmart it does not display the filters in the sidebar area i am aware there is a filter area block which displays filters but those are for default woodmart filters

    Im using a plugin called Facet WP the woodmart theme itself is preventing it from displaying im using a custom layout so i changed the display conditions to include all archive pages, search and shop page but still doesnt work

    <see first image> the filter works on shop and categories but does not whenever you use the search bar

    <see second image> is there a way to make woodmart stop preventing the filter from displaying

    <see third image> when i use dev tools its clearly loaded but something is preventing it from loading any suggestions?

    Attachments:
    You must be logged in to view attached files.
    #576919

    Artem Temos
    Keymaster

    Hello,

    Thank you so much for purchasing our theme and contacting our support center.

    Sorry, but the password seems to be wrong, and we can’t access your website. Also, please disable all plugins that are not related to our theme and send us your admin access.

    Kind Regards
    XTemos Studio

    #577151

    crazyhegyis
    Participant

    Hello xtemos i found the issue!

    when a search query is perfomed it load the search result on the homepage

    https://staging.hhms.co.za/?s=brooms&post_type=product&dgwt_wcas=1

    your archive conditions in layouts only includes options for archive pages, categories, tags and the shop page it doesnt allow you to select other pages or even the homepage i had to use custom php code to redirect all search queries to the shop page to get it to work

    add_filter( ‘dgwt/wcas/form/action’, function( $url ) {

    // Parse the URL into components.
    $url_parts = parse_url($url);

    // Extract the scheme (http/https) and host (domain name).
    $scheme = $url_parts[‘scheme’];
    $host = $url_parts[‘host’];

    // Optional, if needed: extract the FiboSearch original query string (the part after the ?).
    $query_string = isset($url_parts[‘query’]) ? ‘?’ . $url_parts[‘query’] : ”;

    // Construct the new URL with /shop/ after the domain name.
    //$url = “$scheme://$host/shop/”; // This redirects the search form to the /shop/ page.

    // Alternative, if you needed, retain the original FiboSearch query string:
    //$url = “$scheme://$host/shop/$query_string”; // This redirects the search form to the /shop/ page.

    return $url;
    } );

    the search string now look like this https://staging.hhms.co.za/shop/?s=brooms&post_type=product&dgwt_wcas=1

    <look at images to see> this fixed the issue but i highly recommend you guys add regular pages to the layouts display conditions to be able to select other pages so that other search plugins can have no conflicts with your theme!

    Attachments:
    You must be logged in to view attached files.
    #577282

    Artem Temos
    Keymaster

    Hello,

    Our custom layouts work only on WooCommerce pages. They can’t be applied to other WordPress pages that are not related to WooCommerce.

    Kind Regards

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