Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Add lowest category to product listing


JosephB

Recommended Posts

I need to show my products' lowest categories on product listing pages. I've beaten myself to death trying to figure out how OSC creates its product listings but cannot figure out how to add this one piece. Currently, I show:

 

Product Image

Product Name

Product Price

Product Manufacturer

 

These are set from the Admin panel. But I want to add Lowest Product Category.

 

Any ideas?

 

Smoking from PHP Head Burnout,

JB

Steep learning curve? Hell, I don't even know enough to formulate a stupid question!!

Link to comment
Share on other sites

  • 3 weeks later...

>_< Nobody with ideas?

 

I'm currently investigating this area of index.php:

 

        $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, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id 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 manufacturers_id DESC";

          break;

 

Am I in the ball park?

 

HELP!!

 

Thanks in advance,

JB

Steep learning curve? Hell, I don't even know enough to formulate a stupid question!!

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...