Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Duplicates in show: all categories


keoga

Recommended Posts

Hi all!

 

I've tried to figure out how to solve a little bug that shows when having same subcategories copied in different main categories.

 

If you then choose to view the products through the dropdown manufacturers list, there will be duplicates in the dropdown menu show:all categories where this produc is listed in.

 

 

There should be some solution if changing the code in catalog/index.php around:

 

 // 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.cat        egories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' and p.manufacturers_id = '" . (int)$H        TTP_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_PRODU        CTS . " 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)$curren        t_category_id . "' order by m.manufacturers_name";
         }

 

Does anyone know how?

 

Thanks for any advice!

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...