1

I am running Magento 1.7 and I am having a problem getting my Advanced Search to show the next/previous buttons of found products. I have look at the following php pages and everything seems oaky.

frontend\default\erglighting\template\catalog/product/list.phtmlMage_Catalog_Block_Product_List

frontend\base\default\template\catalog/product/list/toolbar/toolbar.phtml

Here is the code of the results page:

 ?>
 <div class="page-title">
     <h1><?php echo $this->__('Catalog Advanced Search') ?></h1>
 </div>
 <?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
 <?php if($this->getResultCount()): ?>
    <p class="advanced-search-amount">
         <?php echo $this->helper('catalogsearch')->__('<strong>%d item(s)</strong> were found using the following search criteria', $this->getResultCount()); ?>
     </p>
 <?php else: ?>
     <p class="error-msg"><?php echo $this->helper('catalogsearch')->__('No items were found      using the following search criteria.');?> <a href="<?php echo $this->getFormUrl(); ?>"><?php echo $this->helper('catalogsearch')->__('Modify your search'); ?></a></p>
 <?php endif; ?>

 <div class="advanced-search-summary">
     <?php $searchCriterias=$this->getSearchCriterias(); ?>
         <?php foreach (array('left', 'right') as $side): ?>
             <?php if(@$searchCriterias[$side]): ?>
                 <ul>
                     <?php foreach($searchCriterias[$side] as $criteria): ?>
                         <li><strong><?php echo $this->htmlEscape($this->helper('catalog')->__($criteria['name'])); ?>:</strong> <?php echo $this->htmlEscape($criteria['value']); ?></li>
                <?php endforeach; ?>
            </ul>
        <?php endif; ?>
    <?php endforeach; ?>
<?php if($this->getResultCount()): ?>
    <p>
        <?php echo $this->helper('catalogsearch')->__("Don't see what you're looking for?"); ?>
        <a href="<?php echo $this->getFormUrl(); ?>"><?php echo $this->helper('catalogsearch')->__('Modify your search'); ?></a>
    </p>
<?php endif; ?>
 </div>
 <?php if($this->getResultCount()): ?>
     <?php echo $this->getProductListHtml() ?>
 <?php endif; ?>
 <?php $this->getSearchCriterias(); ?>

I have read this article on this board and no luck still: https://stackoverflow.com/questions/13248461/magento-layered-navigation-on-advanced-search-results

You will notice that there are over 40 products so I should have the nav buttons to navigate between product search results. Here is the site I went to Power Search then selected "ALL" for the Wattage and click Continue and notice with all 44 products and no controls to browse the results.

Can some one please tell what the problem is and why this will not let me whow

Frank G.

2

I would say that the toolbar is not being loaded at all on the search results pages. Enabling template path hints will let you check to see if the block is being outputted to the page.

If it isn't being outputted you will want to check your theme xml and list.phtml files.

Assuming your results pages use the same template as your category pages (standard), the file YOURTHEME/template/catalog/product/list.phtml should have the following line in it:

<?php echo $this->getToolbarHtml() ?>

If it does have this line you will need to check your theme xml files to see if the block has been removed catalogsearch.xml, or overwritten in the theme's local.xml

| improve this answer | |
  • I have Template Path hints enabled now. You can see the here webstertoolbox.com/index.php/catalogsearch/advanced/result/… The toolbar hint is there by blank. What do you think I will leave it on so you can see. – Frank G. Aug 8 '13 at 4:20
  • I looked in the list.phtml and I found this line in it <?php echo $this->getToolbarHtml() ?> – Frank G. Aug 8 '13 at 4:25
  • I got it working... it was my catalog.xml file. The code in there was wrong. Thank you very much!! – Frank G. Aug 8 '13 at 4:37
  • No problem glad you could fix it – Jasuten Aug 8 '13 at 4:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.