Search results limit doesn't work

Ecommerce design Joomla template to start your online business with VirtueMart and additional eshop features.
GK User
Sat Jun 04, 2011 11:28 am
Hi
Search results limit doesn't work. I even tried it in your demo.
Say we have 30 search results and we want to limit them to 10, or 30 and we want to see them all. Selecting 10 or 30 or all, from the LimitBox does absolutely nothing.

How can I fix that?

Regard
User avatar
Fresh Boarder

GK User
Tue Jun 07, 2011 7:15 am
Hi again

Nobody else has this problem?
I really doubt it since this is a template override issue.
Please try to limit the search results in the DEMO page of "yourShop" here in gavick.com
Search for the word "this" and after you have the results, try to select 10 from the limit box.
You will see what I mean.

Any reaction would be greatly appreciated

Best Regards
User avatar
Fresh Boarder

GK User
Tue Jun 07, 2011 9:57 am
Hi

I have tested with advanced parameters and works fine.
Naturally you need to set limit on each search plugin.
For example, i set 10 limits results on search content plugin and it only displays 10 results, using advanced parameters and selecting only to search on articles.

I don't think mod_search module have the ability to limit result.

Cheers ;)
User avatar
Platinum Boarder

GK User
Tue Jun 07, 2011 11:15 am
Hi Seichinha

mod_search module has the ability to limit results.

I found out the problem. And I share it here in case someone else needs it.

the code for the limit box is:

Code: Select all
<?php if($this->total > 0) : ?>
   <div class="search_limit">
      <label for="limit">
         <?php echo JText::_( 'Display Num' ); ?>
      </label>
      <?php echo $this->pagination->getLimitBox( ); ?></div>


This code in yourShop template is in the templates override folder html/com_search/search/default_results.php

Now here is the problem!
getLimitbox only works properly within a form.

So moving the code back to default_form.php inside the form (where it initially belongs) did the trick.

It is working now fine. I can limit the results just by selecting the number in the limit box

Regards
User avatar
Fresh Boarder

GK User
Tue Jun 07, 2011 12:48 pm
Thank you.
Much appreciated. ;)
I will check and recommend an update... probably in several last templates. :P

Cheers
User avatar
Platinum Boarder


cron