- Posts: 145
- Thank you received: 6
smart search problem
-- Joomla version -- : 5.1.2
-- PHP version -- : 8.2
I have 2 problems with Joomla smart search:
1- When I search for a product, even though the Search variants option is set to No in the settings of the Search - Hikashop Products plugin, it shows the variants.
2- It also displays the products that are not published in the search results, and because the product is not published, when the user clicks on the search result, it gives a 404 error. If you don't have to display unpublished products in the search results.
results:
Life is the unique stage of our art. Everyone sings their own song and leaves the stage. The stage is always permanent. Blessed is that song that people remember.
Please Log in or Create an account to join the conversation.
1. There is no option "search variants" for the Smart search.
The Smart search uses plugins from the "finder" group, not plugins of the "search" group.
This plugin of the "search" group is for the old search system of Joomla, which has been removed with Joomla 4.
So this is the normal behavior.
2. I am not able to reproduce this behavior on my end. If I unpublish a product from the backend product listing toggle, or by editing the product it works fine.
How are you unpublishing the product ? Are you doing it via the HikaShop interface ? Where exactly ? Is it somehow linked to the products having variants ?
Please Log in or Create an account to join the conversation.
You can also add extra things to display in this function, but you have to be aware of what you're doing and remember that if you reinstall HikaShop, your changes will be lost.
Please Log in or Create an account to join the conversation.
nicolas wrote: 1. There is no option "search variants" for the Smart search.
The Smart search uses plugins from the "finder" group, not plugins of the "search" group.
This plugin of the "search" group is for the old search system of Joomla, which has been removed with Joomla 4.
So this is the normal behavior.
I think it would be better to have an option to exclude variants from the search results.
nicolas wrote: How are you unpublishing the product ? Are you doing it via the HikaShop interface ? Is it somehow linked to the products having variants ?
Yes. The main product has been unpublished by HikaShop interface, but since it has two variant products, it will display the variant product in the search results.
Life is the unique stage of our art. Everyone sings their own song and leaves the stage. The stage is always permanent. Blessed is that song that people remember.
Please Log in or Create an account to join the conversation.
1. Adding an option for this is a possibility, yes. Thanks for your feedback.
2. Ok, now I understand the problem. It's the variants of the unpublished product which are displayed in the search results, not the product itself. I was able to reproduce the issue on my end and made a patch for it. Download again the install package of HikaShop on our website and install it on yours and you'll have the patch. Note that it won't change anything for already unpublished products. You would have to reindex them, or publish/unpublish them.
Please Log in or Create an account to join the conversation.