3rd party Predictive Search Integration - by GRVTY Ltd

This topic has 2 replies, 2 voices, and was last updated 6 years, 5 months ago ago by Olga Barlow

  • Avatar: GRVTY Ltd
    GRVTY Ltd
    Participant
    November 16, 2017 at 11:35

    Hi
    Im working on a site for a client who had on a previous theme the 3rd party plugin woocommerce predictive search pro, by A3REV.
    I would like to integrate this into this theme as the main function of the search field is for users to enter product codes from other suppliers that then match the clients products.

    The suppliers codes are an attribute and part of the Yoast focus keywords, so a user will search for egger f1488, and be shown all products that match that code.

    I have a child theme setup and a copy of the header.php, I have been trying to swap out what i think is the right code but I haven’t got it to work.

    Could you help please.

    The code to add from the 3rd party is:

    <?php
    $ps_echo = true ; 
    if ( function_exists( 'woo_predictive_search_widget' ) ) woo_predictive_search_widget( $ps_echo ); 
    ?>

    In the x-store header.php the code i think it needs to replace is this:

    <?php if(etheme_get_option('search_form')): ?>
    					<?php etheme_search_form( array(
    						'action' => 'default'
    					)); ?>
    				<?php endif; ?>

    Its not crashing the site, but its not working either.

    Please, contact administrator
    for this information.
    1 Answer
    Avatar: Olga Barlow
    Olga Barlow
    Support staff
    November 16, 2017 at 14:57

    Hello,

    If you want to replace the search for header type that you use at present you need to copy xstore/headers/advanced.php into child theme and replace

    <?php etheme_search_form( array(
                                    'action' => 'default'
                                )); ?>

    Regards

  • Viewing 2 results - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.Log in/Sign up

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.