public List<ICategory> GetCatalogueNodeChildren(int storeID, string cultureCode, long parentNodeID) {

            IQuery query = this._sessionManager.OpenSession().CreateQuery("from Category where parentcategoryID = :id AND (categoryID <> :id ) AND isPublished = 1 order by sortOrder");

            query.SetInt64("id", parentNodeID);
            IList cats2 = query.List();

            List<ICategory> children = new List<ICategory>();

            if (cats2.Count > 0) {

                foreach (Category epc in cats2) {
                    if (epc.IsPublished) {
                        ICategory node = new CategoryNode();

                        node.Name = epc.CategoryName;
                        node.NodeID = Convert.ToInt64(epc.CategoryID);
                        node.ParentNodeID = Convert.ToInt64(epc.ParentCategory.CategoryID);
                        node.Description = epc.CategoryDescription;
                        node.Style = epc.CssClass;
                        IImage image = new Domain.Catalogue.Image();
                        ImageHelper.CopyImage(epc, image);
                        node.Image = image;
                        node.SortOrder = epc.SortOrder;
                        children.Add(node);

                    }
                }
            }

            return children;
        }
        public ICategory GetRootCatalogueNode(int storeID, string cultureCode) {

            ICategory node = new CategoryNode();
            IQuery query = this._sessionManager.OpenSession().CreateQuery("from Category where parentcategoryID IS Null AND isPublished = 1 order by sortOrder");

            IList cats = query.List();

            if (cats.Count > 0) {
                foreach (Category epc in cats) {

                    node.Name = epc.CategoryName;
                    node.NodeID = Convert.ToInt32(epc.CategoryID);
                    node.Description = epc.CategoryDescription;
                    node.BannerImageUrl = epc.BannerImageUrl;

                    IImage image = new Domain.Catalogue.Image();
                    ImageHelper.CopyImage(epc, image);
                    node.Image = image;
                }
            }

            return node;
        }
        public virtual void PopulateFullProductSummary(IProductSummary product) {

            foreach (ProductSynonym s in Synonyms) {
                product.SynonymList.Add(s);
            }

            foreach (ProductImage epi in Images) {
                IImage image = new Domain.Catalogue.Image();
                ImageHelper.CopyImage(epi, image);
                product.ProductImages.Add(image);
            }

            if (StockLevel > 0) {
                product.StockedIndicator = 1;
            }
        }
        public List<IImage> GetProductImages(Domain.Product ep) {

            List<IImage> imageList = new List<IImage>();

            foreach (ProductImage epi in ep.Images) {
                IImage image = new Domain.Catalogue.Image();
                ImageHelper.CopyImage(epi, image);
                imageList.Add(image);
            }

            return imageList;
        }