Kris
Forum Replies Created
-
Forum: Plugins
In reply to: [FiboSearch - Ajax Search for WooCommerce] wcfm store vendorI modified the code. This way i thing would be the best:
<?php // Try to read the author ID and push to query args add_filter( 'dgwt/wcas/search_query/args', function( $args ) { if ( ! empty( $_REQUEST['author'] ) && is_numeric( $_REQUEST['author'] ) ) { $args['author'] = absint( $_REQUEST['author'] ); } return $args; } ); // Exclude all categories from display on vendor archive page add_filter( 'dgwt/wcas/search/product_cat/args', function ( $args ) { $product_cats = get_categories( [ 'hide_empty' => 0,'taxonomy' => 'product_cat', 'fields' => 'ids' ] ); if ( ! empty( $_REQUEST['author'] ) && is_numeric( $_REQUEST['author'] ) && $product_cats ) { $args['exclude'] = $product_cats; } return $args; });
Regards,
KrisForum: Plugins
In reply to: [FiboSearch - Ajax Search for WooCommerce] wcfm store vendorHi, @agenziae20 again!
Please change the code to this to exclude all categories from the vendor page archive, and also please change dgwt/wcas/search_query/args to make sure, that $_REQUEST[‘author’] is false.
// Try to read the author ID and push to query args add_filter( 'dgwt/wcas/search_query/args', function( $args ) { if ( isset( $_REQUEST['author'] ) && 'false' != $_REQUEST['author'] ) { $args['author'] = wp_unslash( $_REQUEST['author'] ); } return $args; } ); // Exclude all categories from display on vendor archive page add_filter( 'dgwt/wcas/search/product_cat/args', function ( $args ) { $product_cats = get_categories( [ 'hide_empty' => 0, 'taxonomy' => 'product_cat', 'fields' => 'ids' ] ); if ( isset( $_REQUEST['author'] ) && 'false' != $_REQUEST['author'] && $product_cats ) { $args['exclude'] = $product_cats; } return $args; });
Regards,
KrisForum: Plugins
In reply to: [FiboSearch - Ajax Search for WooCommerce] wcfm store vendorHi @agenziae20
I have prepared a code snippet for you that allows searching only the vendor’s product on the vendor archive page.
// Check if we are in vendor store page and return author ID function fibosearch_get_product_author() { global $wp_query; if ( ! isset( $wp_query->query['store'] ) || empty ( $wp_query->query['store'] ) ) { return false; } $product_id = isset( $wp_query->posts ) ? $wp_query->posts[0]->ID : false; $author = isset( $product_id ) ? get_post_field( 'post_author', $product_id ) : false; return $author; } // Add author input to FiboSearch add_action( 'dgwt/wcas/form', function () { $author = fibosearch_get_product_author(); if ( ! empty( $author ) ) { printf( '<input type="hidden" name="author" value="%d"/>', esc_attr( $author ) ); } } ); // Pass author ID to FiboSearch params add_filter( 'dgwt/wcas/scripts/custom_params', function ( $params ) { $author = fibosearch_get_product_author(); $params['author'] = $author; return $params; } ); // Try to read the author ID and push to query args add_filter( 'dgwt/wcas/search_query/args', function( $args ) { if ( isset( $_REQUEST['author'] ) && ! empty( $_REQUEST['author'] ) ) { $args['author'] = absint( wp_unslash( $_REQUEST['author'] ) ); } return $args; } );
Before taking any actions, please make a full backup of your website (including the database).
I recommend that you test this code on a test environment, e.g. staging.
Check how to easily create a staging site for WordPress.You have two ways to add this code to your theme:
Open the functions.php in your child theme and add the code at the end.
or install the Code Snippets plugin and apply this code as a snippet.Regards,
KrisForum: Plugins
In reply to: [FiboSearch - Ajax Search for WooCommerce] HTTP ERROR 500 on searchHi again @jonasojczyk!
It seems that an error occurred cause there was not enough PHP memory.
Check your
wp-config.php
file if there is aWP_MEMORY_LIMIT
orWP_MAX_MEMORY_LIMIT
constants. If yes try to increase their values to ‘256M’.If you don’t have these values you can check PHP MEMORY LIMIT by going to WordPress Admin Dashboard -> WooCommerce -> Status. See screenshot: https://prnt.sc/BYVPXi2ycsRC
If they are below
256M
try to define these contents and check again the memory_limit value if that code worked.define( 'WP_MEMORY_LIMIT', '256M' ); define( 'WP_MAX_MEMORY_LIMIT', '256M' );
paste it at the top of the
wp-config.php
file.If that won’t work contact your hosting provider to increase these values.
Regards,
KrisForum: Plugins
In reply to: [FiboSearch - Ajax Search for WooCommerce] wcfm store vendorUnfortunately, the shortcode won’t work. FiboSearch currently doesn’t have the functionality to search in the author’s archive.
Regards,
KrisForum: Plugins
In reply to: [FiboSearch - Ajax Search for WooCommerce] Compatibility with Avada themeHi, @bbaldenberger.
Maybe this will work for you:
// Fix Avada Search Results Page add_filter( 'pre_get_posts', function ( $query ) { if ( is_post_type_archive( 'product' ) && $query->is_search && ! is_admin() ) { $query->set( 'post_type', ['any'] ); } return $query; } );
You have two ways to add this code to your theme:
Open thefunctions.php
in your child theme and add the code at the end.
or install the Code Snippets plugin and apply this code as a snippet.Regards,
KrisForum: Plugins
In reply to: [FiboSearch - Ajax Search for WooCommerce] wcfm store vendorHi @agenziae20
Unfortunately, this is currently not possible. We do not have integration with this plugin.
Regards,
KrisHi @chicho1969!
You can remove the
woocommerce
class from the FiboSearch wrapper to solve this problem.Here is a quick solution:
// Remove woocomemrce class form FiboSearch wrapper add_action( 'wp_footer', function() { ?> <script type="text/javascript"> jQuery('.dgwt-wcas-search-wrapp').removeClass('woocommerce'); </script> <?php }, 9999 );
You have two ways to add this code to your theme:
Open the functions.php in your child theme and add the code at the end.
or install the Code Snippets plugin and apply this code as a snippet.Regards,
KrisForum: Plugins
In reply to: [FiboSearch - Ajax Search for WooCommerce] Some search results missing1. Check if the products that are not in the search results have correct visibility options. Check this screenshot to compare: https://prnt.sc/f22ZUkd-2XP9
2. You are using the old 1.14.0 version. Please update the plugin to the latest version. Remember to make a full copy of the website, including the database!Regards,
KrisHi @adionicio!
Try this CSS snippet:
.site-header-above-section-left.site-header-section.ast-flex.site-header-section-left { width: 125%; } aside.header-widget-area.widget-area.site-header-focus-item { width: 100%; }
The results should be like this: https://prnt.sc/86rAdbUXZj5b
Paste it into Appearance -> Customize -> Additional CSS. If you aren’t familiar with custom CSS, take a look at this video.
Regards,
KrisHi @groky
Try this CSS snippet:
.dgwt-wcas-suggestions-wrapp { max-height: 92% !important; overflow-y: auto !important; }
Paste it into Appearance -> Customize -> Additional CSS. If you aren’t familiar with custom CSS, take a look at this video.`
Regards,
KrisForum: Plugins
In reply to: [FiboSearch - Ajax Search for WooCommerce] Results page not clickableIt seems that you are not using FiboSearch or your website. However, you are using a different plugin. To reach proper support please check the authors again in WordPress Admin Dashboard -> Plugins. They should be listed on the plugin list under your search plugin title.
Regards,
KrisForum: Plugins
In reply to: [FiboSearch - Ajax Search for WooCommerce] HTTP ERROR 500 on searchHi @jonasojczyk
The link is probably inaccessible in public (see what I see: https://prnt.sc/y0kFdBuOfwC2). Please try to send this to another server. Maybe try to change the permission of the link you sent to be visible for me you can use another code-share service like https://paste.ofcode.org/.
Regards,
KrisForum: Plugins
In reply to: [FiboSearch - Ajax Search for WooCommerce] HTTP ERROR 500 on searchThe log file is unable to download. Could you reupload it?
To remove active state from dropdown link use this CSS snippet:
.dgwt-wcas-focused .menu-item-has-children .elementor-item.highlighted { color: var(--e-global-color-text) !important; fill: var(--e-global-color-text) !important; }
Regards,
KrisForum: Plugins
In reply to: [FiboSearch - Ajax Search for WooCommerce] HTTP ERROR 500 on searchHi @jonasojczyk!
As for the previous request to send the contents of the log file. You can do it? The error still exists, but now the page works because the error is not displayed on the front-end, but saved to a log file. Thank you.
For the last request use this CSS:
.dgwt-wcas-focused .elementor-nav-menu--dropdown { display: none !important; }
Regards,
Kris