The filter search is not wokring correctly and not showing all results

  • Posts: 356
  • Thank you received: 7
  • Hikashop Business
4 years 1 month ago #316436

-- HikaShop version -- : 4.2.3
-- Joomla version -- : 3.9
-- PHP version -- : 7.4

Hi

On the link provided there is a filter at the top of the site. This is a search feature. Attached are the settings for this.

There are 2 main issues.

1. If you type in "panels" it doesn't show all the products with panels in them? If you go via the main menu on the site shop->fencing->Panels and Trellis you will see loads of products but the search results only show a few?

2. If you type in a product (or jargon) that the site doesn't have there isn't a no results found message - But also what is more important is that if you now type in "panels" the search doesn't work and seemingly does nothing?

Many thanks.

Attachments:

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

  • Posts: 81515
  • Thank you received: 13068
  • MODERATOR
4 years 1 month ago #316441

Hi,

1. I see 130 results with that search in three result pages. I couldn't find any missing product for the categories I checked.
Please be specific. Note also in the search, the products are not sorted by categories, but by "ordering" as per your menu item screenshot. But that value is for each category. So the results you see is first the ones that are first in each category, then second, etc up until 48 and then they are grouped by category. This leads to the products in the same categories being dispatched among the different result pages. Maybe that's why you thought they are missing ? To avoid that, I would recommend to change the ordering column to "product_name" so the products will be more grouped together per category.

2. That's a good point. We never tested that case and no one reported it so far.
It comes from the fact that you have the "filter" display setting turned off in your menu item and that we added 6 months ago the AJAX refresh of results of a search via the filters system. But when you access the menu item page via the filter module search with a search without results, the view doesn't display the main div of the listing necessary for the refresh but the filter module, knowing it is on the results page still load the results in AJAX, but just can't display them on the page as the area is missing.
To fix that, you can edit the file "listing" of the view "product" via the menu Display>Views and change the code:

$html = ob_get_clean();
if(!empty($html)) {
to:
$html = ob_get_clean();
if(!empty($html) || hikaInput::get()->getVar('hikashop_front_end_main',0)) {
We'll add that change on our end too.

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

  • Posts: 356
  • Thank you received: 7
  • Hikashop Business
4 years 1 month ago #316459

HI Nicolas,

First up, super good support thank you! Fast, reliable and helpful. :)

Yes changing the settings to order by name has made more sense like you said - thanks.

Adding the code does indeed fix the issue - thanks.

Is there a way to get a message saying "No search results" Or similar?

Many thanks

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

  • Posts: 81515
  • Thank you received: 13068
  • MODERATOR
4 years 1 month ago #316461

Hi,

That should be the case by default actually. So I'm not sure why it's not the case on your website.
I'm thinking that either you have some view override or your translation file doesn't have anything for the translation key HIKASHOP_NO_RESULT for some reason.
On my end, with the default Joomla template in English, I do get such message:
monosnap.com/file/qyWad4mXwupzE0ko9kuPM1zF4OoXTm

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

  • Posts: 356
  • Thank you received: 7
  • Hikashop Business
4 years 1 month ago #316526

Hi,

I have checked the language file and the constant is there.

I removed any overrides and still the same issue - nothing.

I have also tried using another template - the is still no message.

Please let me know if there is anything else I can try?

Many thanks

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

  • Posts: 81515
  • Thank you received: 13068
  • MODERATOR
4 years 1 month ago #316529

Hi,

Did you check that the translation key is not empty ?
Try renaming the folder templates/YOUR_TEMPLATE/html/com_hikashop/ via FTP in order to deactivate all the view overrides of your template and see if you still have the issue.

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

  • Posts: 356
  • Thank you received: 7
  • Hikashop Business
4 years 1 month ago #316590

HI Nicolas,

Yes I have tried all that.

Many thanks.

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

  • Posts: 81515
  • Thank you received: 13068
  • MODERATOR
4 years 1 month ago #316592

Hi,

Then I don't know. Could you provide a backend and a FTP access so that we could check on the situation ?
If so, please provide that along with a link to this thread via our contact form and we'll have a look at the situation:
www.hikashop.com/support/contact-us.html

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

Time to create page: 0.068 seconds
Powered by Kunena Forum