• Resolved OpenTips

    (@sergeiweb)


    G’day

    I’ve just installed a free version of this search plugin and I really like it! It works perfectly for my website and desktop version of it is just amazing.

    However, when I’m using the same plugin on my mobile version, after I press “go” button (click “enter” button) – I see no results.

    “no results were found”

    If I click on preview by using my touch-screen – it works.

    How can I solve this problem and make sure that “enter” button works as well?
    (it does for desktop).

    PS
    For integration to my mobile menu I’ve used this code:
    <input id="nasa-input-<?php echo esc_attr($_id); ?>" type="text" class="<?php echo esc_attr($classInput); ?>" value="<?php do_shortcode ([aws_search_form]); ?>" name="s" placeholder="Search..." />

    Thank you in advance.

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

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author ILLID

    (@mihail-barinov)

    Hello,

    As I see the problem is that on desktop site version you indeed has plugin search form. But on mobile it is not plugin form ( maybe some standard theme form ).
    So you need to replace search form and for mobile too.
    Note – have you try to use ‘Seamless integration’ option? Maybe this will help you.

    Regards

    Thread Starter OpenTips

    (@sergeiweb)

    Hello @mihail-barinov,

    thank you for your respond!

    1. Yes, I am using the ‘Seamless integration’ option and this is my settings page:
    https://joxi.ru/bmo14LRF3ZbzpA

    2. Yes, I do have a standard theme form which is different for mobile and desktop version, but I did replace it with the “Advanced Woo Search” Form. Maybe I have made a mistake somewhere in this code?

    <input id="nasa-input-<?php echo esc_attr($_id); ?>" type="text" class="<?php echo esc_attr($classInput); ?>" value="<?php do_shortcode ([aws_search_form]); ?>" name="s" placeholder="AWS" />

    this is a php file which includes a search form for mobiles. I’m using placeholder=”AWS” to make sure I have this form and not the “template” form.

    Example (request for 7396) on
    mobile: https://joxi.ru/xAeKqbyHRwy9Gm
    desktop: https://joxi.ru/RmzG41BIYBb8j2

    p.s. Installed update today, still the same issue.
    Perfect for desktop, no “enter/go” functionality for mobile.

    Please help

    Plugin Author ILLID

    (@mihail-barinov)

    Hello,

    There is a mistake in your code

    <input id="nasa-input-<?php echo esc_attr($_id); ?>" type="text" class="<?php echo esc_attr($classInput); ?>" value="<?php do_shortcode ([aws_search_form]); ?>" name="s" placeholder="AWS" />

    You insert plugin shortcode inside input value tag. It is wrong.
    Please in the file where you find this code find form tag and fully replace it with

    <?php echo do_shortcode ([aws_search_form]); ?>

    Thread Starter OpenTips

    (@sergeiweb)

    Thank you for noticing!
    Fixed this issue, unfortunately still don’t get the result I want.

    Now I practically get not active “go” button, when I need it to be active and show the same results as if I use “enter” button on desktop.

    What might be wrong?

    My code at the moment is:
    <input id="nasa-input-<?php echo esc_attr($_id); ?>" type="text" class="<?php echo esc_attr($classInput); ?>" value="" name="s" form="<?php echo do_shortcode ([aws_search_form]); ?>" placeholder="search" />

    Plugin Author ILLID

    (@mihail-barinov)

    Please write here the content of file where you want to add plugin shortcode. I will show you what fixes must be done.

    Thread Starter OpenTips

    (@sergeiweb)

    the whole file looks like it:

    <?php
    /**
     * The template for displaying search forms mobile in nasatheme
     *
     * @package     nasatheme
     * @version     1.0.0
     */
    $_id = rand();
    
    $url = home_url('/');
    $postType = apply_filters('nasa_mobile_search_post_type', 'product');
    $classInput = 'search-field search-input';
    $placeHolder = esc_attr__("Start typing ...", 'elessi-theme');
    $classWrap = 'nasa-searchform';
    if ($postType === 'product') {
        $classInput .= ' live-search-input';
        $classWrap = 'nasa-ajaxsearchform';
        $placeHolder = esc_attr__("I'm shopping for ...", 'elessi-theme');
    }
    ?>
    
    <div class="search-wrapper <?php echo esc_attr($classWrap); ?>-container <?php echo esc_attr($_id); ?>_container">
        <form method="get" class="<?php echo esc_attr($classWrap); ?>" action="<?php echo esc_url($url) ?>">
            <div class="search-control-group control-group">
                <label class="hidden-tag"><?php esc_html_e('Search here', 'elessi-theme'); ?></label>
                <input id="nasa-input-<?php echo esc_attr($_id); ?>" type="text" class="<?php echo esc_attr($classInput); ?>" value="<?php echo get_search_query();?>" name="s" form="<?php echo do_shortcode ([aws_search_form]); ?>" placeholder="AWS_2" />
                <input type="hidden" class="search-param" name="post_type" value="<?php echo esc_attr($postType); ?>" />
                <div class="nasa-vitual-hidden">
                    <input type="submit" name="page" value="search" />
                </div>
            </div>
        </form>
    </div>
    
    Plugin Author ILLID

    (@mihail-barinov)

    Please change it to

    <?php
    /**
     * The template for displaying search forms mobile in nasatheme
     *
     * @package     nasatheme
     * @version     1.0.0
     */
    $_id = rand();
    
    $url = home_url('/');
    $postType = apply_filters('nasa_mobile_search_post_type', 'product');
    $classInput = 'search-field search-input';
    $placeHolder = esc_attr__("Start typing ...", 'elessi-theme');
    $classWrap = 'nasa-searchform';
    if ($postType === 'product') {
        $classInput .= ' live-search-input';
        $classWrap = 'nasa-ajaxsearchform';
        $placeHolder = esc_attr__("I'm shopping for ...", 'elessi-theme');
    }
    ?>
    
    <div class="search-wrapper <?php echo esc_attr($classWrap); ?>-container <?php echo esc_attr($_id); ?>_container">
        <?php echo do_shortcode ([aws_search_form]); ?>
    </div>
    Thread Starter OpenTips

    (@sergeiweb)

    Done.
    Got “Array” message instead of search form now.

    https://joxi.ru/V2V9Z46cdybEbm

    Plugin Author ILLID

    (@mihail-barinov)

    Ok, than try

    <?php
    /**
     * The template for displaying search forms mobile in nasatheme
     *
     * @package     nasatheme
     * @version     1.0.0
     */
    $_id = rand();
    
    $url = home_url('/');
    $postType = apply_filters('nasa_mobile_search_post_type', 'product');
    $classInput = 'search-field search-input';
    $placeHolder = esc_attr__("Start typing ...", 'elessi-theme');
    $classWrap = 'nasa-searchform';
    if ($postType === 'product') {
        $classInput .= ' live-search-input';
        $classWrap = 'nasa-ajaxsearchform';
        $placeHolder = esc_attr__("I'm shopping for ...", 'elessi-theme');
    }
    ?>
    
    <div class="search-wrapper <?php echo esc_attr($classWrap); ?>-container <?php echo esc_attr($_id); ?>_container">
        <?php if ( function_exists( 'aws_get_search_form' ) ) { aws_get_search_form(); } ?>
    </div>
    Thread Starter OpenTips

    (@sergeiweb)

    Yes! Now it’s working perfectly!

    Thank you so much for your help!

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Nothing found on mobile version’ is closed to new replies.