• Resolved calyweb

    (@calyweb)


    Hi,

    I have the pro version, i sent you an email but i never had a reply

    I have a question for the equivalence, how can i put as equivalent ” KG” (with space) and “KG” (without), for example when the user search for “8 KG” i have the results, but if he search “8KG” i don’t have

    Thanks for your feedback

Viewing 1 replies (of 1 total)
  • Plugin Author ILLID

    (@mihail-barinov)

    Hi,

    Please use following code snippet:

    add_filter( 'aws_search_terms', 'aws_search_terms' ); 
    function aws_search_terms( $terms ) { 
        if ( $terms ) { 
            foreach ($terms as $term) { 
                preg_match_all('/([0-9]+|[a-zA-Z]+)/',$term,$matches); 
                if ( ! empty( $matches ) ) { 
                    $terms = array_merge( $terms, $matches[0] ); 
                } 
            } 
        } 
        return $terms; 
    }

    You need to add it somewhere outside the plugins folder. For example, inside functions.php file of your theme or use some plugin for adding code snippets.

    Also, after adding this code you will need to go to the plugin settings page and click the ‘Clear cache’ button.

    Regards

Viewing 1 replies (of 1 total)
  • The topic ‘Equivalence between ” KG” and “KG”’ is closed to new replies.