Sorry, no results found - try a different search..

  • Posts: 82867
  • Thank you received: 13374
  • MODERATOR
9 years 6 months ago #201241

So do you have that code now in the listing view file ?
If not, it means that you have a view override of the listing view file as I explained previously and you would have to remove the override in order to get that code.

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

  • Posts: 17
  • Thank you received: 0
9 years 6 months ago #201277

Yes that code is in the view listing file as below:


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

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

  • Posts: 82867
  • Thank you received: 13374
  • MODERATOR
9 years 6 months ago #201341

Then it should definitely work as it does on my end.

If you change the code:
echo JText::_('HIKASHOP_NO_RESULT');
to:
echo 'no resutls';

in that code, do you see the message ?

If yes, then it indicates a problem with your translation override.
If no, then there is something else that we can't reproduce and we would have to look at your backend in order to check the issue and would thus need a backend access.

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

  • Posts: 17
  • Thank you received: 0
9 years 6 months ago #201349

If I change the code then the message changes to 'no result' but still only when the 'product listing'menu is selected with a non existent product in the filter.
The message still does not appear when the filter button is used or when the auto update is chosen after the filter field is updated.

I will pm the backend login details for you.

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

  • Posts: 12953
  • Thank you received: 1778
9 years 6 months ago #201354

Hello,

I will pm the backend login details for you.

You can send it to me through a Private Message so that I can directly check it for you :).
Thanks.

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

  • Posts: 12953
  • Thank you received: 1778
9 years 6 months ago #201506

Hello,
Your issue was coming from the IF condition, I just changed it to :

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

The following user(s) said Thank You: Mcconnell

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

  • Posts: 17
  • Thank you received: 0
9 years 6 months ago #201796

That's fixed it. Thankyou for your great support!

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

  • Posts: 1119
  • Thank you received: 114
8 years 9 months ago #229154

Hi,

So I am trying to have some message too if no results. I use module filter and I do have this code in my listing file:

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

But text won't show up. Only if I change it to this ( as per @lousyfool post ) works:
}else {
    echo JText::_('HIKASHOP_NO_RESULT');
    }

I also tried Mohamed code but still no luck....

After reading Nicolas post that that condition is necessary I thought I should do like it needs by default for Hikashop.

What could be the problem?

Thanks

Last edit: 8 years 9 months ago by kyratn.

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

  • Posts: 82867
  • Thank you received: 13374
  • MODERATOR
8 years 9 months ago #229169

Hi,

The code suppose that the filters are displayed at the top of the listing. So that's probably why since you're using the module on the side.
If the simple if works for you, then that's fine.

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

  • Posts: 1119
  • Thank you received: 114
8 years 9 months ago #229326

Hi,

So after using it for 1 day I found that I get message no results in product page if there is no related products. So I need to get it work...
I have used this code:

}else {
    echo JText::_('HIKASHOP_NO_RESULT');
    }

instead of this which doesn't work for me:
}elseif(( !$this->module || JRequest::getVar('hikashop_front_end_main',0) ) && (@$_GET=='product' || @$_GET=='product') && (@$_GET=='listing' || @$_GET=='listing') && !empty($this->filters) && count($this->filters)){
 echo JText::_('HIKASHOP_NO_RESULT');

Would appreciate for any help.

Thanks

Last edit: 8 years 9 months ago by kyratn.

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

  • Posts: 12953
  • Thank you received: 1778
8 years 9 months ago #229364

Hello,
you should use that code instead :

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

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

  • Posts: 1119
  • Thank you received: 114
8 years 9 months ago #229446

Hi,

Well this code doesn't work too.

Any other suggestions?

Thanks

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

  • Posts: 12953
  • Thank you received: 1778
8 years 9 months ago #229449

Hello,
We can't reproduce your issue so the only solution will be to :
- Give us detailed information on how to reproduce your issue through your website
- Give us a temporary back-end/FTP access

Note that you can send your access through our contact form, please don't forget to specify that thread in your message :
www.hikashop.com/support/contact-us.html

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

  • Posts: 1119
  • Thank you received: 114
8 years 9 months ago #229565

Hi,

Details have been sent.

Thanks

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

  • Posts: 12953
  • Thank you received: 1778
8 years 9 months ago #229580

Hello,
My bad, I thought that your issue was coming from the "No result" error message which wasn't correctly displaying through your product listing, but it's actually coming from your related product module on your "product page".
Can you give me a link to the page of a product which have that issue ?

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

  • Posts: 1119
  • Thank you received: 114
8 years 9 months ago #229611

Hi,

Here is example of product page.

kyra.lt/marskineliai/marskineliai-cute

If you would change code to:

}else { echo JText::_('HIKASHOP_NO_RESULT'); }

It will give no result message on the bottom of the product page.

Regards

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

  • Posts: 12953
  • Thank you received: 1778
8 years 9 months ago #229675

Hello,

Yes but your code isn't right you shouldn't use :

}else { echo JText::_('HIKASHOP_NO_RESULT'); }
And display the "No result" error message for every page but you should filter where you are displaying it :
}elseif(( !$this->module || JRequest::getVar('hikashop_front_end_main',0) ) && (@$_REQUEST['ctrl']=='product' || @$_REQUEST['view']=='product') && (@$_REQUEST['task']=='listing' || @$_REQUEST['layout']=='listing') && !empty($this->filters) && count($this->filters)){
		echo JText::_('HIKASHOP_NO_RESULT');
	}
Also, If that code isn't working for your product listing when you use your filter module, you should probably test it without your code customization on the "Listing" file of the "Product" view of your front-end template via "Hikashop->Display->Views".

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

  • Posts: 1119
  • Thank you received: 114
8 years 9 months ago #229730

Hi,

Yes, code isn't right...
I have tried to remove my listing file customization and have used default hikashop view but still no message...
So what I did for now is:

Added this code to product/listing view

}else {
		
		echo "<div class='custom_alert alert alert-info'>".JText::_('HIKASHOP_NO_RESULT'). '</div>';
    }

and added this css to hide that message on product page

body.view-product div.custom_alert{

display:none!important;

}

It works but strange that default hikashop view isn't working for me...

Thank you Mohamed for your help.

Kind Regards

Last edit: 8 years 9 months ago by kyratn.
The following user(s) said Thank You: Mohamed Thelji

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

  • Posts: 45
  • Thank you received: 1
8 years 9 months ago #229805

Hi Nicolas! I have a problem with message "no results found - try a different search" )
I have HikaShop 2.6.0 and Joomla 3.4.8
I tried to put your code from post #166305 before the line } else if(!empty($this->rows) && !empty($this->categories)) { ... but I can't find it. So, I tried to put the code in file Display>Views>product>listing_div in other places, but whith no results. Message isn't shown at all.
Help me please)

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

  • Posts: 12953
  • Thank you received: 1778
8 years 9 months ago #229829

Hello,
You should probably :

1. Download the last Hikashop version through our website, install it and test it again

2. Check that you correctly have that code through your "listing" file of the "product" view of your front-end template via "Hikashop->Display->Views" :

}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');
}

The following user(s) said Thank You: Displey

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

Time to create page: 0.136 seconds
Powered by Kunena Forum