Trademark symbol problems

This topic contains 3 replies, has 2 voices, and was last updated by Ernest Marcinko Ernest Marcinko 4 years, 2 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #25852
    billium99
    billium99
    Participant

    Hello – we get our product listings and product titles from a 3rd party API and drop them into WooCommerce. Your index appears to be indexing the trademark icon, so that when customers invariably do NOT search with the trademark, the exact match is unlikely to appear. For example – we have many items with the first name “Cataplex” such as Cataplex A, Cataplex E, Cataplex F, etc.

    If someone searches for cataplex® f then the searfch results will find Cataplex F Tablets correctly, but if I search cataplex f without the trademark symbol, this product cannot be found. Is there a way for me to strip out the trademark symbol in our indexed results?

    Attachments:
    You must be logged in to view attached files.
    #25867
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    Well it should be possible via a custom code, which hooks to the extraction process, and removes the unwanted character. I have quickly constructed something that may work. After applying the code, you will have to re-create the index for it to work.

    Try adding this custom code to the functions.php in your theme/child theme directory. Before editing, please make sure to have a full site back-up just in case!

    add_filter( 'asp_indexing_string_pre_process', 'asp_remove_addition_chars_index', 10, 1 );
    function asp_remove_addition_chars_index($str) {
    	return str_replace('®', '', $str);
    }
    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #25888
    billium99
    billium99
    Participant

    In fact, doing this pushed one of the two needed results further down the list.

    So again, searching “cataplex f” used to find only Cataplex F Soft Gels and then all sorts of other cataplex variations. Now that same search puts Cataplex F Soft Gels in the 8th position.

    Any other suggestions?

    #25892
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Can you please try this logic configuration: https://i.imgur.com/iD7ifNV.png
    By default the “f” in “cataplex f” is ignored in fuzzy matching, because the keyword lenght is 2. Changing that configuration should very likely bump those results to the top.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.