Forums / Setting Up Categories, Products, Attributes / How to hide categories with no active products?

How to hide categories with no active products?

Views: 26,152

Results 21 to 40 of 83
11 Jul 2013, 12:43 AM
#21
mikeel100 avatar

mikeel100

Zen Follower

Join Date:
Sep 2012
Location:
West Jefferson, NC
Posts:
391
Plugin Contributions:
0

How to hide categories with no active products?

Believe me, I will contribute financially if I can ever get people to start buying. I purchased a FB add and I have thousands of hits on the site from 16 states and 10 countries, thousands of likes in FB, but still no orders. Maybe by the shopping season people will remember the site and return for purchases. I'll buy another add just before shopping season and see if that is the ticket. It's a wait and see game from here on out. Thanks again.

29 Jul 2014, 2:41 AM
#22
mikeel100 avatar

mikeel100

Zen Follower

Join Date:
Sep 2012
Location:
West Jefferson, NC
Posts:
391
Plugin Contributions:
0

Re: How to hide categories with no active products?

Ajeh:

In the Class category_tree.php the counts are made and the tree made for the sidebox ...

With only the changes that I posted, for only the tpl_categories.php file, Only Categories that contain Active Products are showing ... NOTE: you need the Category Counts turned on in the settings to know which Categories to show or exclude, but the counts will still be hidden based on the code changes that I posted ...

Have you additional changes that might be causing this to not work for you?

Hi Ajeh,

How do I hide categories, with no active products, in the horizontal/top page menu and subcategories/center page?

Background:

I've upgraded my cart to a responsive plug in...because most clicks are coming from mobile devices.

I switched from using the category box to the horizontal menu across the top and showing subcategories in the center page area.

The fix you gave me for hiding inactive products in the sidebox categories doesn't take care of the horizontal menu and center box subcategories. How do I fix that?

Thanks for your help!

29 Jul 2014, 1:20 PM
#23
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: How to hide categories with no active products?

See if this will hide the empty categories from the category tabs ...

Edit the file:
/includes/modules/categories_tabs.php

and add the code in RED:

while (!$categories_tab->EOF) {
[B]// bof: skip empty categories
if (zen_count_products_in_category($categories_tab->fields['categories_id']) == 0) {
// skip display of empty categories
} else {
[/B]  // currently selected category
  if ((int)$cPath == $categories_tab->fields['categories_id']) {
    $new_style = 'category-top';
    $categories_tab_current = '<span class="category-subs-selected">' . $categories_tab->fields['categories_name'] . '</span>';
  } else {
    $new_style = 'category-top';
    $categories_tab_current = $categories_tab->fields['categories_name'];
  }

  // create link to top level category
  $links_list[] = '<a class="' . $new_style . '" href="' . zen_href_link(FILENAME_DEFAULT, 'cPath=' . (int)$categories_tab->fields['categories_id']) . '">' . $categories_tab_current . '</a> ';
[B]}
// eof: skip empty categories
[/B]  $categories_tab->MoveNext();
}

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

29 Jul 2014, 11:26 PM
#24
mikeel100 avatar

mikeel100

Zen Follower

Join Date:
Sep 2012
Location:
West Jefferson, NC
Posts:
391
Plugin Contributions:
0

Re: How to hide categories with no active products?

Made changes and saved to my current template. Cleared cache. Empty / non-active categories still showing.

$links_list = array();
while (!$categories_tab->EOF) {
[B]// bof: skip empty categories ADDED BY MIKE
if (zen_count_products_in_category($categories_tab->fields['categories_id']) == 0) {
// skip display of empty categories
} else {[/B]

  // currently selected category
  if ((int)$cPath == $categories_tab->fields['categories_id']) {
    $new_style = 'category-top';
    $categories_tab_current = '<span class="category-subs-selected">' . $categories_tab->fields['categories_name'] . '</span>';
  } else {
    $new_style = 'category-top';
    $categories_tab_current = $categories_tab->fields['categories_name'];
  }

  // create link to top level category
  $links_list[] = '<a class="' . $new_style . '" href="' . zen_href_link(FILENAME_DEFAULT, 'cPath=' . (int)$categories_tab->fields['categories_id']) . '">' . $categories_tab_current . '</a> ';
 [B] }
// eof: skip empty categories } ABOVE THIS LINE ADDED BY MIKE
  $categories_tab->MoveNext();[/B]
}

Do I need to undo the changes I made earlier in this thread to make this work?

29 Jul 2014, 11:34 PM
#25
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: How to hide categories with no active products?

Have you an URL to your domain where we can perhaps look at the layout of things?

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

29 Jul 2014, 11:52 PM
#26
mikeel100 avatar

mikeel100

Zen Follower

Join Date:
Sep 2012
Location:
West Jefferson, NC
Posts:
391
Plugin Contributions:
0

Re: How to hide categories with no active products?

I see what's wrong: Actual code needs to go in place of "// skip display of empty categories". I'll see if I can figure out the code. I use PDO programming with php and mysql. Will that work here?

29 Jul 2014, 11:57 PM
#27
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: How to hide categories with no active products?

Actually, I used the exact code that I posted, with the comments and no changes, to block the empty categories ... this is why it might help to see your site and know which categories should not be showing in the category tabs ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

30 Jul 2014, 7:17 AM
#28
mikeel100 avatar

mikeel100

Zen Follower

Join Date:
Sep 2012
Location:
West Jefferson, NC
Posts:
391
Plugin Contributions:
0

Re: How to hide categories with no active products?

Ajeh:

Actually, I used the exact code that I posted, with the comments and no changes, to block the empty categories ... this is why it might help to see your site and know which categories should not be showing in the category tabs ...

https://jestcountrystuff.com/index.php?main_page=index&cPath=1563

Camping and Trailer Hitch Hammakas are empty categories.

I tried the code you sent with category counts turned off and on...no joy.

I also tried removing your recommended changes (earlier in this thread)...no joy.

I am using 1.5.1 on Godaddy with Responsive Classic Template, EP4, UPS, dbBackup, Wishlists, and I added Social Share buttons manually. None of those should be messing with categories (I think)...:unsure:

Thanks for your help!

30 Jul 2014, 3:33 PM
#29
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: How to hide categories with no active products?

It sounds like what you really want to do is not show the Empty Categories in the middle of the page ...

To do that, you can edit the module:
/includes/modules/category_row.php

and add the code in RED:

[B]// bof: hide empty categories
if (zen_count_products_in_category($categories->fields['categories_id']) == 0) {
  // skip empty category
} else {
[/B]    $list_box_contents[$row][$col] = array('params' => 'class="categoryListBoxContents"' . ' ' . 'style="width:' . $col_width . '%;"',
                                           'text' => '<a href="' . zen_href_link(FILENAME_DEFAULT, $cPath_new) . '">' . zen_image(DIR_WS_IMAGES . $categories->fields['categories_image'], $categories->fields['categories_name'], SUBCATEGORY_IMAGE_WIDTH, SUBCATEGORY_IMAGE_HEIGHT) . '<br />' . $categories->fields['categories_name'] . ' ' . $countContentProduct . '</a>');
[B]}[/B]
[B]// bof: hide empty categories
[/B]
    $col ++;
    if ($col > (MAX_DISPLAY_CATEGORIES_PER_ROW -1)) {

NOTE: That other code I gave you is not a good solution at all for the Category Tabs, so I would remove it ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

31 Jul 2014, 2:33 AM
#30
mikeel100 avatar

mikeel100

Zen Follower

Join Date:
Sep 2012
Location:
West Jefferson, NC
Posts:
391
Plugin Contributions:
0

Re: How to hide categories with no active products?

I'll give that a shot...

I wrote my own script to use during my catalog update that will take care of my issues.

<?php
	$hostname = "xxxxxxxxxxxxxx";
	$username = "xxxxxxxxxxxxx";
	$dbname = "xxxxxxxxxxxxxx";
	$password = "xxxxxxxxxxxx";
	
	$fail_point = "Connecting to db";
	
	$dbh = new PDO("mysql:host=$hostname;dbname=$dbname;charset=utf8", $username, $password);
		
	$dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);		

	try
	{	

	$fail_point = "FIX QUANTITIES EXPONENTIAL AMOUNTS";
	
	$query = ("UPDATE zen_products SET products_quantity = 10 WHERE products_quantity LIKE '%+%'");
	$stmt = $dbh->prepare($query);
	$stmt->execute();

	$fail_point = "RESET QUANTITIES <1 TO 0";
	
	$query = ("UPDATE zen_products SET products_quantity = 0 WHERE products_quantity < 1");
	$stmt = $dbh->prepare($query);
	$stmt->execute();
	
	$fail_point = "GET QUANTITY TOTALS FROM PRODUCTS TABLE AND ADJUST STATUS";
	
	//THIS HIDES CATEGORIES WITH PRODUCTS IN THEM IN THE BOTTOM CATEGORY LEVEL
	
	foreach ($dbh->query("SELECT DISTINCT parent_id, categories_id FROM zen_categories
	WHERE categories_id IN (SELECT master_categories_id FROM zen_products WHERE products_quantity < 1)")as $unique_record)
	{
		$unique_p_id = $unique_record['parent_id'];
		$unique_c_id = $unique_record['categories_id'];
		
		$fail_point = "Counting p2c";
				
		$total = $dbh->query("SELECT SUM(products_quantity) FROM zen_products 
		WHERE zen_products.master_categories_id = $unique_c_id");
		$myQty = $total->fetchColumn();
		//echo "Category ID - ".$unique_c_id." Total - ".$myQty."<br>";

		$fail_point = "Changing status";
		
		if ($myQty == 0)
		{
			$query = ("UPDATE zen_categories SET categories_status = 0 WHERE parent_id = $unique_p_id 
			AND categories_id = $unique_c_id");
			$stmt = $dbh->prepare($query);
			$stmt->execute();
			//echo "Parent ID - ".$unique_p_id." - Status set to 0 <br><br>";
		} 
		else 
		{
			$query = ("UPDATE zen_categories SET categories_status = 1 WHERE parent_id = $unique_p_id 
			AND categories_id = $unique_c_id ");
			$stmt = $dbh->prepare($query);
			$stmt->execute();
			//echo $unique_p_id." Status set to 1 <br><br>";
		}
	}


	//HIDE EMPTY CATEGORIES

	foreach ($dbh->query("SELECT DISTINCT parent_id, categories_id FROM zen_categories
	WHERE categories_id NOT IN (SELECT master_categories_id FROM zen_products)")as $unique_record)
	{
		$unique_p_id = $unique_record['parent_id'];
		$unique_c_id = $unique_record['categories_id'];
		

		$test = $dbh->query("SELECT categories_id FROM zen_categories 
		WHERE $unique_c_id IN (SELECT parent_id FROM zen_categories)");
		$subcategories = $test->fetchColumn();
		$count = $test->rowCount();
		//echo "Category ID - ".$unique_c_id." Subcategories - ".$subcategories."<br>";
		
		$fail_point = "Changing status";
		
		if ($subcategories == 0)
		{
			$query = ("UPDATE zen_categories SET categories_status = 0 WHERE categories_id = $unique_c_id");
			$stmt = $dbh->prepare($query);
			$stmt->execute();
			//echo "Parent ID - ".$unique_c_id." - Status set to 0 <br><br>";
		} 
		else 
		{
			$query = ("UPDATE zen_categories SET categories_status = 1 WHERE categories_id = $unique_c_id ");
			$stmt = $dbh->prepare($query);
			$stmt->execute();
			//echo $unique_c_id." Status set to 1 <br><br>";
		}

	}	

	//HIDE UNCATEGORIZED, NUDES, AND ANY OTHER CATEGORIES YOU DO NOT WANT SHOWING...NOT BASED ON QUANTITY

	$fail_point = "Hiding other categories";
	
	$query = ("UPDATE zen_categories SET categories_status = 0 WHERE categories_id = 1539 OR categories_id = 1");
	$stmt = $dbh->prepare($query);
	$stmt->execute();

	} 
	catch (PDOException $e) {
		echo "Hiding categories failed to process." . $fail_point . $e->getMessage() . "<br/>";
		die();
	}
?>

If you see harm in using this instead, let me know.

Thanks.

31 Jul 2014, 2:59 AM
#31
mikeel100 avatar

mikeel100

Zen Follower

Join Date:
Sep 2012
Location:
West Jefferson, NC
Posts:
391
Plugin Contributions:
0

Re: How to hide categories with no active products?

Ajeh:

It sounds like what you really want to do is not show the Empty Categories in the middle of the page ...

To do that, you can edit the module:
/includes/modules/category_row.php

and add the code in RED:

[B]// bof: hide empty categories
if (zen_count_products_in_category($categories->fields['categories_id']) == 0) {
// skip empty category
} else {
[/B]
$list_box_contents[$row][$col] = array('params' => 'class="categoryListBoxContents"' . ' ' . 'style="width:' . $col_width . '%;"',
'text' => '<a href="' . zen_href_link(FILENAME_DEFAULT, $cPath_new) . '">' . zen_image(DIR_WS_IMAGES . $categories->fields['categories_image'], $categories->fields['categories_name'], SUBCATEGORY_IMAGE_WIDTH, SUBCATEGORY_IMAGE_HEIGHT) . '<br />' . $categories->fields['categories_name'] . ' ' . $countContentProduct . '</a>');
[B]}[/B]
[B]// bof: hide empty categories
[/B]

$col ++;
if ($col > (MAX_DISPLAY_CATEGORIES_PER_ROW -1)) {

> 
> NOTE: That other code I gave you is not a good solution at all for the Category Tabs, so I would remove it ...

Actually, I want to hide subcategories where all products are inactive and subcategories where no products are in them.

Didn't work...it hid the empty categories but it also hid some categories with products active. It also left random blank areas where categories should be.

The end of my categories_tab page code looks different than yours.  . ' ' . $countContentProduct is missing right before </a>.

```php
$categories->fields['categories_name'] . '</a>');

    $col ++;
    if ($col > (MAX_DISPLAY_CATEGORIES_PER_ROW -1)) {
      $col = 0;
      $row ++;
    }
    $categories->MoveNext();
  }
}

I don't know if that has anything to do with it since I'm no guru on this code.

Thanks again.

31 Jul 2014, 3:10 AM
#32
mikeel100 avatar

mikeel100

Zen Follower

Join Date:
Sep 2012
Location:
West Jefferson, NC
Posts:
391
Plugin Contributions:
0

Re: How to hide categories with no active products?

Deleted.

31 Jul 2014, 3:12 AM
#33
mikeel100 avatar

mikeel100

Zen Follower

Join Date:
Sep 2012
Location:
West Jefferson, NC
Posts:
391
Plugin Contributions:
0

Re: How to hide categories with no active products?

mikeel100:

I'll give that a shot...

I wrote my own script to use during my catalog update that will take care of my issues.

<?php $hostname = "xxxxxxxxxxxxxx"; $username = "xxxxxxxxxxxxx"; $dbname = "xxxxxxxxxxxxxx"; $password = "xxxxxxxxxxxx"; $fail_point = "Connecting to db"; $dbh = new PDO("mysql:host=$hostname;dbname=$dbname;charset=utf8", $username, $password); $dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); try { $fail_point = "FIX QUANTITIES EXPONENTIAL AMOUNTS"; $query = ("UPDATE zen_products SET products_quantity = 10 WHERE products_quantity LIKE '%+%'"); $stmt = $dbh->prepare($query); $stmt->execute(); $fail_point = "RESET QUANTITIES <1 TO 0"; $query = ("UPDATE zen_products SET products_quantity = 0 WHERE products_quantity < 1"); $stmt = $dbh->prepare($query); $stmt->execute(); $fail_point = "GET QUANTITY TOTALS FROM PRODUCTS TABLE AND ADJUST STATUS"; //THIS HIDES CATEGORIES WITH PRODUCTS IN THEM IN THE BOTTOM CATEGORY LEVEL foreach ($dbh->query("SELECT DISTINCT parent_id, categories_id FROM zen_categories WHERE categories_id IN (SELECT master_categories_id FROM zen_products WHERE products_quantity < 1)")as $unique_record) { $unique_p_id = $unique_record['parent_id']; $unique_c_id = $unique_record['categories_id']; $fail_point = "Counting p2c"; $total = $dbh->query("SELECT SUM(products_quantity) FROM zen_products WHERE zen_products.master_categories_id = $unique_c_id"); $myQty = $total->fetchColumn(); //echo "Category ID - ".$unique_c_id." Total - ".$myQty."<br>"; $fail_point = "Changing status"; if ($myQty == 0) { $query = ("UPDATE zen_categories SET categories_status = 0 WHERE parent_id = $unique_p_id AND categories_id = $unique_c_id"); $stmt = $dbh->prepare($query); $stmt->execute(); //echo "Parent ID - ".$unique_p_id." - Status set to 0 <br><br>"; } else { $query = ("UPDATE zen_categories SET categories_status = 1 WHERE parent_id = $unique_p_id AND categories_id = $unique_c_id "); $stmt = $dbh->prepare($query); $stmt->execute(); //echo $unique_p_id." Status set to 1 <br><br>"; } } //HIDE EMPTY CATEGORIES foreach ($dbh->query("SELECT DISTINCT parent_id, categories_id FROM zen_categories WHERE categories_id NOT IN (SELECT master_categories_id FROM zen_products)")as $unique_record) { $unique_p_id = $unique_record['parent_id']; $unique_c_id = $unique_record['categories_id']; $test = $dbh->query("SELECT categories_id FROM zen_categories WHERE $unique_c_id IN (SELECT parent_id FROM zen_categories)"); $subcategories = $test->fetchColumn(); $count = $test->rowCount(); //echo "Category ID - ".$unique_c_id." Subcategories - ".$subcategories."<br>"; $fail_point = "Changing status"; if ($subcategories == 0) { $query = ("UPDATE zen_categories SET categories_status = 0 WHERE categories_id = $unique_c_id"); $stmt = $dbh->prepare($query); $stmt->execute(); //echo "Parent ID - ".$unique_c_id." - Status set to 0 <br><br>"; } else { $query = ("UPDATE zen_categories SET categories_status = 1 WHERE categories_id = $unique_c_id "); $stmt = $dbh->prepare($query); $stmt->execute(); //echo $unique_c_id." Status set to 1 <br><br>"; } } //HIDE UNCATEGORIZED, NUDES, AND ANY OTHER CATEGORIES YOU DO NOT WANT SHOWING...NOT BASED ON QUANTITY $fail_point = "Hiding other categories"; $query = ("UPDATE zen_categories SET categories_status = 0 WHERE categories_id = 1539 OR categories_id = 1"); $stmt = $dbh->prepare($query); $stmt->execute(); } catch (PDOException $e) { echo "Hiding categories failed to process." . $fail_point . $e->getMessage() . "<br/>"; die(); } ?>
> 
> If you see harm in using this instead, let me know.
> 
> Thanks.

This code will only hide the **BOTTOM LEVEL SUBCATEGORIES**.
31 Jul 2014, 4:03 AM
#34
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: How to hide categories with no active products?

Sorry, I ended the IF incorrectly ...

Try this code in RED:

[B]// bof: hide empty categories
if (zen_count_products_in_category($categories->fields['categories_id']) == 0) {
  // skip empty category
  echo 'Skipped empty category: ' . $categories->fields['categories_name'] . '<br>';
} else {
[/B]    $list_box_contents[$row][$col] = array('params' => 'class="categoryListBoxContents"' . ' ' . 'style="width:' . $col_width . '%;"',
                                           'text' => '<a href="' . zen_href_link(FILENAME_DEFAULT, $cPath_new) . '">' . zen_image(DIR_WS_IMAGES . $categories->fields['categories_image'], $categories->fields['categories_name'], SUBCATEGORY_IMAGE_WIDTH, SUBCATEGORY_IMAGE_HEIGHT) . '<br />' . $categories->fields['categories_name'] . ' ' . $countContentProduct . '</a>');


    $col ++;
    if ($col > (MAX_DISPLAY_CATEGORIES_PER_ROW -1)) {
      $col = 0;
      $row ++;
    }
[B]}
// eof: hide empty categories
[/B]    $categories->MoveNext();
  }
}

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

31 Jul 2014, 9:32 PM
#35
mikeel100 avatar

mikeel100

Zen Follower

Join Date:
Sep 2012
Location:
West Jefferson, NC
Posts:
391
Plugin Contributions:
0

Re: How to hide categories with no active products?

Ajeh:

Sorry, I ended the IF incorrectly ...

Try this code in RED:

[B]// bof: hide empty categories
if (zen_count_products_in_category($categories->fields['categories_id']) == 0) {
// skip empty category
echo 'Skipped empty category: ' . $categories->fields['categories_name'] . '<br>';
} else {
[/B]
$list_box_contents[$row][$col] = array('params' => 'class="categoryListBoxContents"' . ' ' . 'style="width:' . $col_width . '%;"',
'text' => '<a href="' . zen_href_link(FILENAME_DEFAULT, $cPath_new) . '">' . zen_image(DIR_WS_IMAGES . $categories->fields['categories_image'], $categories->fields['categories_name'], SUBCATEGORY_IMAGE_WIDTH, SUBCATEGORY_IMAGE_HEIGHT) . '<br />' . $categories->fields['categories_name'] . ' ' . $countContentProduct . '</a>');

$col ++;
if ($col > (MAX_DISPLAY_CATEGORIES_PER_ROW -1)) {
  $col = 0;
  $row ++;
}

[B]}
// eof: hide empty categories
[/B]
$categories->MoveNext();
}
}


You are a genius and I really appreciate the help!

I like the echo trick to show which categories got hidden!
31 Jul 2014, 10:35 PM
#36
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: How to hide categories with no active products?

Just comment that out after testing ...

Thanks for the update that this is working for you ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

2 Aug 2014, 2:58 AM
#37
mikeel100 avatar

mikeel100

Zen Follower

Join Date:
Sep 2012
Location:
West Jefferson, NC
Posts:
391
Plugin Contributions:
0

Re: How to hide categories with no active products?

Ajeh:

Just comment that out after testing ...

Thanks for the update that this is working for you ...

Comment what out?

2 Aug 2014, 5:53 AM
#38
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: How to hide categories with no active products?

mikeel100:

Comment what out?

The echo statement..

My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

3 Aug 2014, 1:27 AM
#39
mikeel100 avatar

mikeel100

Zen Follower

Join Date:
Sep 2012
Location:
West Jefferson, NC
Posts:
391
Plugin Contributions:
0

Re: How to hide categories with no active products?

Doh, yes, I had already done that. Thanks.

20 Nov 2014, 1:37 AM
#40
mikeel100 avatar

mikeel100

Zen Follower

Join Date:
Sep 2012
Location:
West Jefferson, NC
Posts:
391
Plugin Contributions:
0

Re: How to hide categories with no active products?

This does work in 1.5.3 ... please consider adding this to the next upgrade package.