sese Posted January 17, 2012 Share Posted January 17, 2012 Hi guys, Iám trying to change the code. The situation is as follow: the categories only show when they are filled. I want to change this. So that the categories alway show empty or not. this is the code: // remove empty categories $selected_categories = array (); foreach($this->selected_categories as $category) { if ($category->totalItemCount()) { $selected_categories[] = $category; } } Quote Link to comment Share on other sites More sharing options...
solanki_mahendra131 Posted January 30, 2012 Share Posted January 30, 2012 You can directly display category from $this->selected_categories array OR just comment count checking line in your code as i have done in your code as follows $selected_categories = array (); foreach($this->selected_categories as $category) { //if ($category->totalItemCount()) { $selected_categories[] = $category; //} } Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.