Take your website
To the next level
Discover our newly launched customization services and elevate your web projects to new heights.
Delegate tasks, save time, and unlock the power of professional WordPress outsourcing.

Okay
  Public Ticket #1411211
Product Search
Closed

Comments

  • ularpiton started the conversation

    How can i change search result for product?

  •  7,092
    Oliver replied

    Hi, sorry for delay we are on the short vacations, can you provide more info what you need to change?

    Please note if you comment on your ticket before we reply, your ticket will be pushed down of the tickets list. 

    Regards, Oliver

  • ularpiton replied

    i am sorry for my english before, you can chect my web www.mallonlineindonesia.com to try this "search result", i want to change to product search for the resul of this search.

  •  7,092
    Oliver replied

    Hi, sorry, without the code changes it's not possible. Here is the code example to add the woo search to the top menu.

    function thegem_child_init_icon() {
        remove_filter('wp_nav_menu_items', 'thegem_menu_item_search', 10);
    }
    add_action('init', 'thegem_child_init_icon');
    function thegem_menu_item_search_1($items, $args){
        ob_start();
        do_action( 'pre_get_product_search_form'  );
        wc_get_template( 'product-searchform.php' );
        $form = apply_filters( 'get_product_search_form', ob_get_clean() );
        if($args->theme_location == 'primary' && thegem_get_option('header_layout') !== 'overlay'){
            $items .= '<li class="menu-item menu-item-search"><a href="#"></a><div class="minisearch">' . $form . '/div></div></li>';
        }
        return $items;
    }
    add_filter('wp_nav_menu_items', 'thegem_menu_item_search_1', 11, 2);

    You need to add this code to functions.php of the child theme.

    but you need to style it via css.

    Please note if you comment on your ticket before we reply, your ticket will be pushed down of the tickets list. 

    Regards, Oliver

  • ularpiton replied

    I've tried to change padding on "inspect element" in chrome and it works. but after I try on style.css still there is no change in the form of this search field.

  •  7,092
    Oliver replied

    Pls. give me link to your site

    Please note if you comment on your ticket before we reply, your ticket will be pushed down of the tickets list. 

    Regards, Oliver

  •  7,092
    Oliver replied

    CSS:

    .minisearch input#woocommerce-product-search-field {
        display: block;
        width: 100%;
        color: #000;
        overflow: visible;
        z-index: 999;
        height: 40px;
        font-size: 14px;
        padding: 0;
        padding-left: 30px;
    }
    .minisearch button {
        width: 40px;
        position: absolute;
        top: 0;
        right: 0;
        height: 42px;
        border: none;
        background-color: transparent;
        font-size: 0;
    }
    form.woocommerce-product-search {
        position: relative;
        overflow: hidden;
    }
    .minisearch button:before {
        content: "\e612";
        display: block;
        font-family: "thegem-icons";
        font-size: 24px;
        font-weight: normal;
        line-height: 40px;
        margin-right: 0;
        padding-right: 0;
        text-align: center;
        vertical-align: top;
        width: 100%;
        height: 43px;
        position: absolute;
        top: 0;
        right: 0;
    }

    Please note if you comment on your ticket before we reply, your ticket will be pushed down of the tickets list. 

    Regards, Oliver

  • ularpiton replied

    there is still no change, i check via mobile it have a different view pic 15.jpg

  •  7,092
    Oliver replied

    You have the html error pls. check now closed div

    Please note if you comment on your ticket before we reply, your ticket will be pushed down of the tickets list. 

    Regards, Oliver