Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Show hidden categories in main content Rate Topic   - - - - -

 
  • pheritage
  • Junior Member
  • Members
  • Join Date: 19-Sep 06
  • 34 posts

Posted 17 July 2008 - 10:49 AM #1

Hi there,

I have a lot of menu items in my preferred Basic Menu so have opted to change many sub-menus to Hidden. However, I need these to show in the main content part of the site as subcategories.

Can anyone point me in the direction of the code to show all hidden categories in the main content (not in the menu).

I've been in the skins/basic/customer/categories_pages/categories.tpl and seen where the subcategories are output to the screen but unsure where it decides if they are set to Hidden, No or Yes. I basically want to list all subcategories whether they are set to Yes or Hidden.

Anyone know how to do this?

Thanks.

Paul.

http://www.DiscountSonicWALLs.co.uk (this is the site I am playing with)
http://www.sonicstall.co.uk
http://www.sonicwall.uk.com

All running 1.3.5sp3

 
  • mdekok3000
  • Senior Member
  • Members
  • Join Date: 06-Feb 08
  • 883 posts

Posted 17 July 2008 - 05:00 PM #2

You could try this:

In "/core/fn_catalog.php"

ADD PART IN RED

function fn_get_subcategories($category_id = '0', $lang_code = '')
{
    return fn_get_categories($category_id, true, 0, true, false, $lang_code[COLOR=Red], true[/COLOR]);
}
AND HERE


function fn_get_categories($category_id = 0, $visible = false, $current_category_id = 0, $simple = true, $plain = false, $lang_code='', $show_hidden = false)
{
global $db_tables, $cart_language, $auth, $settings;

$lang_code = !empty($lang_code) ? $lang_code : $cart_language;

$conditions = array();

if (AREA == 'C') {
if($show_hidden) {
$_avails = array('Y','H'); // Show enabled and hidden products/categories
} else {

$_avails = array('Y'); // Show enabled products/categories
}

$conditions[] = "$db_tables[categories].membership_id IN ('0', '$auth[membership_id]')";
$conditions[] = "$db_tables[categories].avail IN ('" . implode("','", $_avails) . "')";
}
[SIZE=2]
[/SIZE]

 
  • pheritage
  • Junior Member
  • Members
  • Join Date: 19-Sep 06
  • 34 posts

Posted 17 July 2008 - 09:33 PM #3

What a star - exactly what I needed.

Thanks very much.

Paul.

 
  • harsh
  • Member
  • Trial users
  • Join Date: 22-Sep 17
  • 18 posts

Posted 10 October 2017 - 07:47 AM #4

hello

 

i want my hidden categories should be visible on sitemap page or any page which shows all the categories (active, hidden)

anyone know how i get this