Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

MS2-2.2-Sitemap & Enable/Disable Categories


Guest

Recommended Posts

Someone else may have already posted this little tweak, but I always seem to be asking questions, so here is my chance to give a little.

I have Sitemap MS2-2.2 and Enable Disable Categories installed and needed to hide the disabled categories in the site map (I mean, why have them hidden in the first place, if they are still acessable)?

So...in includes/classes/category_tree.php find this around line 30:

         $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' order by c.parent_id, c.sort_order, cd.categories_name");

 

And simply replace with:

         $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.categories_status = '1'and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' order by c.parent_id, c.sort_order, cd.categories_name");

 

I'm no programmer so don't ask if something blows up, but I know this works on my site with no problems.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...