Psytanium Posted March 31, 2013 Posted March 31, 2013 Hi, i need little help here, thats weird. the products appear only in the last level category. image explain better. any help is apreciated.
Psytanium Posted March 31, 2013 Author Posted March 31, 2013 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.
Psytanium Posted March 31, 2013 Author Posted March 31, 2013 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. ShoesSportsAdidas (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.
burt Posted March 31, 2013 Posted March 31, 2013 You have not considered that it could be your "template" at fault ?
Psytanium Posted March 31, 2013 Author Posted March 31, 2013 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 ?
Guest Posted March 31, 2013 Posted March 31, 2013 @@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
Psytanium Posted March 31, 2013 Author Posted March 31, 2013 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.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.