Pop up search result customization – size, hover results

This topic has 10 replies, 2 voices, and was last updated 2 months, 1 weeks ago ago by Luca Rossi

  • Avatar: kmc
    kmc
    Participant
    June 29, 2025 at 09:26

    Please see image attached

    1. How to disable this “select options” when hovering.
    2. How to make the product image display results smaller?
    3. how to change the text view all results?
    4. when there are more than 4 results, I see one line has 5 products but one product information is not displayed fully and also another line for 6th product. Can we make it slider or display properly?

    Files is visible for topic creator and
    support staff only.
    9 Answers
    Avatar: Justin
    Luca Rossi
    Support staff
    June 30, 2025 at 09:16

    Hi @kmc,

    – Please try adding this custom CSS under XStore > Theme Options > Theme Custom CSS > Global CSS:

    
    .etheme-search-ajax-results footer.footer-product {
        display: none;
    }
    
    .etheme-search-ajax-results .autocomplete-suggestion {
        min-width: 200px;
        max-width: 200px;
    }
    

    – Add the following code under functions.php file locates in your child theme:

    
    function n2t_text_strings( $translated_text, $text, $domain ) {
    	switch ( $translated_text ) {
    		case 'View all results' :
    			$translated_text = 'Your Custom Text Will Go Here';
    			break;
    	}
    	return $translated_text;
    }
    add_filter( 'gettext', 'n2t_text_strings', 20, 3 );
    

    Kind regards,
    The 8Theme Team

    Avatar: kmc
    kmc
    Participant
    June 30, 2025 at 17:28

    Thank you however there are 2 more issues.
    – when the product is variable product with discount, the text is messed up (see screen shot)
    – can we make the result image toggle as per product archive page?

    Files is visible for topic creator and
    support staff only.
    Avatar: Justin
    Luca Rossi
    Support staff
    July 1, 2025 at 09:19

    Hi @kmc,

    Please delete this previous code:

    
    .etheme-search-ajax-results .autocomplete-suggestion {
        min-width: 200px;
        max-width: 200px;
    }
    

    Then add this custom CSS codes:

    
    .etheme-search-ajax-results .price.etheme-search-form-item-price > * {
        display:block;
    }
    
    .etheme-search-ajax-results .price.etheme-search-form-item-price > * {
        display:block;
    }
    
    .etheme-search-form[type=popup] .autocomplete-suggestions {
        display: flex;
        flex-basis: 24%;
        flex-wrap: wrap;
        gap: 1%;
    }
    
    .etheme-search-ajax-results .autocomplete-suggestion {
        width: 24%;
        min-width: 24%;
    }
    

    Hope it helps!

    Avatar: kmc
    kmc
    Participant
    July 1, 2025 at 09:33

    Thanks for the quick reply but two issues:

    1. when there is no discount and variable products, the prices diplayed in 3 rows in stead of 1 row

    2. the postion of “view more products” are wrong.

    Files is visible for topic creator and
    support staff only.
    Avatar: Justin
    Luca Rossi
    Support staff
    July 1, 2025 at 13:28

    Hi @kmc,

    Please update the previous CSS codes to this:

    
    .etheme-search-ajax-results .price.etheme-search-form-item-price del,
    .etheme-search-ajax-results .price.etheme-search-form-item-price ins {
        display:block;
    }
    
    .etheme-search-form[type=popup] .autocomplete-suggestions {
        display: flex;
        flex-basis: 24%;
        flex-wrap: wrap;
        gap: 1%;
    }
    
    .etheme-search-ajax-results .autocomplete-suggestion {
        width: 24%;
        min-width: 24%;
    }
    
    .etheme-search-form-more {
        width: 100%;
    }
    

    Let us know how it goes!

    Avatar: kmc
    kmc
    Participant
    September 21, 2025 at 12:52

    I still see a number of issues on search page that need your help.

    On mobile,
    – how can I change the text “xx products found”
    – the variable products price overlapped
    – how can I change the search results to 2 collumn?
    – how do I change the “show xx more” text? especially the “show” and “more” ,keeping “xx” (the number of product results)
    – the “show xx more” at bottom is linking to a wrong page. (both desktop & mobile )

    Files is visible for topic creator and
    support staff only.
    Avatar: Justin
    Luca Rossi
    Support staff
    September 22, 2025 at 09:08

    Dear @kmc,

    We hope this message finds you well.

    1. You can adjust the layout of the search results column on both mobile and desktop devices by following this link: https://prnt.sc/BbL1ryEaU1Wc

    2. All of the mentioned texts are translatable using the Loco Translate plugin. Kindly try clicking the “Sync” button and then search for the strings again:
    https://prnt.sc/Y3Oymr3m7Ho4
    https://prnt.sc/bSfdRu7zNSPG

    3. Regarding the incorrect search results URL, we recommend temporarily disabling all third-party plugins that are not included with XStore. You can find the list of included plugins here: https://www.8theme.com/documentation/xstore/plugins/included-plugins/. After disabling the additional plugins, please clear your browser cache and check the issue again. It is possible that one of the external plugins is causing the conflict.

    Please let us know the outcome after trying the above steps.

    Kind regards,
    The 8Theme Team

    Avatar: kmc
    kmc
    Participant
    September 28, 2025 at 11:34

    – For Mobile version, I already changed the collumn into 2 however it still display as 4 columns

    – I realized this search only search the name of the products not the content / description of the products, how can I make the search also search the description of the product?

    Avatar: Justin
    Luca Rossi
    Support staff
    September 29, 2025 at 16:14

    Hi @kmc,

    1. Did you change to another search form? We only saw this: https://prnt.sc/lBzkS1DDFZt0

    2. It would require many customization code to achieve this search function, but you can try with this:

    
    function custom_woocommerce_search_by_description( $query ) {
        if ( $query->is_search && $query->is_main_query() && $query->get( 'post_type' ) === 'product' ) {
            $search_term = $query->get( 's' );
            if ( ! empty( $search_term ) ) {
                $query->set( 's', '' ); // Clear default search term
                $query->set( 'meta_query', array(
                    'relation' => 'OR',
                    array(
                        'key'     => '_product_description', // For long description
                        'value'   => $search_term,
                        'compare' => 'LIKE',
                    ),
                    array(
                        'key'     => '_product_short_description', // For short description
                        'value'   => $search_term,
                        'compare' => 'LIKE',
                    ),
                ) );
                $query->set( 'tax_query', array(
                    'relation' => 'OR',
                    array(
                        'taxonomy' => 'product_cat',
                        'field'    => 'name',
                        'terms'    => $search_term,
                        'operator' => 'LIKE',
                    ),
                    array(
                        'taxonomy' => 'product_tag',
                        'field'    => 'name',
                        'terms'    => $search_term,
                        'operator' => 'LIKE',
                    ),
                ) );
                $query->set( 'post_type', array( 'product' ) );
                $query->set( 'post_status', 'publish' );
            }
        }
    }
    add_action( 'pre_get_posts', 'custom_woocommerce_search_by_description' );
    

    Hope it helps!

  • Viewing 10 results - 1 through 10 (of 10 total)

You must be logged in to reply to this topic.Log in/Sign up

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.