Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Products not showing in categories (see images attached)


Psytanium

Recommended Posts

Posted

Hi, i need little help here, thats weird.

the products appear only in the last level category.

 

image explain better.

 

any help is apreciated.

Posted

thank you @@DunWeb for notifying me. now the image is attached.

3 products in the fireplace category but nothing displayed as new products for March.

btw, in the index page, the new product page is well displayed.

post-244988-0-39203700-1364752837_thumb.jpg

Posted

OSCommerce have a big problem, i installed a fresh 2.3.1 template to test this issue, same results.

if you click on a main category, the New-Products will display Nothing, because products are located 2 levels deeper. e.g.

  • Shoes
    • Sports
      • Adidas (3)
      • Reebok (10)
      • Puma (8)

      [*]Walking

      [*]everyday

    [*]T-shirts

    [*]Accessories

if i click on shoes (1st level), NO products listed, What if i want to display all the shoes?

if i click on Sports (2nd level), all products will be displayed.

 

someone correct me if I'm wrong.

Posted

You have not considered that it could be your "template" at fault ?

 

i installed a FRESH copy of OSC 2.3.1

Same problem!

 

This is considered a main bug in OSC, right ?

Posted

@@Psytanium

 

if i click on shoes (1st level), NO products listed, What if i want to display all the shoes?

 

This has NEVER been in osCommerce. In previous versions of osCommerce, there were contributions to achieve but it is not present by default. It is not a bug, it is simple the way the core developers have chosen to create the category listings.

 

 

 

Chris

Posted

I see! is there a way to change the default way category_listing works ?

 

can anyone help me display all the shoes :lol: ?

 

I found this in the forums:

 

in index.php change this:

if ($cateqories_products['total'] > 0) {
 $category_depth = 'products'; // display products
} else {

 

to this:

if (tep_count_products_in_category($cPath) > 0) {
 $category_depth = 'products'; // display products
} else {

 

and in category_listing.php change this:

// 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 . "'";
 }
}

 

to this:

// 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 . "";
 }
}

 

it seams working fine, but the Manufacturer filter will show only in the last level category.

Archived

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

×
×
  • Create New...