Your account expired support, please renew to get your support.

HomePage Forums Themes Support Freshio – Organic & Food Store WordPress Theme Header search bar shows hidden products

Viewing 15 posts - 16 through 30 (of 30 total)
  • Author
    Posts
  • #3556

    Hi,

    Please try to follow documment plugin: https://docs.villatheme.com/woocommerce-free-shipping-bar/

    #3569
    kirbyandlewis
    Support Expired

    It was working fine until you fixed the search bar so I can only presume it’s something you’ve done which now stops it from showing, no matter what settings I put

    #3577

    Hi,

    Delivery bar notice on the bottom of the page: https://prnt.sc/wnv1na

    This bar is immediately hidden when you scroll down. I think this problem is not caused by code customization, but by customizing your plugin. Please contact with the plugin author for assistance with this matter

    #3583
    kirbyandlewis
    Support Expired

    It does not even show up for me, maybe clear your browser cache?

    I have asked the plug-in developers for guidance and they asked for a detailed log of the edits you’ve made.

    I’m also interested to see what was changed as I found three payment methods enabled when they should be disabled with you being the only other user with privileges to change them.

    You were working on a live site.

    #3607

    Hi,

    All my customizations do not affect this plugin’s display of this message. So you should check all plugin settings. I still see this message when check your page, please re-check.

    #9908
    kirbyandlewis
    Support Expired

    This issue has returned after an update.

    #9926

    What issue?

    Please make us clear your issue/

    #9928
    kirbyandlewis
    Support Expired

    Products that have visibilty set to ‘hidden’ still show up on the dropbox search bar in the header.

    I would still like products that are set to both ‘catalog & search’ & ‘search’ to still show.

    Is this possible? If so, is there a way I can change it myself instead of contacting you guys everytime I update the theme, thank you.

    #9930

    Please send Account full control for me, I need to check your site

    #9939
    kirbyandlewis
    Support Expired
    This reply has been marked as private.
    #9962

    Hi,

    I have just fixed this issue.
    I had to edit the code in your main theme, so it will be lost when you update the theme. So please keep inc/woocommerce/class-woocommerce.php file when you update new theme.

    #9970
    kirbyandlewis
    Support Expired

    Sadly the hidden products still show in the dropdown search results.

    I have cleared the cache both on the website and browser.

    Example: If you search ‘mint’ (without pressing enter), nothing should show in the dropdown search results.

    #9991

    Oh sorry, I fixed again.

    Please save this code when you update theme:

    public function ajax_search_products() {
                global $woocommerce;
    
                $search_keyword = $_REQUEST['query'];
    
                $ordering_args = $woocommerce->query->get_catalog_ordering_args('date', 'desc');
                $suggestions   = array();
    
                $args = array(
                    's'                   => apply_filters('freshio_ajax_search_products_search_query', $search_keyword),
                    'post_type'           => 'product',
                    'post_status'         => 'publish',
                    'ignore_sticky_posts' => 1,
                    'orderby'             => $ordering_args['orderby'],
                    'order'               => $ordering_args['order'],
                    'posts_per_page'      => apply_filters('freshio_ajax_search_products_posts_per_page', 8),
                );
    			
    			
    			$args['meta_query'] = array(
    				array(
    					'key'       => '_stock_status',
    					'value'     => 'instock',
    					'compare'   => '=',
    				)
    			);
    			
    			$args['tax_query']  =  array(
    				array(
    					'taxonomy'  => 'product_visibility',
    					'terms'     => array('exclude-from-catalog'),
    					'field'     => 'name',
    					'operator'  => 'NOT IN',
    				),
    			);
                $products = get_posts($args);
    
                if (!empty($products)) {
                    foreach ($products as $post) {
                        $product       = wc_get_product($post);
                        $product_image = wp_get_attachment_image_src(get_post_thumbnail_id($product->get_id()));
    
                        $suggestions[] = apply_filters('freshio_suggestion', array(
                            'id'    => $product->get_id(),
                            'value' => strip_tags($product->get_title()),
                            'url'   => $product->get_permalink(),
                            'img'   => esc_url($product_image[0]),
                            'price' => $product->get_price_html(),
                        ), $product);
                    }
                } else {
                    $suggestions[] = array(
                        'id'    => -1,
                        'value' => __('No results', 'freshio'),
                        'url'   => '',
                    );
                }
                wp_reset_postdata();
    
                echo json_encode($suggestions);
                die();
            }

    file inc/woocommerce/class-woocommerce.php

    #10009
    kirbyandlewis
    Support Expired

    GREAT! Thank you so much. Will do 🙂

    #10038

    Ok, let me know if you need to help.

Viewing 15 posts - 16 through 30 (of 30 total)

You must be logged in to reply to this topic.