Developer Resources for AbleCommerce eCommerce platform
CommerceBuilder.Products Namespace / IProductRepository Interface / CountForCategory Method / CountForCategory(Boolean,Int32,Boolean,Boolean) Method
If true products assigned to groups that doesn't belong to user will not be counted.
The ID of the category to count products for.
If true products are counted in the current category and any of it's children.
If true only public (published) products are counted. Default value is false
In This Topic
    CountForCategory(Boolean,Int32,Boolean,Boolean) Method
    In This Topic
    Counts the number of products in the given category.
    Syntax

    Parameters

    groupRestrictions
    If true products assigned to groups that doesn't belong to user will not be counted.
    categoryId
    The ID of the category to count products for.
    recurse
    If true products are counted in the current category and any of it's children.
    publicOnly
    If true only public (published) products are counted. Default value is false

    Return Value

    The Number of Product objects for the given ManufacturerId in the database.
    Requirements

    Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also