Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

stop category count


Guest

Recommended Posts

I have tried the search function but to no success.

 

I want to stop the category menu from counting the sub-products in the categories.

 

 

How is this done?

 

Thanks! :P

Link to comment
Share on other sites

I must have an older version or something becasue its not there:

 

My Store

 

Store Name Florida Tickets? 

Store Owner Florida Tickets? 

E-Mail Address [email protected]

E-Mail From Florida Tickets <[email protected]>? 

Country United States? 

Zone Florida? 

Expected Sort Order desc? 

Expected Sort Field date_expected? 

Switch To Default Language Currency false? 

Send Extra Order Emails To? ?

Use Search-Engine Safe URLs (still in development) false? 

Display Cart After Adding Product true? 

Allow Guest To Tell A Friend false? 

Default Search Operator and? 

Store Address and Phone Store Name Address Country Phone

 

 

 

Any idea what file it might be in?

Link to comment
Share on other sites

I did find this contribution but have absolutly no idea where to put the file included.

 

http://www.oscommerce.com/community/contributions,1145

 

 

<?php
/**************************************************************************** 
*  $Id: top_categories.php,v 1.0 2003/04/90 14:34:00 clescuyer Exp $
*
*  Display only top categories
*
*  osCommerce, Open Source E-Commerce Solutions
*  http://www.oscommerce.com/
*
*  Copyright (c) 2003 Go?lette 
*  Christian Lescuyer <[email protected]>
*  http://www.goelette.net/
*  
*  History: 1.0 Creation
*
*  Released under the GNU General Public License
****************************************************************************/

?>
<!-- top_categories //-->
         <tr>
           <td>
<?php
//////////
// Display box heading
//////////
 $info_box_contents = array();
 $info_box_contents[] = array('align' => 'left', 'text'  => BOX_HEADING_CATEGORIES);
 new infoBoxHeading($info_box_contents, true, false);


//////////
// Get categories list
//////////
// Test for presence of status field for compatibility with older versions
 $status = tep_db_num_rows(tep_db_query('describe categories status'));

 $query = "select c.categories_id, cd.categories_name, c.parent_id
           from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd
           where c.categories_id = cd.categories_id
    and c.parent_id=0";
 if ($status >0)
   $query.= " and c.status = '1'";
 $query.= " and cd.language_id='" . $languages_id ."'
           order by sort_order, cd.categories_name";

 $categories_query = tep_db_query($query);

// Build categories string
 $categories_string = '';
 while ($row = tep_db_fetch_array($categories_query))  {
   $categories_string .= '<a href="' . tep_href_link(FILENAME_DEFAULT, 'cPath=' . $row['categories_id']) . '">';
   list($current) = explode('_', $HTTP_GET_VARS['cPath']);
   if ($row['categories_id'] == $current) $categories_string .=  '<b>';
   $categories_string .= $row['categories_name'];
   if ($row['categories_id'] == $current) $categories_string .=  '</b>';
   $categories_string .= '</a>';
   $categories_string .= '<br>';
 }

//////////
// Display box contents
//////////
 $info_box_contents = array();
 $info_box_contents[] = array('align' => 'left', 'text'  => $categories_string);
 new infoBox($info_box_contents);
?>
           </td>
         </tr>
<!-- top_categories_eof //-->

 

 

Anyone have an idea?

Link to comment
Share on other sites

yeh...

 

 

 

erm, it does actually state quite clearly on the contribution page where to extract it to..

 

 

sorry..

 

 

 

*hides in corner in shame*

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...