public ProductDetailsModel() { DefaultPictureModel = new PictureModel(); PictureModels = new List <PictureModel>(); AssociatedProducts = new List <ProductDetailsModel>(); Breadcrumb = new ProductBreadcrumbModel(); ProductTags = new List <ProductTagModel>(); ProductReviewOverview = new ProductReviewOverviewModel(); }
public ProductDetailsModel() { GiftCard = new GiftCardModel(); ProductPrice = new ProductPriceModel(); AddToCart = new AddToCartModel(); ProductAttributes = new List <ProductAttributeModel>(); AssociatedProducts = new List <ProductDetailsModel>(); VendorModel = new VendorBriefInfoModel(); Breadcrumb = new ProductBreadcrumbModel(); ProductTags = new List <ProductTagModel>(); ProductSpecifications = new List <ProductSpecificationModel>(); ProductManufacturers = new List <ManufacturerBriefInfoModel>(); ProductReviewOverview = new ProductReviewOverviewModel(); TierPrices = new List <TierPriceModel>(); }
public ProductDetailsModel() { DefaultPictureModel = new PictureModel(); PictureModels = new List<PictureModel>(); GiftCard = new GiftCardModel(); ProductPrice = new ProductPriceModel(); AddToCart = new AddToCartModel(); ProductAttributes = new List<ProductAttributeModel>(); AssociatedProducts = new List<ProductDetailsModel>(); VendorModel = new VendorBriefInfoModel(); Breadcrumb = new ProductBreadcrumbModel(); ProductTags = new List<ProductTagModel>(); ProductSpecifications= new List<ProductSpecificationModel>(); ProductManufacturers = new List<ManufacturerModel>(); ProductReviewOverview = new ProductReviewOverviewModel(); TierPrices = new List<TierPriceModel>(); }
public ProductDetailsModel() { DefaultPictureModel = new PictureModel(); PictureModels = new List <PictureModel>(); GiftCard = new GiftCardModel(); ProductPrice = new ProductPriceModel(); AddToCart = new AddToCartModel(); ProductAttributes = new List <ProductAttributeModel>(); AssociatedProducts = new List <ProductDetailsModel>(); VendorModel = new VendorBriefInfoModel(); Breadcrumb = new ProductBreadcrumbModel(); ProductTags = new List <ProductTagModel>(); ProductSpecifications = new List <ProductSpecificationModel>(); ProductManufacturers = new List <ManufacturerModel>(); ProductReviewOverview = new ProductReviewOverviewModel(); TierPrices = new List <TierPriceModel>(); Parameters = new List <SelectListItem>(); ProductBundleModels = new List <ProductBundleModel>(); ProductWarehouses = new List <ProductWarehouseModel>(); }
protected ProductBreadcrumbModel PrepareProductBreadcrumbModel(int productId) { var thirdLevelCategories = _categoryService.GetCategoriesByProductId(productId); var thirdLevelCategory = thirdLevelCategories.Where(x => x.Visible == true).FirstOrDefault(); var secondLevelCategory = thirdLevelCategory != null?_categoryService.GetCategory(thirdLevelCategory.ParentId.Value) : null; var firstLevelCategory = secondLevelCategory != null?_categoryService.GetCategory(secondLevelCategory.ParentId.Value) : null; var breadcrumbModel = new ProductBreadcrumbModel(); if (firstLevelCategory != null) { breadcrumbModel.BreadCrumb.Add(new ProductBreadcrumbModel { Name = firstLevelCategory.CategoryName, Url = Url.RouteUrl("Category", new { top = firstLevelCategory.UrlRewrite }, Request.Url.Scheme) }); if (secondLevelCategory != null) { breadcrumbModel.BreadCrumb.Add(new ProductBreadcrumbModel { Name = secondLevelCategory.CategoryName, Url = Url.RouteUrl("Category With Products", new { top = firstLevelCategory.UrlRewrite, second = secondLevelCategory.UrlRewrite, third = "" }, Request.Url.Scheme) }); if (thirdLevelCategory != null) { breadcrumbModel.BreadCrumb.Add(new ProductBreadcrumbModel { Name = thirdLevelCategory.CategoryName, Url = Url.RouteUrl("Category With Products", new { top = firstLevelCategory.UrlRewrite, second = secondLevelCategory.UrlRewrite, third = thirdLevelCategory.UrlRewrite }, Request.Url.Scheme) }); } } } return(breadcrumbModel); }