View Single Post
  #1  
Old 08-02-2006, 04:51 PM
 
lachild lachild is offline
 

Advanced Member
  
Join Date: May 2006
Posts: 92
 

Default Show All Products in Catagory

I know there have been a couple of mods that do this but most of them require alot of hacking the system.

Heres a quick mod to give you a "Show All" link next to your page results.

Quick and painless like.

(Please note this mod is for 4.1.2! i do not know if this will work on older versions as I have never used them)


Instructions:

Locate this section in the init.php around line #329:
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]; } }

Add this right after the closing if statment:

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

Next open up /customer/main/navigation.tpl around line 4 locate:

Code:
{if $total_pages gt 2} <table cellpadding="0"> <tr> <td class="NavigationTitle">{$lng.lbl_result_pages}:</td>

Add this right after the /td:
Code:
{if $smarty.server.PHP_SELF ne '/manufacturers.php' && $smarty.server.PHP_SELF ne '/admin/orders.php && $smarty.server.PHP_SELF ne '/orders.php' } <td><a href="{$navigation_script}&amp;show=all">View All</a> |</td> {/if}

Hope this helps
__________________
Westin Shafer
Come Together Technologies
http://www.ComeTogetherTechnologies.com
Reply With Quote