• Resolved ar15ss

    (@ar15ss)


    Hello,

    When I search for a specific SKU it populates in the live results.

    When I go to the results page it does not appear and the other products that contain the sku within their content/sku show with out an issue. A lot of people will type their search in and hit enter(submit) on computers with out looking at the live results to click on the product theyre searching for.

    Second how do I get rid of the white box that pops up in the bottom right corner w the live results there ? Those results also exclude the actual sku im looking for.

    Third, ive cleared cache etc and it doesnt seem to display live results at all on the front end, only when im logged in on the admin panel visiting the site etc.

    thank you for help

    • This topic was modified 7 months, 2 weeks ago by ar15ss.

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

Viewing 15 replies - 1 through 15 (of 18 total)
  • Plugin Author Mikko Saari

    (@msaari)

    The white pop up is Relevanssi Live Ajax Search. You have two live searches right now, one from Relevanssi Live Ajax Search and one from your theme. You probably should get rid of one of them.

    Have you set up Relevanssi to index SKUs? It doesn’t happen automatically. You need to add _sku to the list of custom fields indexed and rebuild the index. That should get SKU hits to the results page and to the Live Ajax results.

    Thread Starter ar15ss

    (@ar15ss)

    I already did enable _sku in custom fields w initial setup. Search page still shows just non-sku items.

    I’ll disable flatsome Ajax search so there’s not two boxes popping up.

    Plugin Author Mikko Saari

    (@msaari)

    Ah, it’s Flatsome. Instead of using Relevanssi Live Ajax Search, add this:

    
    function rlv_flatsome_search_function( $query, $args, $defaults ) {
      $args['relevanssi'] = true;
      return get_posts( $args );
    }
    
    add_filter( 'flatsome_ajax_search_function', function() { return 'rlv_flatsome_search_function'; } );

    This makes the Flatsome search use Relevanssi. There are some more Flatsome tips here.

    Does the SKU search work in the Relevanssi admin search (Dashboard > Admin search)? Or if you check a product with the Relevanssi debugger (Settings > Relevanssi > Debugging), does the SKU show up?

    Thread Starter ar15ss

    (@ar15ss)

    do I add that code to the functions.php?

    Plugin Author Mikko Saari

    (@msaari)

    Yes, theme functions.php is a good place for this.

    Thread Starter ar15ss

    (@ar15ss)

    I Was going to ask since _sku had to be added, is there a way to add weight to the results so it populates above products which may include/mention the same SKU in the descriptions ex. a product includes multiple items and one has the sku so it is listed in the description of the product and it seems to be out weighing the product that is the actual SKU

    Plugin Author Mikko Saari

    (@msaari)

    Here are some tips for custom field weighting. The free version of Relevanssi doesn’t have an easy way to boost a specific custom field, but if you don’t use any other custom fields, then every custom field match is a SKU match so the second example that multiplies the value of custom field hits by 10 would suit your needs well.

    Thread Starter ar15ss

    (@ar15ss)

    Nice I tried that. Can you view my site and search r0018 ? The sku populates the item live but if you submit the search results are showing “No products were found matching your selection.”

    Plugin Author Mikko Saari

    (@msaari)

    Nothing found. Does it work with the Relevanssi admin search? Can you please enable the debugging mode in Relevanssi debugging settings?

    Thread Starter ar15ss

    (@ar15ss)

    Ive enabled debugging

    Plugin Author Mikko Saari

    (@msaari)

    Which product is the R0018? I’d need to check that, but as it can’t be found in search, I don’t know what it is ??

    Thread Starter ar15ss

    (@ar15ss)

    is the live search not showing for you? was showing on Firefox desktop but not on safari for me on the front end/user side.

    r0018 –> https://ar15safespace.com/product/radian-talon-ambidextrous-safety-selector/?attribute_pa_color=black

    Plugin Author Mikko Saari

    (@msaari)

    The live search does nothing, no search request fires when I type.

    I see it’s a variation. You need an extra bit of code to index the variation SKUs.

    Thread Starter ar15ss

    (@ar15ss)

    Ok there it goes in results page. Thank you.

    I still am not getting Live results. I have the flatsome live results enabled, disabled the Relevanssi Ajax live and used the code you provided earlier

    Plugin Author Mikko Saari

    (@msaari)

    I don’t know why the live search doesn’t work. It looks like no requests are made, so any code on the backend doesn’t even matter – there’s no request, so backend is not involved at all.

Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘Live search result shows the literal SKU product, doesnt show in result pages’ is closed to new replies.