HomePage › Forums › Themes Support › Freshio – Organic & Food Store WordPress Theme › Header search bar shows hidden products
- This topic has 29 replies, 2 voices, and was last updated 2 years, 11 months ago by Billy Nguyen.
-
AuthorPosts
-
January 14, 2021 at 5:40 pm #3556
Hi,
Please try to follow documment plugin: https://docs.villatheme.com/woocommerce-free-shipping-bar/
January 14, 2021 at 11:25 pm #3569kirbyandlewisSupport ExpiredIt 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
January 15, 2021 at 9:13 am #3577Hi,
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
January 15, 2021 at 10:13 am #3583kirbyandlewisSupport ExpiredIt 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.
January 16, 2021 at 8:43 am #3607Hi,
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.
May 19, 2021 at 1:33 am #9908kirbyandlewisSupport ExpiredThis issue has returned after an update.
May 19, 2021 at 3:23 pm #9926What issue?
Please make us clear your issue/
May 19, 2021 at 3:31 pm #9928kirbyandlewisSupport ExpiredProducts 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.
May 19, 2021 at 4:36 pm #9930Please send Account full control for me, I need to check your site
May 19, 2021 at 11:51 pm #9939kirbyandlewisSupport ExpiredThis reply has been marked as private.May 20, 2021 at 5:36 pm #9962Hi,
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.May 20, 2021 at 8:42 pm #9970kirbyandlewisSupport ExpiredSadly 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.
May 21, 2021 at 3:59 pm #9991Oh 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
May 21, 2021 at 10:24 pm #10009kirbyandlewisSupport ExpiredGREAT! Thank you so much. Will do 🙂
May 24, 2021 at 10:32 am #10038Ok, let me know if you need to help.
-
AuthorPosts
You must be logged in to reply to this topic.