Search Feature Questions

  • Posts: 800
  • Thank you received: 10
  • Hikashop Business
1 month 1 week ago #321679

1) When a user search and there are no results, they get this message: "No Products Found". Can it also display the keywords that they entered in the search? For example, if they searched for Nike Cap, and there is none, can the message say "No Products Found for Nike Cap".

2) Also, is it possible to display some random products, if nothing is found, and it could say something like "You may be interested in".
Please see attached.



Thanks!

Attachments:

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

  • Posts: 70194
  • Thank you received: 10508
  • MODERATOR
1 month 6 days ago #321693

Hi,

1. The listing of products has no knowledge of what filter has been used for the search. You might only have one input field for a text-based search, or you might have 20 filters with dropdowns etc.
So there is no way to easily do that. That would require some custom PHP coding in an override of the view product / listing.php

2. That's possible with a view override. Where the message is displayed in product / listing.php you could add a Modules Anywhere ( www.regularlabs.com/extensions/modulesanywhere ) tag to load a HikaShop content module configured to display random products.
It's on this line:

echo '<div class="hk-well hika_no_products"><i class="fa fa-search"></i> ' . JText::_('HIKASHOP_NO_RESULT') . '</div>';

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

  • Posts: 800
  • Thank you received: 10
  • Hikashop Business
1 week 5 days ago #322427

Hi Nicolas,

I tried what you suggested and it works nicely, except the module Title Is not showing and I can't figure out why. The title is meant to show the part that says "You May Be Interested In These...".

If I put the module in another position on the site the title shows.

echo '<div class="hk-well hika_no_products"><i class="fa fa-search"></i> ' . JText::_('HIKASHOP_NO_RESULT') . '</div>' . '{module 102:You May Be Interested In These Items}';

Thanks!

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

  • Posts: 70194
  • Thank you received: 10508
  • MODERATOR
1 week 5 days ago #322438

Hi,

Well, that's something you should ask Modules Anywhere, not us.
Also, if you check their documentation, they have a specific section about displaying the title of the module with an extra parameter in the tag:
www.regularlabs.com/extensions/modulesan...s-show-or-hide-title

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

  • Posts: 800
  • Thank you received: 10
  • Hikashop Business
1 week 5 days ago #322453

OK Thanks. I just wasn't sure if it was a Hikashop issue or a Modules Anywhere issue.

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

Time to create page: 0.070 seconds
Powered by Kunena Forum