Some Smart Search Issues

  • Posts: 177
  • Thank you received: 69
  • Hikashop Business
2 weeks 6 days ago #309437

-- HikaShop version -- : 4.2.1
-- Joomla version -- : 3.9.10

Hi,

we're trying out the awesome new smart search feature in 4.2.1, some problems/remarks so far:

1. When we try to delete an indexed product from the list in the back-end, we get the error "Call to undefined function hikashop_get()", though the product does get removed from the index.

2. On the front-end search results, all the url's point to the same product directory, and not to the correct menu/category which the product actually belongs to.

3. If a product is in multiple Hikashop categories/menus, it will show up multiple times on the results. For example, a product in 4 categories will display 4 times in the results, but all with identical url's (as mentioned in point 2) - not pointing to each specific category. Although it would be possible to unpublish the duplicates in the back-end smart search index, this is not really an option for thousands of products. Also regarding point 2, would it be possible to point to the canonical url?

4. The search results on the front-end are only plain text, which makes it less useful for users since they can't see what the product looks like. It would be a great improvement if product images can also be shown, or at least loaded with the smart search results, similar to the product images being loaded when using the "normal" joomla search.

Thanks for looking into it.

Please Log in or Create an account to join the conversation.

  • Posts: 66619
  • Thank you received: 9806
  • MODERATOR
2 weeks 4 days ago #309483

Hi,

Thank you for your feedbacks.

1. I don't get that error on my end. Could you activate the "debug mode" and "error reporting" on your Joomla configuration and try again ? You should get an error message with more information on the situation. That will help us understand where the problem comes from.

2. Again, I don't have that issue on my end. In that case, I'm afraid we'll need a backend and FTP access to debug the situation. Would that be possible ?

3. We should probably be able to improve on that and support the canonical URL. Regarding the multiple products, I'm not sure yet on what we can / want to do. I would have to study the situation more in depth. This version is a first version which is meant to test the waters.

4. I don't see how we could change that. I didn't see anywhere the mention of the possibility to have images support for smart search itself, let alone the possibility to add it to an integration plugin.
From what I understand, the default system doesn't support images unless you add some hacks to Joomla:
www.akashchakrawarti.com/images-in-search-results-joomla/

Please Log in or Create an account to join the conversation.

  • Posts: 177
  • Thank you received: 69
  • Hikashop Business
2 weeks 4 days ago #309492

Hi,

thanks for your reply, we fully understand the smart search is still in its infancy and we don't mind testing it out. Regarding the above points:

1. Error reporting indicates the error is on line 172 of plugins\finder\hikashop\hikashop.php, with following call stack:

1  ()  JROOT\plugins\finder\hikashop\hikashop.php:172
2  plgFinderHikashop->getUrl()  JROOT\administrator\components\com_finder\helpers\indexer\adapter.php:348
3  FinderIndexerAdapter->remove()  JROOT\plugins\finder\hikashop\hikashop.php:49
4  plgFinderHikashop->onFinderAfterDelete()  JROOT\libraries\joomla\event\event.php:70 
If we add
include_once(rtrim(JPATH_ADMINISTRATOR,DS).DS.'components'.DS.'com_hikashop'.DS.'helpers'.DS.'helper.php');
right before line 172, the error is gone when deleting an indexed item and all is well.

2. We're just testing on localhost so unfortunately can't give you FTP access at the moment, but we'll continue to investigate. Inspecting the database we can see our indexed url's do contain the correct category_pathway corresponding with the correct hikashop category, however every single product has the same Itemid in the url (in our case &Itemid=123) corresponding to one of our menu items. This causes every search result on the front-end having this menu in the link, also for products which are in no way related to that menu at all.

Since there aren't really any settings for the smart search, we have no idea yet why this particular (and seemingly random) Itemid is added to every indexed url.

3. Ok great, thanks.

4. We don't necessarily mean indexing product images or anything as complicated as that, but we've found a solution due to the flexibility of view overrides. By largely copying the code from the normal hikashop search plugin to get the product images for search results and adding this in an override of the smart search default_results.php, plus creating a specific view for default_product.php to add the necessary html to display the image with the text, this works fine and issue solved.

Please Log in or Create an account to join the conversation.

  • Posts: 66619
  • Thank you received: 9806
  • MODERATOR
2 weeks 2 days ago #309579

Hi,

1. I've added a patch in that sense.

2. That's normal that the itemid is the same for all the products.
The index is done in the backend. There is no information for HikaShop to know which itemid to use.
a product can be displayed from different menu items and there is no way to link a menu item and a product.
So as you can see in the code of the getUrl fonction, we can the function getPublicMenuItemId of class.menu which gives back the first public products/category listing menu item it finds.
The alternative to that would be to use the canonical URL when available. I've actually noted that on our todo list as a high priority.

4. Yes, with view overrides of the Joomla finder that's indeed possible to do it.

The following user(s) said Thank You: GW

Please Log in or Create an account to join the conversation.

Time to create page: 0.058 seconds
Powered by Kunena Forum