Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Why arent my subcategories showing on my product listing page?


lindsayanng

Recommended Posts

I have no answers to this. I have another osc installation that is close to the same that has the sub categories working and displaying properly, but clearly there is something in this particular install that is not displaying them properly (or at all actually)

 

here is my index.php page

<?php
/*
 $Id: index.php 1739 2007-12-20 00:52:16Z hpdl $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License

 Modification by . http://www..com/css-oscommerce
*/

 require('includes/application_top.php');

// the following cPath references come from application_top.php
 $category_depth = 'top';
 if (isset($cPath) && tep_not_null($cPath)) {
   $categories_products_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_TO_CATEGORIES . " where categories_id = '" . (int)$current_category_id . "'");
   $cateqories_products = tep_db_fetch_array($categories_products_query);
   if ($cateqories_products['total'] > 0) {
     $category_depth = 'products'; // display products
   } else {
     $category_parent_query = tep_db_query("select count(*) as total from " . TABLE_CATEGORIES . " where parent_id = '" . (int)$current_category_id . "'");
     $category_parent = tep_db_fetch_array($category_parent_query);
     if ($category_parent['total'] > 0) {
       $category_depth = 'nested'; // navigate through the categories
     } else {
       $category_depth = 'products'; // category has no products, but display the 'no products' message
     }
   }
 }

 require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_DEFAULT);
?>
<?php echo $doctype; ?>
<html <?php echo HTML_PARAMS; ?>>
<head>

<?php
/*** Begin Header Tags SEO ***/
//if ( file_exists(DIR_WS_INCLUDES . 'header_tags.php') ) {
//require(DIR_WS_INCLUDES . 'header_tags.php');
//} else {
?>
 <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
 <title>Hug Me Up  Clothing for Kids, Moms, and Toddlers</title>


<?php
//}
/*** End Header Tags SEO ***/
?>

<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
<?php echo $stylesheet; ?>


<?php require(DIR_WS_INCLUDES . 'template-top.php'); ?>


<?php
 if ($category_depth == 'nested') {
   /*** Begin Header Tags SEO ***/
   $category_query = tep_db_query("select cd.categories_name, c.categories_image, cd.categories_htc_title_tag, cd.categories_htc_description from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.categories_id = '" . (int)$current_category_id . "' and cd.categories_id = '" . (int)$current_category_id . "' and cd.language_id = '" . (int)$languages_id . "'");
   /*** end Header Tags SEO ***/
   $category = tep_db_fetch_array($category_query);

 /*** Begin Header Tags SEO ***/ 
?>
<span class="leftfloat"><h1><?php echo $category['categories_htc_title_tag']; ?></h1></span>
<span class="rightfloat"><?php echo tep_image(DIR_WS_IMAGES . $category['categories_image'], $category['categories_name'], HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?>
</span>
<!--<div class="divider-pageheading"></div> -->
<?php if (tep_not_null($category['categories_htc_description'])) { 
   echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?>
<h2><?php echo $category['categories_htc_description']; ?></h2>

         <?php }
 /*** End Header Tags SEO ***/ 

echo tep_draw_separator('pixel_trans.gif', '100%', '10'); 

   if (isset($cPath) && strpos('_', $cPath)) {
// check to see if there are deeper categories within the current category
     $category_links = array_reverse($cPath_array);
     for($i=0, $n=sizeof($category_links); $i<$n; $i++) {
       $categories_query = tep_db_query("select count(*) as total from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$category_links[$i] . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "'");
       $categories = tep_db_fetch_array($categories_query);
       if ($categories['total'] < 1) {
         // do nothing, go through the loop
       } else {
         $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.categories_image, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$category_links[$i] . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' order by sort_order, cd.categories_name");
         break; // we've found the deepest category the customer is in
       }
     }
   } else {
     $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.categories_image, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$current_category_id . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' order by sort_order, cd.categories_name");
   }

   while ($categories = tep_db_fetch_array($categories_query)) { 
     $cPath_new = tep_get_path($categories['categories_id']);  
     echo '                <div class="categorylisting"><a href="' . tep_href_link(FILENAME_DEFAULT, $cPath_new) . '">' . tep_image(DIR_WS_IMAGES . $categories['categories_image'], $categories['categories_name'], SUBCATEGORY_IMAGE_WIDTH, SUBCATEGORY_IMAGE_HEIGHT) . '<br>' . $categories['categories_name'] . '</a></div>' . "\n";   
   }

// needed for the new products module shown below
   $new_products_category_id = $current_category_id;
?>
            <div class="divider">test</div>
             <?php include(DIR_WS_MODULES . FILENAME_NEW_PRODUCTS); 

if (HEADER_TAGS_DISPLAY_SOCIAL_BOOKMARKS == 'true') 
include(DIR_WS_MODULES . 'header_tags_social_bookmarks.php'); 

 } elseif ($category_depth == 'products' || isset($HTTP_GET_VARS['manufacturers_id'])) {
// create column list
   $define_list = array('PRODUCT_LIST_MODEL' => PRODUCT_LIST_MODEL,
                        'PRODUCT_LIST_NAME' => PRODUCT_LIST_NAME,
                        'PRODUCT_LIST_MANUFACTURER' => PRODUCT_LIST_MANUFACTURER,
                        'PRODUCT_LIST_PRICE' => PRODUCT_LIST_PRICE,
                        'PRODUCT_LIST_QUANTITY' => PRODUCT_LIST_QUANTITY,
                        'PRODUCT_LIST_WEIGHT' => PRODUCT_LIST_WEIGHT,
                        'PRODUCT_LIST_IMAGE' => PRODUCT_LIST_IMAGE,
                        'PRODUCT_LIST_BUY_NOW' => PRODUCT_LIST_BUY_NOW);

   asort($define_list);

   $column_list = array();
   reset($define_list);
   while (list($key, $value) = each($define_list)) {
     if ($value > 0) $column_list[] = $key;
   }

   $select_column_list = '';

   for ($i=0, $n=sizeof($column_list); $i<$n; $i++) {
     switch ($column_list[$i]) {
       case 'PRODUCT_LIST_MODEL':
         $select_column_list .= 'p.products_model, ';
         break;
       case 'PRODUCT_LIST_NAME':
         $select_column_list .= 'pd.products_name, pd.products_minidescp,';
         break;
       case 'PRODUCT_LIST_MANUFACTURER':
         $select_column_list .= 'm.manufacturers_name, ';
         break;
       case 'PRODUCT_LIST_QUANTITY':
         $select_column_list .= 'p.products_quantity, ';
         break;
       case 'PRODUCT_LIST_IMAGE':
         $select_column_list .= 'p.products_image, ';
         break;
       case 'PRODUCT_LIST_WEIGHT':
         $select_column_list .= 'p.products_weight, ';
         break;
     }
   }

// show the products of a specified manufacturer
   if (isset($HTTP_GET_VARS['manufacturers_id'])) {
     if (isset($HTTP_GET_VARS['filter_id']) && tep_not_null($HTTP_GET_VARS['filter_id'])) {
// We are asked to show only a specific category
       $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "'";
     } else {
// We show them all
       $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m where p.products_status = '1' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'";
     }
   } else {
// show the products in a given categorie
     if (isset($HTTP_GET_VARS['filter_id']) && tep_not_null($HTTP_GET_VARS['filter_id'])) {
// We are asked to show only specific catgeory
       $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'";
     } else {
// We show them all
       $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'";
     }
   }

   if ( (!isset($HTTP_GET_VARS['sort'])) || (!ereg('^[1-8][ad]$', $HTTP_GET_VARS['sort'])) || (substr($HTTP_GET_VARS['sort'], 0, 1) > sizeof($column_list)) ) {
     for ($i=0, $n=sizeof($column_list); $i<$n; $i++) {
       if ($column_list[$i] == 'PRODUCT_LIST_NAME') {
         $HTTP_GET_VARS['sort'] = $i+1 . 'a';
         $listing_sql .= " order by pd.products_name";
         break;
       }
     }
   } else {
     $sort_col = substr($HTTP_GET_VARS['sort'], 0 , 1);
     $sort_order = substr($HTTP_GET_VARS['sort'], 1);

     switch ($column_list[$sort_col-1]) {
       case 'PRODUCT_LIST_MODEL':
         $listing_sql .= " order by p.products_model " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";
         break;
       case 'PRODUCT_LIST_NAME':
         $listing_sql .= " order by pd.products_name " . ($sort_order == 'd' ? 'desc' : '');
         break;
       case 'PRODUCT_LIST_MANUFACTURER':
         $listing_sql .= " order by m.manufacturers_name " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";
         break;
       case 'PRODUCT_LIST_QUANTITY':
         $listing_sql .= " order by p.products_quantity " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";
         break;
       case 'PRODUCT_LIST_IMAGE':
         $listing_sql .= " order by pd.products_name";
         break;
       case 'PRODUCT_LIST_WEIGHT':
         $listing_sql .= " order by p.products_weight " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";
         break;          
       case 'PRODUCT_LIST_PRICE':
         $listing_sql .= " order by final_price " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";
         break;
     }
   }

   /*** Begin Header Tags SEO ***/
   if (isset($HTTP_GET_VARS['manufacturers_id']))
     $db_query = tep_db_query("select manufacturers_htc_title_tag as htc_title, manufacturers_htc_description as htc_description from " . TABLE_MANUFACTURERS_INFO . " where languages_id = '" . (int)$languages_id . "' and manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'");
   else
     $db_query = tep_db_query("select categories_htc_title_tag as htc_title, categories_htc_description as htc_description from " . TABLE_CATEGORIES_DESCRIPTION . " where categories_id = '" . (int)$current_category_id . "' and language_id = '" . (int)$languages_id . "'");

   $htc = tep_db_fetch_array($db_query);

?>
<!-- BOF SEO HEADER TAGS SEO  -->
   <span class="leftfloat"><h1><?php echo $htc['htc_title']; ?></h1></span>
   <?php /*** End Header Tags SEO ***/ ?>
<!-- EOF SEO HEADER TAGS SEO  -->

<?php

// start original position optional Product List Filter

// end original position optional Product List Filter

// Get the right image for the top-right
   $image = DIR_WS_IMAGES . 'table_background_list.gif';
   if (isset($HTTP_GET_VARS['manufacturers_id'])) {
     $image = tep_db_query("select manufacturers_image from " . TABLE_MANUFACTURERS . " where manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'");
     $image = tep_db_fetch_array($image);
     $image = $image['manufacturers_image'];
   } elseif ($current_category_id) {
     $image = tep_db_query("select categories_image from " . TABLE_CATEGORIES . " where categories_id = '" . (int)$current_category_id . "'");
     $image = tep_db_fetch_array($image);
     $image = $image['categories_image'];
   }

/*** Begin Header Tags SEO ***/ ?>
   <span class="rightfloat">
   <?php echo tep_image(DIR_WS_IMAGES . $image, $htc['htc_title'], HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?>
   </span><div class="divider"></div> 
   <?php if (tep_not_null('<h1>'.$htc['htc_description'].'<h1>')) { 
   	// echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?>
   <h2><?php echo $htc['htc_description']; ?></h2>

   <?php 
   }

/*** End Header Tags SEO ***/ 

// start optional Product List Filter

if (PRODUCT_LIST_FILTER > 0) {
     if (isset($HTTP_GET_VARS['manufacturers_id'])) {
       $filterlist_sql = "select distinct c.categories_id as id, cd.categories_name as name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where p.products_status = '1' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and p2c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' and p.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "' order by cd.categories_name";
     } else {
       $filterlist_sql= "select distinct m.manufacturers_id as id, m.manufacturers_name as name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_MANUFACTURERS . " m where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and p.products_id = p2c.products_id and p2c.categories_id = '" . (int)$current_category_id . "' order by m.manufacturers_name";
     }
     $filterlist_query = tep_db_query($filterlist_sql);
     if (tep_db_num_rows($filterlist_query) > 1) {
       echo '            <div class="right">' . tep_draw_form('filter', FILENAME_DEFAULT, 'get') . TEXT_SHOW . ' ';
       if (isset($HTTP_GET_VARS['manufacturers_id'])) {
         echo tep_draw_hidden_field('manufacturers_id', $HTTP_GET_VARS['manufacturers_id']);
         $options = array(array('id' => '', 'text' => TEXT_ALL_CATEGORIES));
       } else {
         echo tep_draw_hidden_field('cPath', $cPath);
         $options = array(array('id' => '', 'text' => TEXT_ALL_MANUFACTURERS));
       }
     echo tep_draw_hidden_field('sort', $HTTP_GET_VARS['sort']);


       while ($filterlist = tep_db_fetch_array($filterlist_query)) {
         $options[] = array('id' => $filterlist['id'], 'text' => $filterlist['name']);
       }
       echo tep_draw_pull_down_menu('filter_id', $options, (isset($HTTP_GET_VARS['filter_id']) ? $HTTP_GET_VARS['filter_id'] : ''), 'onchange="this.form.submit()"');
       echo tep_hide_session_id() . '</form></div><div class="divider"></div>' . "\n";
     }
   }


// end optional Product List Filter  
echo tep_draw_separator('pixel_trans.gif', '100%', '10');  

include(DIR_WS_MODULES . FILENAME_PRODUCT_LISTING); 

if (HEADER_TAGS_DISPLAY_SOCIAL_BOOKMARKS == 'true') 
	include(DIR_WS_MODULES . 'header_tags_social_bookmarks.php'); 

 } else { 
?>
<!-- DEFAULT PAGE  -->    

<!--<p><?php echo tep_customer_greeting(); ?></p>
<p><?php echo TEXT_MAIN; ?></p>-->




<p><img src="pagegraphics/sometimes.jpg" style="float:left"/><img src="pagegraphics/grasskids.jpg" style="float:left"/>
</p>
<p><img src="pagegraphics/threewords.jpg" style="float:none; padding-left:120px; padding-top:10px;"/></p>
<div id="box1">
<?php
 echo tep_display_banner('dynamic', 'square');
?></div>
<div id="box1">
<?php
 echo tep_display_banner('dynamic', 'square2');
?>
</div>
<div id="box3">
<span class="ourFans">Our fans love us..</span>
     <?php

     // Include WordPress

     define('WP_USE_THEMES', false);

     require('./blog/wp-load.php');

     query_posts($query_string . '&posts_per_page=1&cat=13');

     ?>

     <?php function bdw_get_images() {
                         global $post;

                 // Get the post ID

         $iPostID = $post->ID;


         // Get images for this post

                 $arrImages =& get_children('post_type=attachment&post_mime_type=image&post_parent=' . $iPostID );

                 // If images exist for this page

        if($arrImages) {

           // Get array keys representing attached image numbers

             $arrKeys = array_keys($arrImages);

                     $iNum = $arrKeys[0];

                     $sThumbUrl = wp_get_attachment_thumb_url($iNum);

                     $sImgString = '<a href="' . get_permalink() . '">' .

                                         '<img src="' . $sThumbUrl . '" width="150" height="150" alt="See More Pictures of people loving our clothes!" title="Checkout More of Our Fans wearing our clothes!" />' .

                                     '</a>';

            // Print the image

                     echo $sImgString;

                 }

             }

      ?>

     <?php while (have_posts()): the_post(); ?>

     <?php   bdw_get_images(); ?>

     <?php endwhile; ?>
<br>
<!-- start modal contact -->

 <div id="contactFormContainer">
   <div id="contactForm">
     <div class="loader"> </div>
     <div class="bar"> </div>
     <form name="cform" class="contactForm" action="mail.php" method="post">
<div id="submitPhoto"><input type="hidden" name="MAX_FILE_SIZE" value="100000000" />
  <input type="file" name="file" />We love to see people enjoying our products.  When you send us your pictures of people enjoying our products we will add them to our “Fans” page and you could be featured on our front page!!
<br><br>
Use this form to send us your pictures. Feel free to tell us a little story about the picture as well. </div>
       <div class="input_boxes">
         <p>
           <label for="name">Name</label>
           <span class="name-missing">Please enter your name</span><br />
           <input type="text" value="" id="name" name="name" class="suggestField" />
         </p>
         <p>
           <label for="e-mail">E-mail</label>
           <span class="email-missing">Please enter a valid e-mail</span><br />
           <input type="text" value="" id="e-mail" name="email" class="suggestField" />
         </p>
         <p>
           <label for="message">Message</label>
           <span class="message-missing">Say something!</span><br />
     <textarea cols="29" rows="14" id="message" name="message" class="explaination"></textarea>
         </p>
       </div>
       <input type="submit" onfocus="this.blur()" value="Submit Form" name="submit" class="submit" />
     </form>
   </div>
   <div class="contact"><span class="ourFans1">... and we love them!</span></div>
 </div>
<div id="backgroundPopup"> </div>

<!--end modal -->


</div>
<div id="box2"><?php
 echo tep_display_banner('dynamic', 'square3');
?></div>
<!--<div id="hangclothes"><img src="pagegraphics/sayingsbanner.jpg">

</div>-->

<div id="new_products" style="position:relative;z-index:5;margin-top:190px;"><div id="birdbanner" style="position:absolute;z-index:9;left:100px;" ><img src="pagegraphics/bird_banner.png"></div>
<?php  include(DIR_WS_MODULES . FILENAME_NEW_PRODUCTS); ?>
</div>

<?php
}
require(DIR_WS_INCLUDES . 'template-bottom.php'); ?>

<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); 
?>

 

 

And I have the product listing module right here:

 

<?php
/*
 $Id: product_listing.php 1739 2007-12-20 00:52:16Z hpdl $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License

 Modified by  www..com
*/

 $listing_split = new splitPageResults($listing_sql, MAX_DISPLAY_SEARCH_RESULTS, 'p.products_id');

//  if ( ($listing_split->number_of_rows > 0) && ( (PREV_NEXT_BAR_LOCATION == '1') || (PREV_NEXT_BAR_LOCATION == '3') ) ) {
?>
<div class="divider"><form name="quick_find" action="advanced_search_result.php" method="get">
<?php if(isset($_GET['osCsid'])){ ?><input type="hidden" name="osCsid" value="<?php echo str_replace("osCsid=","",$osid); ?>" /> <?php } ?>
<br>
<input type="text" size="15" style="height:26px; font-size:13px;" value="search a saying" name="keywords" /><input type="submit" value="" style="width:35px; height:35px; border:0px; background:#ffffff url('images/search.jpg') no-repeat; margin:0px; padding:0px; position:relative;  top:0px; cursor:pointer;">
</form></div>
   <span class="leftfloat"><?php echo $listing_split->display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS); ?></span>
   <span class="rightfloat"><span class="smallText"><?php echo TEXT_RESULT_PAGE . ' ' . $listing_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></span></span>
<div class="divider"></div>
<?php
//  }

 $list_box_contents = array();

 for ($col=0, $n=sizeof($column_list); $col<$n; $col++) {
   switch ($column_list[$col]) {
     case 'PRODUCT_LIST_MODEL':
       $lc_text = TABLE_HEADING_MODEL;
       $lc_class = 'pl-headermodel';
       break;
     case 'PRODUCT_LIST_NAME':
       $lc_text = TABLE_HEADING_PRODUCTS;
       $lc_class = 'pl-headername';
       break;
     case 'PRODUCT_LIST_MANUFACTURER':
       $lc_text = TABLE_HEADING_MANUFACTURER;
       $lc_class = 'pl-headermanu';
       break;
     case 'PRODUCT_LIST_PRICE':
       $lc_text = TABLE_HEADING_PRICE;
       $lc_class = 'pl-headerprice';
       break;
     case 'PRODUCT_LIST_QUANTITY':
       $lc_text = TABLE_HEADING_QUANTITY;
       $lc_class = 'pl-headerquantity';
       break;
     case 'PRODUCT_LIST_WEIGHT':
       $lc_text = TABLE_HEADING_WEIGHT;
       $lc_class = 'pl-headerweight';
       break;
     case 'PRODUCT_LIST_IMAGE':
       $lc_text = TABLE_HEADING_IMAGE;
       $lc_class = 'pl-headerimage';
       break;
     case 'PRODUCT_LIST_BUY_NOW':
       $lc_text = TABLE_HEADING_BUY_NOW;
       $lc_class  = 'pl-headerbuynow';
       break;
   }

   if ( ($column_list[$col] != 'PRODUCT_LIST_BUY_NOW') && ($column_list[$col] != 'PRODUCT_LIST_IMAGE') ) {
     $lc_text = tep_create_sort_heading($HTTP_GET_VARS['sort'], $col+1, $lc_text);
   }
// Turns off product_listing headers
//   $list_box_contents[0][] = array('class' => $lc_class,
//                                   'params' => 'class="productListing-heading"',
//                                  'text' => ' ' . $lc_text . ' ');
 }


 if ($listing_split->number_of_rows > 0) {
   $rows = 0;
   $listing_query = tep_db_query($listing_split->sql_query);
   while ($listing = tep_db_fetch_array($listing_query)) {
     $rows++;

     if (($rows/2) == floor($rows/2)) {
       $list_box_contents[] = array('params' => 'class="productlisting-even"');
     } else {
       $list_box_contents[] = array('params' => 'class="productlisting-odd"');
     }

     $cur_row = sizeof($list_box_contents) - 1;

     for ($col=0, $n=sizeof($column_list); $col<$n; $col++) {
       $lc_class = '';

       switch ($column_list[$col]) {
         case 'PRODUCT_LIST_MODEL':
           $lc_class = 'pl-model';
           $lc_text = ' ' . $listing['products_model'] . ' ';
           break;
         case 'PRODUCT_LIST_NAME':
           $lc_class = 'pl-name';
           if (isset($HTTP_GET_VARS['manufacturers_id'])) {
          $lc_text = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'] . '&products_id=' . $listing['products_id']) . '">' . $listing['products_name'] . '</a></div><div class="pl-mini">'. $listing['products_minidescp'];
           } else {
         $lc_text = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . $listing['products_name'] . '</a></div><div class="pl-mini">'. $listing['products_minidescp'];
           }
           break;
         case 'PRODUCT_LIST_MANUFACTURER':
           $lc_class = 'pl-manu';
           $lc_text = ' <a href="' . tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $listing['manufacturers_id']) . '">' . $listing['manufacturers_name'] . '</a> ';
           break;
         case 'PRODUCT_LIST_PRICE':
           $lc_class = 'pl-price';
           if (tep_not_null($listing['specials_new_products_price'])) {
             $lc_text = ' <span class="pl-specialpricestrike">' .  $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</span>  <span class="pl-specialprice">' . $currencies->display_price($listing['specials_new_products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</span> ';
           } else {
             $lc_text = ' ' . $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . ' ';
           }
           break;
         case 'PRODUCT_LIST_QUANTITY':
           $lc_class = 'pl-quantity';
           $lc_text = ' ' . $listing['products_quantity'] . ' ';
           break;
         case 'PRODUCT_LIST_WEIGHT':
           $lc_class = 'pl-weight';
           $lc_text = ' ' . $listing['products_weight'] . ' ';
           break;
         case 'PRODUCT_LIST_IMAGE':
           $lc_class = 'pl-image';
           if (isset($HTTP_GET_VARS['manufacturers_id'])) {
             $lc_text = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'] . '&products_id=' . $listing['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a>';
           } else {
             $lc_text = ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a> ';
           }
           break;
        case 'PRODUCT_LIST_BUY_NOW':
           $lc_align = 'center';
// adds option box           $lc_text = '<form name="cart_quantity" method="post" action="' . tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action')) . 'action=add_product', 'NONSSL'). '"><input type="hidden" name="products_id" value="' . $listing['products_id'] . '"><input type="text" name="cart_quantity" value="1" maxlength="5" size="5">' . tep_image_submit('button_buy_now.png', IMAGE_BUTTON_BUY_NOW) . '</form>';
        $lc_text = '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id']) . '" >' . tep_image_button('button_buy_now.png', IMAGE_BUTTON_BUY_NOW) . '</a> ';
           break;  
           }

       $list_box_contents[$cur_row][] = array('class' => $lc_class,
                                         //     'params' => 'class="productlisting-data"',
                                              'text'  => $lc_text);
     }
   }

   new plistBox($list_box_contents);
 } else {
//   $list_box_contents = array();

//   $list_box_contents[0] = array('params' => 'class="productlisting-odd"');
//   $list_box_contents[0][] = array('params' => 'class="productlisting-data"',
//                                  'text' => TEXT_NO_PRODUCTS);

   new plistBox($list_box_contents);
			echo '<p><div class="pagebox"><p>'.TEXT_NO_PRODUCTS.'</p></div></p>';
 }

 if ( ($listing_split->number_of_rows > 0) && ((PREV_NEXT_BAR_LOCATION == '2') || (PREV_NEXT_BAR_LOCATION == '3')) ) {
?>
<div class="divider"></div> 

   <span class="leftfloat"><?php echo $listing_split->display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS); ?></span>

   <span class="rightfloat"><span class="smalltext"><?php echo TEXT_RESULT_PAGE . ' ' . $listing_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></span></span>
<div class="divider"></div> 
<?php
 }
?>

A great place for newbies to start

Road Map to oscommerce File Structure

DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways!

 

HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you

 

Proud Memeber of the CODE BREAKERS CLUB!!

Link to comment
Share on other sites

Ok wow.. THIS IS THE DEFAULT ACTION OF OSC?? What a mistake!!!!

 

So here's the question.. I found a mod in the contributions section, but it doesn't work..

 

How do I show a parent category, sub categories, and all products within that parent /sub cat on the product_listing page??

A great place for newbies to start

Road Map to oscommerce File Structure

DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways!

 

HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you

 

Proud Memeber of the CODE BREAKERS CLUB!!

Link to comment
Share on other sites

Ok.. yet another update..

 

I have found lots of people WANTING to do this, and plenty who have tried.. I followed tutorials and contribution instructions and I am getting no where..

 

 

here is what I have tried

 

assuming its for an older version..

A great place for newbies to start

Road Map to oscommerce File Structure

DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways!

 

HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you

 

Proud Memeber of the CODE BREAKERS CLUB!!

Link to comment
Share on other sites

I think that osCommerce shows by default on product listing page (when selecting one top level category)

1) All first level subcategories of the top level category

2) All items assigned directly to this top level category

 

I'm sorry, but I didn't understood what your installation is showing and what you want to have

Link to comment
Share on other sites

No.. Oscommerce shows All first level sub categories OR if the parent category has products it ONLY shows the products.. It doesn't show either or..

 

 

What I want to do is..

 

I have this category tree:

 

Babies

Onsies

Tshirts

 

All of the products are in the sub categories and nothing exists in the "babies" category.. What SHOULD happen is, if you click on BABIES, you see all products in Onsies AND Tshirts as well as the links to the sub categories.. Right now it does not pull products from the sub categories to display on parent categories.. It just shows sub cats.

A great place for newbies to start

Road Map to oscommerce File Structure

DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways!

 

HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you

 

Proud Memeber of the CODE BREAKERS CLUB!!

Link to comment
Share on other sites

I dont wnat a button to display all proucts, I want the category to display all of the products in it INCLUDING child cats.

A great place for newbies to start

Road Map to oscommerce File Structure

DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways!

 

HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you

 

Proud Memeber of the CODE BREAKERS CLUB!!

Link to comment
Share on other sites

Hi Lindsay,

 

I have spent some time trying to see if can find if the OSC to CSS handles this differently than the catalog demo on the OSCommerce site. Running the two side by side, they are doing the same thing. I have a osc-to css installed at www dot alpha-clear dot com/ninesixty with the default database. If you click on 'DVD movies' the six catgeories are displayed along with all the movies in the first category, 'action'. This happens with both sites. If you however move 'the replacement killers' to the top level category, 'dvd movies' and click on 'dvd movies' then only the 'the replacement killers' is displayed and none of the subcategories.

 

I hope this is reassuring.

Oscommerce site:

 

 

OSC to CSS, http://addons.oscommerce.com/info/7263 -Mail Manager, http://addons.oscommerce.com/info/8120

Link to comment
Share on other sites

yes, i realized that this was the typical (albeit stupid) standard function of osc..

 

There HAS to be a way to display all of the products in the cateogries and it's sub cats...

A great place for newbies to start

Road Map to oscommerce File Structure

DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways!

 

HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you

 

Proud Memeber of the CODE BREAKERS CLUB!!

Link to comment
Share on other sites

Note that it is only the first category of the categories listed that gets it products displayed. For example, click 'DVD Movies' and you get 6 categories of movies but only the action category has it items listed. I would imagine that the query that pulls the action movies out of the action category could either have it conditions changed (ie typically the 'where...' thing at the end) or perhaps whatever loop (ie while...) it has that's pulling the action movies could be expanded.

 

It would be tedious, and easier to say than do, but it would not be coding really that different than what is probably already on that page.

Oscommerce site:

 

 

OSC to CSS, http://addons.oscommerce.com/info/7263 -Mail Manager, http://addons.oscommerce.com/info/8120

Link to comment
Share on other sites

George - I have gone through the same logic in my mind, but I can not seem to find the proper way to complete this.. I dont know enough about the categories display loop

A great place for newbies to start

Road Map to oscommerce File Structure

DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways!

 

HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you

 

Proud Memeber of the CODE BREAKERS CLUB!!

Link to comment
Share on other sites

I fixed this so long ago that I've forgotten what I did. My base store install is now so heavily modified that it wouldn't do any good to just post that code.

 

I think that changing this line:

  if ($category_depth == 'nested') {

to this

  if ($category_depth == 'nested' || $category_depth == 'products') {

and removing this line:

  } elseif ($category_depth == 'products' || isset($HTTP_GET_VARS['manufacturers_id'])) {

should fix the problem. I don't have time to try this right now, but I think that's all I did.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

it is not hard to hardcode a query one level down, but what if you have subcategories and products 3/4/5 levels down - have you considered that ?

I can share my highly customized code, but it is not contribution ready, and you would need to figure out how to integrate it into your site.

My code lists all products in the subcategories except for the first level category.

It uses a separate function to populate an array with all the subcategories. It is not 100% what you need, but it could give you some inspiration.

KEEP CALM AND CARRY ON

I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support).

So if you are still here ? What are you waiting for ?!

 

Find the most frequent unique errors to fix:

grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt

Link to comment
Share on other sites

just came across this contribution, it does pretty much what I have on my site

 

http://addons.oscommerce.com/info/5351

isn't this what you need ?

KEEP CALM AND CARRY ON

I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support).

So if you are still here ? What are you waiting for ?!

 

Find the most frequent unique errors to fix:

grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt

Link to comment
Share on other sites

Jim - thanks for posting that.. I will definitely try that out and see if that helps.. I feel line (in my head at least) it's a simple fix, I just don't know enough about it at the moment to make these changes without some direction..

 

Carine - i have tried that "addon" and it did not make any changes.. i dont know if it was for an older version or what, but my categories tree for displaying products is NOT really all that customized.

A great place for newbies to start

Road Map to oscommerce File Structure

DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways!

 

HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you

 

Proud Memeber of the CODE BREAKERS CLUB!!

Link to comment
Share on other sites

sorry, i reread your post more carefully. I think you need the add-on to list the products from all the subcategories, and kymations suggested change to include the products listing code even when it officially is a 'nested' category

KEEP CALM AND CARRY ON

I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support).

So if you are still here ? What are you waiting for ?!

 

Find the most frequent unique errors to fix:

grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt

Link to comment
Share on other sites

Carine, thanks for rereading and taking the time to understand.. yes, I would like to list all products from the sub categories..

 

I have tried Jim's suggestion but it did not work.. All it did was list the sub categories if there are products in the parent category.. I COULD technically copy all products from the main category into the sub cats and instead of doing a true copy I would do a linked copy, but I dont think that's nessecary at all..

 

So I am still left with the question of how to do this..

A great place for newbies to start

Road Map to oscommerce File Structure

DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways!

 

HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you

 

Proud Memeber of the CODE BREAKERS CLUB!!

Link to comment
Share on other sites

Sorry, I thought that's what you wanted. You will need to make more changes if you want to show the products from the subcategories as well.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

Yea.. I need to show the products as well.. SO I would prefer to not less this thread die here.. If anyone has done this, even on a heavily modded cart, I would like to see what you did.. thanks

A great place for newbies to start

Road Map to oscommerce File Structure

DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways!

 

HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you

 

Proud Memeber of the CODE BREAKERS CLUB!!

Link to comment
Share on other sites

I CAN NOT believe that this is not as easy as it should be..I am going to have to (for now) copy (via linking) all of my products to the proper categories.. this sucks so bad

A great place for newbies to start

Road Map to oscommerce File Structure

DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways!

 

HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you

 

Proud Memeber of the CODE BREAKERS CLUB!!

Link to comment
Share on other sites

I think you've been handed the pieces of the puzzle, if you are unable to put it together in your customer index page, you might be better of finding a programmer or freelancer to do it for you. It is not that difficult, so shouldn't cost you much.

KEEP CALM AND CARRY ON

I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support).

So if you are still here ? What are you waiting for ?!

 

Find the most frequent unique errors to fix:

grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt

Link to comment
Share on other sites

I haven't really been given much thus far, and if a few "this is the rationale needed to get it done" was enough there would be more fixes and a public post to make this change.. There aren't.

 

Also, I feel like I know osc pretty darn well, I got really far in customizing this store.. i just personally don't know the categories loop at all..

A great place for newbies to start

Road Map to oscommerce File Structure

DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways!

 

HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you

 

Proud Memeber of the CODE BREAKERS CLUB!!

Link to comment
Share on other sites

Ahh man.. I just realized that I can't really copy / link products because I have some switch / case code on the product page that basically displays a different group of images based on the category.. If i have the same product, copied into two categories, the code doesn't work because I can not just add an additional "case" to include the parent category because that will put the images on ALL products in that category...

 

This is such a huge pain.. I really REALLY need some help here.. Anyone?

A great place for newbies to start

Road Map to oscommerce File Structure

DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways!

 

HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you

 

Proud Memeber of the CODE BREAKERS CLUB!!

Link to comment
Share on other sites

I really need to keep this alive.. I have found an "addon" that does not work, but these are the instructions..

 

1) Around line 20, replace

 

 

if ($cateqories_products['total'] > 0) {

$category_depth = 'products'; // display products

} else {

 

with

 

 

if (tep_count_products_in_category($cPath) > 0) {

$category_depth = 'products'; // display products

} else {

 

 

****************************************

 

2) Around line 86, replace

 

CODE

// We show them all

$listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'";

}

}

 

with......

 

CODE

// We show them all

$cPathA = explode("_", $cPath);

$size = sizeof($cPathA)-1;

$subcategories_array = array();

tep_get_subcategories($subcategories_array, $cPathA[$size]);

$size_sc = sizeof($subcategories_array); //Subcat count

$cat_Search = "(";

for($i = 0; $i < $size_sc; $i++){

$cat_Search .= "p2c.categories_id = '" . $subcategories_array[$i] . "' or ";

}

$cat_Search .= "p2c.categories_id = '" . $cPathA[$size] . "'" . ")";

 

$listing_sql = "select distinct" . $select_column_list . " p.products_image, pd.products_name, p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and " . $cat_Search . "";

}

}

 

 

**************************************

 

3) In includes/modules/product_listing.php, replace:

 

case 'PRODUCT_LIST_NAME':

$lc_align = '';

if (isset($HTTP_GET_VARS['manufacturers_id'])) {

$lc_text = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'] . '&products_id=' . $listing['products_id']) . '">' . $listing['products_name'] . '</a>';

} else {

$lc_text = ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . $listing['products_name'] . '</a> ';

}

 

 

 

with.....

 

case 'PRODUCT_LIST_NAME':

$lc_align = '';

if (isset($HTTP_GET_VARS['manufacturers_id'])) {

$lc_text = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'] . '&products_id=' . $listing['products_id']) . '">' . $listing['products_name'] . '</a>';

} else {

$lc_text = ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $listing['products_id']) . '">' . $listing['products_name'] . '</a> ';

}

 

 

**************************************

 

and also includes/modules/product_listing.php, replace:

 

case 'PRODUCT_LIST_IMAGE':

$lc_align = 'center';

if (isset($HTTP_GET_VARS['manufacturers_id'])) {

$lc_text = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'] . '&products_id=' . $listing['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a>';

} else {

$lc_text = ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a> ';

}

 

 

with......

 

case 'PRODUCT_LIST_IMAGE':

$lc_align = 'center';

if (isset($HTTP_GET_VARS['manufacturers_id'])) {

$lc_text = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'] . '&products_id=' . $listing['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a>';

} else {

$lc_text = ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $listing['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a> ';

}

 

 

 

 

Any thoughts as to why that doesnt work on a current version of OSC would be helpdul

A great place for newbies to start

Road Map to oscommerce File Structure

DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways!

 

HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you

 

Proud Memeber of the CODE BREAKERS CLUB!!

Link to comment
Share on other sites

I read in another thread you now got subcats and products showing, have you figured out what was not working here ?

KEEP CALM AND CARRY ON

I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support).

So if you are still here ? What are you waiting for ?!

 

Find the most frequent unique errors to fix:

grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...