Search doesn't work when there is nothing returned

  • Posts: 356
  • Thank you received: 7
  • Hikashop Business
7 years 5 months ago #254244

-- url of the page with the problem -- : fancydresshut.com/
-- HikaShop version -- : 2.6.4
-- Joomla version -- : 3.6.4
-- PHP version -- : 5.6
-- Browser(s) name and version -- : any

Hi,

Please use the search on the top right hand corner of the site. If you type in something that will not get any results then a lot of characters just appear on the screen.

For example, type in "mask" and it brings up search results for mask, if you then type in "maskt" as a typo, that should bring 0 results but instead a lot of characters and rubbish appears on the screen.

I have tried tuning SEO off, and selecting different options in the filter module but nothing seems to fix this?

Many thanks.

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

  • Posts: 81513
  • Thank you received: 13068
  • MODERATOR
7 years 5 months ago #254245

Hi,

I think I understand what's going on. Please try adding the code:
if(ob_get_level()>1)
before the line:
echo '<div style="display:none;">'.
in the file administrator/components/com_hikashop/helpers/cart.php

The following user(s) said Thank You: grayt7

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

  • Posts: 356
  • Thank you received: 7
  • Hikashop Business
7 years 5 months ago #254641

Hi thanks for the fix.

However, I don't seem to get a "No Results Message" I've searched the forum and checked the suggested code

}elseif(( !$this->module || JRequest::getVar('hikashop_front_end_main',0) ) && (@$_REQUEST=='product' || @$_REQUEST=='product') && (@$_REQUEST=='listing' || @$_REQUEST=='listing') && !empty($this->filters) && count($this->filters)){
	echo JText::_('HIKASHOP_NO_RESULT');
}

Made sure HIKASHOP_NO_RESULT had the correct message etc.

any ideas please?

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

  • Posts: 81513
  • Thank you received: 13068
  • MODERATOR
7 years 5 months ago #254689

Hi,

The code change wasn't to get the "no result found" text on that page, but to fix the issue with the page not displaying at all in such cases.

To get the "no result found" text, you need to add such translation override:
HIKASHOP_NO_RESULT="no result found"

www.hikashop.com/download/languages.html#modify

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

  • Posts: 356
  • Thank you received: 7
  • Hikashop Business
7 years 5 months ago #254720

Hi,

Thanks for getting back to me.

Yeah I did say thanks for the fix and it did fix the issue.

To get the "no result found" text, you need to add such translation override:
HIKASHOP_NO_RESULT="no result found"


Yes like I said in my message:

Made sure HIKASHOP_NO_RESULT had the correct message


So this is still not showing?

Thanks.

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

  • Posts: 81513
  • Thank you received: 13068
  • MODERATOR
7 years 5 months ago #254721

Hi,

Then try removing that bit in the if:

( !$this->module || JRequest::getVar('hikashop_front_end_main',0) ) &&

Last edit: 7 years 5 months ago by nicolas.

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

Time to create page: 0.064 seconds
Powered by Kunena Forum