View Single Post
  #14  
Old 10-26-2008, 07:48 AM
  davidsaldana's Avatar 
davidsaldana davidsaldana is offline
 

Senior Member
  
Join Date: Oct 2005
Posts: 187
 

Default Re: Improved Search Results Pagination

Made a slight adjustment to this mod for version 4.1.11, that some of you might find nice. The following code will add a "show all" as the first button, which will allow customer to view all products, instead of individual pages.

Modified navigation tpl, as stated in the original post. Right after the opening <ul> place the following:
Code:
<li>{if $smarty.server.PHP_SELF ne '/manufacturers.php' && $smarty.server.PHP_SELF ne '/admin/orders.php' && $smarty.server.PHP_SELF ne '/orders.php' } <a href="{$navigation_script}&amp;show=all">View All</a></li> {/if}

Then open init.php and find:
Code:
# # Read config variables from Database # This variables are used inside php scripts, not in smarty templates # $c_result = db_query("SELECT name, value, category FROM $sql_tbl[config] WHERE type != 'separator'"); $config = array(); if ($c_result) { while ($row = db_fetch_row($c_result)) { if (!empty($row[2])) $config[$row[2]][$row[0]] = $row[1]; else $config[$row[0]] = $row[1]; } }

Right after this line, add the following:

Code:
# # Show All Mod By Westin Shafer for Beach Bums Inc. # if ($_GET['show'] == 'all'){ $config['Appearance']['products_per_page'] = 500; }

This code is from another mod here on the forums, but adjusted to fit into phils.
__________________
4.4
Code:
Hello World
Reply With Quote