Important Notice from AspDotNetStorefront
It is with dismay that we report that we have been forced, through the action of hackers, to shut off write-access to this forum. We are keen to leave the wealth of material available to you for research. We have opened a new forum from which our community of users can seek help, support and advice from us and from each other. To post a new question to our community, please visit: http://forums.vortx.com
Results 1 to 3 of 3

Thread: Dont show Category if there are no Products

  1. #1
    russell.garrett is offline Member
    Join Date
    Oct 2008
    Posts
    44

    Default Dont show Category if there are no Products

    I was looking for a setting or a way of reproducing the function of the HideProductsWithLessThanThisInventoryLevel variable in the appconfig, only for categories/sub categories. This way I could create the categories/sub categories and the code to sort the products correctly, and not have to worry about blanks on my site.

  2. #2
    Rex is offline Banned
    Join Date
    Nov 2007
    Posts
    561

    Default

    Add a query to your package:

    Code:
    <query name="EntityMaster" rowElementName="Entity">
        <![CDATA[
          SELECT Name,EntityID,ParentEntityID,NumObjects FROM dbo.EntityMaster WHERE EntityType='category' AND Published = 1 AND NumObjects > 0
        ]]>
        
      </query>
    Then you can use it to compare and filter out nodes that you do not want.

  3. #3
    russell.garrett is offline Member
    Join Date
    Oct 2008
    Posts
    44

    Default

    thanks. works like a charm.