Problem with search on bilingual site

  • Posts: 9
  • Thank you received: 2
  • Hikashop Business
2 months 21 hours ago #309862

-- url of the page with the problem -- : www.collectcamera.com/nl/producten
-- HikaShop version -- : 4.2.1
-- Joomla version -- : 3.9.11
-- PHP version -- : 7.2.20

Hi Guys,

When searching (standard search) on this website we get different results in different languages.
In the default language everything is fine.
In the alternate language Dutch using Falang, we have several issues:
1. unpublished products and products with zero stock still show in the results.
2. we get funny extra dummy results showing with just a number, no title
3. first part of the product description shows in stead of the title
Any idea where I may be doing something wrong?

BTW: the site is still on Hikashop 4.1 because the new ajax display of the filters and product listing disagrees with my overrides.
I am still working to fix those. Will be done before the weekend

On the test site we have 4.2.1 installed and are testing with the SmartSearch because above issues were still there after the upgrade.
Here we find that Falang does not translate the search results, but that may be functionality that's not yet in the plug-ins.
Can you comment on that?

Thanks very much for your help and opinion.

Cheers,
André

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

  • Posts: 67110
  • Thank you received: 9946
  • MODERATOR
1 month 4 weeks ago #309929

Hi,

1. Standard search is working fine with different languages on my end. We would need more information in the issues and a screenshot of the settings of the HikaShop products search plugin in order to better understand the situation and look into it.

2. The SmartSearch plugin that was developed doesn't support Falang like the standard search plugin do. Looking at the code I think it's possible to do it. We would need to look into it further in the future.

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

  • Posts: 9
  • Thank you received: 2
  • Hikashop Business
1 month 3 weeks ago #310062

Hi Nicolas,

Sorry for late reply.
In the mean time we updated the site to all latest versions.
We had to adapt our overrides for the filter and product listing to allow for the different dynamic display introduced in this version of Hikashop.

Part 1: Standard search
I will give more details about the site in question, hopefully something triggers your mind to put me straight.

There is an older copy of the site available to play with, I created a super user for you to check and try things.
I will send the details through the contact form.

A little background on the site:
This site is for a webshop selling collectors items of photographic equipment - the (sometimes very) old stuff.
Virtual all items are unique, so stock is generally set at 1.
The owner wanted the site to use 2 languages: EN_US and NL_NL.
So there are 3 languages in the site of which the Joomla default (EN_GB) is not used.

The site has been set up as a standard multilingual Joomla site, with the duplicated menu's, etc. and all that.
The Hikashop part has been made multilingual using Falang as that's essentially the only way to go.
Basically everything works correctly, site and product display, multiple level filters, checkout, etc.
Only when searching is when things start to go wrong and I do not understand what goes wrong where.
There are 3 things in this process: Joomla search, Hikashop search plug-in, Falang.

Please humor me and check out the following from the front-end:
Go to: www.collectcamera.com/colcam-test/en-us/
This enters the site in English.
You can browse through the products and filters and switch between languages, there is no problem there.

Now enter the search string: "summicron" and click "Search".
In EN you will get 20 items in the search results, in NL you'll get 30.
The last 2 shown items are dummies, showing just a sequence number, no content.
The extra real items are all "unpublished" products or products with no stock.
You can change language in the search results and see this effect.

Check the top item when the list is in NL and "newest first" => "Leica RE met Summicron...".
This item is unpublished and when clicking it you get an error 404 and get redirected to the home page.

Next try search phrase "leica m8".
This will yield 52 hits in EN and 53 in NL, now the dummy result in NL is not so obvious.
Now select the "Exact phrase" and the results go down to 3 (EN) resp. 4 (NL) and here the dummy is very obvious.
In this selection there are no unpublished products.

I have no explanation for this behaviour and have no idea where to look.
Being a programmer (but not aquainted with PHP and Joomla internals) I would generally expect a procedure like:
1. Search starts of extracting the relevant sections of the database into a list
2. Hika search plug-in adds the product contents and other selected field ( plug-in options) to this list.
3. Falang plug-in does its magic translating the content items in this list.
4. Search actually goes through the list searching for the keywords, obtaining results and displaying these.

So Falang should not add items to the list, only translate what's already there. I'm puzzled.

Earlier we had an override for the mod_search-default.php
We added a line to the search form to have the exact phrase as default setting at the start.
This worked ok as far as searching wnet, but with this setting we quite often had the titles of search results in NL replaced by the content part of the results, which looked really funny.
So we removed this override.



Part 2: SmartSearch
I understand your situation, this plug-in is brand new and will be improved in the future no doubt.
As the Joomla team will be phasing out the standard search eventually, the SmartSearch is the way to go in the future.
Essentially the Hikashop plug-in already works quit well.
Feeding the results through Falang may or may not be hard, I cannot be a judge on that - insufficient info.

One thing that did catch my eye is that search results (so also in the indexes) duplicate products for each category they are in.
In our case that results to the same item showing up 2 to 4 times in the results.
This is due to the structure we created to organize our products. This closely mimicks how our customers search for items on the site.
An item is "Leica equipment" from the "Leica M series".
At the same time it is in the product group "Lenses" - "Telefocus"
We implemented this through the Products (top menu) and Product Selection (side menu) then drill down using the filters.
Our override suppresses filters when there is no content/selection to show.

With the current implementation these items show up multiple times in the search results of SmartSearch because they are in multiple categories. Even when categories are not enabled for the search.

Thank you for your patience reading through all the above.
I hope you can help pinpoint the area or plug-in that is causing our troubles.

Cheers,
André

Attached are our settings for the standard search plug-in.
The selected fields are:
product_name,product_description,product_code,product_keywords,serial,year,catnumber
All 3 included custom fields are of type "text".

Attachments:

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

  • Posts: 67110
  • Thank you received: 9946
  • MODERATOR
1 month 3 weeks ago #310077

Hi,

1. Thank you for the details. I've added some patch in the HikaShop products search plugin to handle that better.
Please download the install package down below and install it on your website to get the patch in the plugin. Then try again. It should be much better.

File Attachment:

File Name: hikashop_p...8-21.zip
File Size:5 KB


2. It was indeed developed to have the products indexed for each category.
We could avoid that, but then it would be impossible to use the category filtering of the smart search system like we now can do:
monosnap.com/file/bZhFRESQl8dUdsgrMbc8O2NaQNczQS
So maybe an option in the plugin to be able to have both indexing modes could be nice in the future.

Attachments:
Last edit: 1 month 3 weeks ago by nicolas.

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

  • Posts: 9
  • Thank you received: 2
  • Hikashop Business
1 month 3 weeks ago #310081

Thanks Nicolas for the quick fix.
I installed it and it is indeed much better - not there yet 100%, but I'm not complaining. :)

As to the SmartSearch plug-in:
Obviously being able to use the category in a search is extremely valuable in general.
Having the option to either use or not use it will allow different ways of using it like in our website.
So that's definitely a very good thing.

Thank you very much for the effort.
Cheers,
André

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

Time to create page: 0.071 seconds
Powered by Kunena Forum