This topic contains 3 replies, has 2 voices, and was last updated by
- April 21, 2020 at 5:35 pm #26833Participant
I’m REALLY struggling to get the search plugin to work! This monring, based on your reply to my last ticket, I managed to redirect the maginfying glss and ‘return’ to re-direct to a search results page. This was good! I figured that having live search for what’s going to be a HUGE database unhelpful so i switched this off.
What’s now happened is that categories don’t appear in the results. If you type ‘Devon’ (which is a category), the search results only include the product. To make matters worse, there are two products tagged ‘Devon’ and the search only returns one!
Trying to figure out what was going on I switched ‘live search’ back on. Now the categories do appear in the live search but it seems that each instance of the category is served up. Taking the the category ‘Devon’ again. If you out this into the search field it appears twice, I guess this is because there are two products in the category ‘Devon’. Two big problems here:
1. At the moment there are only two products in the category ‘Devon’. Eventually there will be 100s. Will this mean that ‘Devon’ will appear in the live search results 100s of times?
2. If you click the top live search result it directs to a page where it says ‘nothing found’! Howevcer, if you click the second one it takes you to a page with the correct reults.
Hmmm … not going well!
Can you help?
MartinApril 22, 2020 at 8:46 am #26838Keymaster
I assume you have the redirection set to the “WooCommerce results page”? The WooCommerce results page is only capable of displaying products as results – so taxonomy archives, posts or any other posts types are automatically removed by the WooCommerce results handler.
If that is not the case, and the search override is enabled, then check:
– if there is any other search plugin active. By default other search plugins have automatic results override, so they will automatically change the results from ajax search pro to their own.
– If there was any modification to the search.php template file. If there is a custom query implemented there, then it is in effect, and not letting the results override to function properly, as it cannot detect this custom query.
1 & 2. No, there is a “Devon” category and a “Devon” product category. On the search settings, you have enabled to return both items from “category” and “product_cat” taxonomy. I think you only want the “product_cat”. Regardless of how many products are tagged with that category, it will appear only once.Best,
If you like my products, don't forget to rate them on codecanyon :)
April 22, 2020 at 8:59 am #26842Participant
Hi Ernest – firstly just to say I really do appreciate your swift and very helpful responses. Sorry to be such a pain!
As it happened. whilst I was trying to figure the answer myself last night I switched from woocomm results page to default results page and that seems to have dealt with my first query.
As to the ‘Devon’ issue. I didn’t realise I had Devon in both post categories and product categories. I think this happened when I was uploading categories via allimport plugin. I couldn’t figure out why the import hadn’t worked when I checked the product categories after the import so I ran the import again. This time it worked. What i didn’t realise is that with the first import I selected ‘categories’ and not ‘product categories’ hence the duplicate. I deleted all the post categories and it lloks to be working fine.
Once again, thanks for you help
MartinApril 22, 2020 at 9:03 am #26843
You must be logged in to reply to this topic.