Exemple #1
0
        public bool IsFacetSelectedInKey(string key, List <CategoryFacet> allFacets, long facetId)
        {
            if (key == string.Empty)
            {
                return(false);
            }

            bool result = false;

            List <long> keyparts = CategoryFacetKeyHelper.ParseKeyToList(key);

            for (int i = 0; i < allFacets.Count; i++)
            {
                if (allFacets[i].Id == facetId)
                {
                    if (keyparts[i] > 0)
                    {
                        return(true);
                    }
                }
            }

            return(result);
        }
        public int FindCountProductIdsMatchingKey(string key)
        {
            List <long> choiceIds = CategoryFacetKeyHelper.ParseKeyToList(key);

            return(FindCountOfProductsContainingAllChoiceIds(choiceIds));
        }
        public List <string> FindProductIdsMatchingKey(string key, int pageNumber, int pageSize)
        {
            List <long> choiceIds = CategoryFacetKeyHelper.ParseKeyToList(key);

            return(FindProductsContainingAllChoiceIds(choiceIds, pageNumber, pageSize));
        }