Home › Forums › WoodMart support forum › How to improve search
How to improve search
- This topic has 12 replies, 4 voices, and was last updated 6 years, 3 months ago by Artem Temos.
-
AuthorPosts
-
August 31, 2018 at 5:50 pm #75099
amaury_santillanParticipantHi guys.
Im looking to improve the search results since Im usig attributes to define countires and cities.
So I would need that the search looks for atributes besides product titles.
Could you please help me?
August 31, 2018 at 7:14 pm #75111
Elise NoromitMemberHello,
Our theme does not influence the search algorithm and results. You will need to customize Woocommerce or find a plugin.
Best Regards
August 31, 2018 at 8:10 pm #75120
newsprinceParticipantamaury_santillan
Follow my guide from the link below.
You can integrate relevansi plugin with ajax search from woodmart.
Relevansi can index attributes, categories everything you want.
So if your store has for example a product Jeans and has attribute blue, you can search blue jeans and Search result will show up of that product
https://xtemos.com/forums/topic/relevansi-plugin-ajax-search-for-everyone/
September 4, 2018 at 12:54 am #75399
amaury_santillanParticipantHi newsprince. Thank you for your advice.
Have you found a way to integrate the results with the theme ajax search. I mean. It do works when i hit enter. But when the orudtc where supposed to be listed on the search nothing is displaying.
Xtemos Staff. I can understand that you cant compromise the theme functionality, but how many users have asked for a little help and you just dont give a peanut.
September 4, 2018 at 6:01 am #75410
Artem TemosKeymasterHello,
We will consider implementing this plugin support in our future updates.
Kind Regards
September 4, 2018 at 7:33 am #75425
newsprinceParticipantamaury_santillan yes you can integrate the search results with ajax by adding a line of code in the following file
Go to:
/wp-content/themes/woodmart/inc/classes/search.php
On line 71
after
$results = new WP_Query( apply_filters( ‘woodmart_ajax_get_results’, $query_args ) );
put that line of code
relevanssi_do_query( $results );
Now the AJAX search form brings the results from relevansi plugin.
September 4, 2018 at 5:03 pm #75516
amaury_santillanParticipantHi newsprince.
I did red your tutorial.
I placed the search.php file in this route (since im using child theme) wp-content/themes/woodmart-child/inc/classes/search.php. Ive tried with capital S on Search too.
And this is how my code looks like:
——Line 71——
$results = new WP_Query( apply_filters( ‘woodmart_ajax_get_results’, $query_args ) ); relevanssi_do_query( $results );relevanssi_do_query( $results );
$suggestions = array();
——Line 76——
It would be displaying search on madrid, alemania, etc since Ive already indexed on relevanssi and they do appear when I hit enter
But it just dont works on ajax search.
Do you know what im doing wrong?
Xtemos guys. Ive paid already three of your licences… Every client or woocommerce user would be looking for this implementation.
September 5, 2018 at 7:50 am #75556
newsprinceParticipantSorry but i didn’t make it work with child theme. I edit the woodmart theme and in every update i paste the code again. Maybe xtemos team know where to put it exactly the search.php in child theme to work properly.
Nonetheless try to put that code on woodmart theme not child theme and you ll see it will work.
September 5, 2018 at 10:44 am #75581
newsprinceParticipantIt’s not working on child theme because woodmart theme defines to include search.php file from main woodmart theme folder
define( ‘WOODMART_CLASSES’, WOODMART_THEMEROOT . ‘/inc/classes’ );
So you can only edit the search.php file inside woodmart theme not child.
Except xtemos have another solution.
September 6, 2018 at 4:51 pm #75851
amaury_santillanParticipantThank you very much newsprince.
I really appreciate your help, it has been really usefull.
XTEMOS GUYS. Is there a way to show the summary on hover?
September 6, 2018 at 6:13 pm #75862
Artem TemosKeymasterHello,
What summery and hover do you mean? If it is not related to search, please, create a separate topic and post your question there including some screenshots.
Regards
September 6, 2018 at 6:30 pm #75867
amaury_santillanParticipantOf course its related to search.
Once you start typing product image is displaying with product name and price.
I would like to diusplay the product summary as it does on other parts of the site.
Attachments:
You must be logged in to view attached files.September 6, 2018 at 6:59 pm #75872
Artem TemosKeymasterSearch AJAX results don’t have so much information as on other parts on the website. They contain image, price and title only. There is no option to display summary there.
-
AuthorPosts
- You must be logged in to create new topics. Login / Register