Damian Góra
Forum Replies Created
-
Forum: Plugins
In reply to: [FiboSearch - Ajax Search for WooCommerce] Amp compatibilityHi @abanista
I have good news. We’re going to add basic support for AMP. In the first stage of supporting AMP we plan to add the following features:
1. JavaScript will not work. Only a basic search bar will be displayed, without instant search suggestions
2. The integration will be only for one plugin AMP by AMP Project Contributors.
3. We should add these features in FiboSearch v1.15.0 or v1.16.0.Regards,
DamianForum: Plugins
In reply to: [FiboSearch - Ajax Search for WooCommerce] category bugIf you can’t fix wrong relationships in a
icl_translations
table, try the following code.add_filter( 'dgwt/wcas/multilingual/term', function ( $term, $term_id, $taxonomy, $lang ) { if ( $taxonomy === 'product_cat' ) { $current_lang = apply_filters( 'wpml_current_language', null ); if ( $lang !== $current_lang ) { // Get term without switching language to wrong term language. Force hreflang $term = get_term( $term_id, $taxonomy ); } } return $term; }, 10, 4);
It should force hreflang instead of taking a language code from the WPML
icl_translations
table.You have two ways to add this code to your theme:
1. Open the functions.php in your Child Theme and add the code at the end
2. or install the Code Snippets plugin and apply this code as a snippetLet me know if it helped.
Forum: Plugins
In reply to: [FiboSearch - Ajax Search for WooCommerce] category bugHi @saveatrain,
It’s a public forum. Don’t share any sensitive data here!
I couldn’t recreate your issue on the blank Woo + WPML environment, so I guess this issue is specific.
It seems that your EN category “nursing> Bottles” has set RU translation as a parent “уход> Бутылки”. It’s a wrong relationship, and it requires fixing it in the database.
I recommend contacting WPML support. Maybe they have some tools to check and fix taxonomy relationships.
Hello,
We haven’t created a universal solution so far. Currently, it requires JS + CSS tricks, and code snippets may be different depending on the website.
Currently, we’re not working on this feature, but it must be an element of FiboSearch core features in the future.
Best
DamianForum: Plugins
In reply to: [FiboSearch - Ajax Search for WooCommerce] Order search resultsHi there,
We have a solution for your case. Follow these steps:
1. Make a backup of your website
2. Go to the page https://www.ads-software.com/plugins/ajax-search-for-woocommerce/advanced/
3. Scroll down to the section “PREVIOUS VERSIONS”, select “Development version” and download a zip file
4. Remove your current plugin version and install the development version
5. Apply this custom snippet. This snippet adds an extra score for products with matching SKU.add_filter( 'dgwt/wcas/search_results/product/score', function ( $score, $keyword, $post_id ) { $sku = get_post_meta( $post_id, '_sku', true ); if ( ! empty( $sku ) ) { $split = preg_split( "/[^\p{L}\p{N}]+/u", $sku, - 1, PREG_SPLIT_NO_EMPTY ); if ( ! empty( $split ) ) { foreach ( $split as $term ) { if ( $keyword === $term ) { // Extra points for exact match $score += 50; } } } } return $score; }, 10, 3 );
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 snippetLet me know if it helped.
It’s not easy as you see. This filter gives me correct results only in my environment. I tested it on other devices and you’re right, it doesn’t work. The next attempt seems to solve the problem permanently. I tested it on many devices and it works. Here is complex code, you have to add to your functions.php. Remove old code.
add_filter('dgwt/wcas/scripts/overlay_delay_ms', function($delay){ return 300; }); add_action( 'wp_footer', function () { ?> <script> (function ($) { $(document).on('click', '.mobile-menu .js-dgwt-wcas-enable-mobile-form', function () { $('.ct-close-button')[0].click(); }); })(jQuery); </script> <?php }, 100);
There is a typo in the code I pasted above – “delaay”.
Paste this code and it should work.
add_filter('dgwt/wcas/scripts/overlay_delay_ms', function($delay){ return 300; });
Hi Edward,
To fix this bug try the following steps:
1. Go to this page https://www.ads-software.com/plugins/ajax-search-for-woocommerce/advanced/, scroll down to a “PREVIOUS VERSIONS” section, select “Development version” and click a “Download” button. It’s the beta plugin version v1.13.0.18 you have to install to solve your issue.
2. Make a full backup of your website and install the new version of the plugin you have already downloaded.
3. Apply a custom code you find below. You can do it by adding the code at the end infunctions.php
file in your Child Theme or install the Code Snippets plugin and apply this code as a snippet.add_filter('dgwt/wcas/scripts/overlay_delaay_ms', function($delay){ return 300; });
Let me know if it goes.
Sure! You can hide it via simple CSS code:
.dgwt-wcas-st-breadcrumbs { display: none!important; }
Sure! You can hide it via simple CSS code:
.dgwt-wcas-st-breadcrumbs { display: none!important; }
Forum: Plugins
In reply to: [FiboSearch - Ajax Search for WooCommerce] show in details panel this fields?Hi,
Thank you!There is the possibility to show extra things in the details panel. Unfortunately, it still requires some programming skills. I’ll try to explain how to do it. The snippet below isn’t copy/pase solution. It’s only an open proposition how you can do it yourself.
add_filter( 'dgwt/wcas/suggestion_details/product/html', function ( $html, $product_id ) { /* Step 1 - Get your product categories (base on $product_id) Step 2 - Get values of the custom field you want to display (base on $product_id) Step 3 - Add new data wherever you want in a details panel. Remember we have raw HTML, so you have to use e.g. preg_replace() to inject your HTML inside. $html = preg_replace('your-hook-in-html', 'your-hook-in-html' . 'your-new-data', $html); */ return $html; }, 10, 2 );
To apply your custom code you can 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.Forum: Plugins
In reply to: [FiboSearch - Ajax Search for WooCommerce] SVG and PATH errorsHi,
We’ve never seen this error before. It’s strange because FiboSearch doesn’t add a dynamic value of a viewBox attribute.
Try to switch to the Storefront parent theme and disable all your custom scripts. This will help me determine if it’s related to custom scripts.
Hi,
Sure! You can do it via following filter:
add_filter('dgwt/wcas/search_in_products', '__return_false');
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.Unfortunately, it’s more complicated than adding it to
functions.php
. I mentioned few propositions. The third point requires basic knowledge of theme development.In your case, I recommend contacting your theme authors, because the behavior you need is managed by theme, not by FiboSearch.
Hi,
it depends on your theme. There is no one answer, so I can leave some general tips here:
1. Ask your theme authors what is the best way to achieve it in your theme.
2. Go to Appearance -> Widget and check if your theme has a dedicated widgets area for the product category archive. If yes you can add a widget called “FiboSearch bar”.
3 WooCommerce has a lot of conditional tags you can use in your templates. This way requires coding, but it is the most flexible. There is function
is_product_category()
that returnstrue
when viewing a product category archive. You can use it e.g. in the following way:if ( is_product_category() ) { do_shortcode( '[fibosearch]' ); }