Datafeedr Support Forums  

Go Back   Datafeedr Support Forums > Current Version (V3) Forum > Questions
Home Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Important - The support forums are now in "read-only" mode as we transition to an alternative help desk solution. Feel free to contact us here with any of your questions or search the forums for an existing solution.
 
 
Thread Tools Search this Thread Display Modes
  #1  
Old September 3rd, 2014, 11:09 AM
matzii matzii is offline
 
Join Date: Sep 2013
Posts: 138
Default dont want to display empty category

dont want to display empty category

with the widget "categories"

the site are hotells dot se
and i dont want the "city with no hotel" to show in the list of cities!
  #2  
Old September 3rd, 2014, 11:10 AM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Hi,

If your category has no products, you could set it to hidden and then it won't appear in the categories widget.

Eric
  #3  
Old September 3rd, 2014, 11:18 AM
matzii matzii is offline
 
Join Date: Sep 2013
Posts: 138
Default

thanks for fast answer!

I dont want to do anything manually. Perhaps one year there are a hotell in a city and the next year there arent any hotel and i wold be great if its done automaticle whith the categories display only categories with content
  #4  
Old September 4th, 2014, 09:57 AM
matzii matzii is offline
 
Join Date: Sep 2013
Posts: 138
Default

hi again!

are there anyway to solwe my last question?
  #5  
Old September 4th, 2014, 10:01 AM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Hi,

The only way is to set it to hidden.

Eric
  #6  
Old September 4th, 2014, 10:03 AM
matzii matzii is offline
 
Join Date: Sep 2013
Posts: 138
Default

manualy?
  #7  
Old September 4th, 2014, 10:06 AM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Hi,

Yes, or you could hide categories based on product count. That will require changes to your "Categories" widgets.

To get the number of products in a specific category, you can use the PHP variable:

PHP Code:
$category->pc 
To get the total number of products in a category and its subcategories, you can use the PHP variable:

PHP Code:
$category->pct 
Then perform some conditional logic in your views to display or not display the categories.

Eric
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Store page category - pics dont display thk1976 Problems 4 February 20th, 2013 03:30 PM
How do I exclude duplicates from an empty parent category? drsylvie Questions 3 October 17th, 2011 09:17 AM
Display sub-category images on category pages Eric Tips, Tricks & Tutorials 2 August 6th, 2011 11:47 AM
How to Not Display Category if it is Empty patagonia Questions 3 January 10th, 2011 03:52 PM


All times are GMT -5. The time now is 09:07 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.