• Resolved SyCe

    (@syce)


    Dear Support, in my last ticket you guys helped me so much to overwrite my theme search with wonderful ajax search from fibo. But after latest updates, the search form won’t load anymore. i use the same code since last ticket:

    add_action( 'wp_footer', function() { ?>
    	<script type="text/javascript">
    		jQuery(document).ready(function($){
    			$('body').on('click', '.show-search', function(e){
    				if ($(window).width() < 1199) {
    					e.preventDefault();
    					$('.dgwt-wcas-enable-mobile-form').click();
    				}
    			});
    
    		});
    		jQuery( document ).on( 'fibosearch/hide-mobile-overlay', () => {
    			$('.search-device').removeClass('open');
    		});
    	</script>
    	<style type="text/css">
    		.tbay-search-form {
    			display: none !important;
    		}
    	</style>
    <?php }, 9999 );

    i hope you guys can help me ??

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Support Kris

    (@c0nst)

    Hi @syce!

    Please replace your code with the one below and let me know if that fixed the problem.

    add_action( 'wp_footer', function() { ?>
    <script type="text/javascript">
    jQuery(document).ready(function($){
    $('body').on('click', '.show-search', function(e){
    if ($(window).width() < 1199) {
    e.preventDefault();
    $('.js-dgwt-wcas-enable-mobile-form').trigger('click');
    }
    });
    });

    jQuery(document).on( 'fibosearch/hide-mobile-overlay', () => {
    $('.search-device').removeClass('open');
    });
    </script>
    <style type="text/css">
    .tbay-search-form {
    display: none !important;
    }
    </style>
    <?php }, 9999 );

    Best regards,
    Kris

    Thread Starter SyCe

    (@syce)

    Hi Kris,

    thanks for ur fast answer. But the posted code dont work ?? Problem is that the jquery trigger doesnt work..

    Plugin Support Kris

    (@c0nst)

    Hi @syce!

    If you open the browser console on your website (press F12 or right-click -> Inspect), you’ll see multiple JavaScript errors listed in the Console tab (screenshot). These errors seem to be caused by combining all files into one, which can lead to issues when certain functions are unavailable. The last error shown in the screenshot occurs when I click the search icon on mobile; this error seems to result from a missing theme function, likely due to the mentioned JS combination issue. This also means the script I sent you earlier won’t execute due to this error. Try disabling the “combine JS into one file” option in your cache plugin to see if it resolves the issue.

    Best regards,
    Kris

    Thread Starter SyCe

    (@syce)

    Hello! ??
    I find this strange – I’ve completely disabled my caching plugin in all settings and cleared the cache, but it’s still not working. I dont understand this ??

    Hello,

    I have a similar issue in mobile, it is an intermittent issue. Sometimes the search box will show, sometimes in won’t. If I refresh the page ( menu ) it shows.

    Plugin Support Kris

    (@c0nst)

    Hi @syce!

    I’ve rechecked your site on various mobile devices, using both iOS and Android, and tested on Chrome, Firefox, and Safari (on iOS). Each time, the mobile overlay opened correctly, allowing me to search for a product and view the search results page with the expected results. Unfortunately, I haven’t been able to reproduce the issue, which limits my ability to investigate further.

    I still did notice a few errors in the console that could potentially contribute to this problem. Could you resolve these errors and see if that addresses the search issue?

    Best regards,
    Kris

Viewing 6 replies - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.