void OnHyperlinkClick(object sender, RoutedEventArgs e)
        {
            Hyperlink link = sender as Hyperlink;

            if (link == null)
            {
                return;
            }

            IBreadcrumb breadcrumb = link.DataContext as IBreadcrumb;

            if (breadcrumb == null)
            {
                return;
            }

            BreadcrumbTrailViewModel breadcrumbTrail = base.DataContext as BreadcrumbTrailViewModel;

            if (breadcrumbTrail == null)
            {
                return;
            }

            breadcrumbTrail.MoveBackTo(breadcrumb);
        }
 public ProductController(
     SmartDbContext db,
     IProductService productService,
     IProductTagService productTagService,
     IRecentlyViewedProductsService recentlyViewedProductsService,
     IProductCompareService productCompareService,
     IAclService aclService,
     IStoreMappingService storeMappingService,
     ICatalogSearchService catalogSearchService,
     MediaSettings mediaSettings,
     CatalogSettings catalogSettings,
     CatalogHelper helper,
     IBreadcrumb breadcrumb)
 {
     _db                            = db;
     _productService                = productService;
     _productTagService             = productTagService;
     _recentlyViewedProductsService = recentlyViewedProductsService;
     _productCompareService         = productCompareService;
     _aclService                    = aclService;
     _storeMappingService           = storeMappingService;
     _catalogSearchService          = catalogSearchService;
     _mediaSettings                 = mediaSettings;
     _catalogSettings               = catalogSettings;
     _helper                        = helper;
     _breadcrumb                    = breadcrumb;
 }
 public TopicController(
     ITopicService topicService,
     ILocalizationService localizationService,
     IWorkContext workContext,
     IStoreContext storeContext,
     IStoreMappingService storeMappingService,
     IAclService aclService,
     ICacheManager cacheManager,
     SeoSettings seoSettings,
     IBreadcrumb breadcrumb,
     CatalogHelper helper,
     ICookieManager cookieManager)
 {
     _topicService        = topicService;
     _workContext         = workContext;
     _storeContext        = storeContext;
     _storeMappingService = storeMappingService;
     _aclService          = aclService;
     _localizationService = localizationService;
     _cacheManager        = cacheManager;
     _seoSettings         = seoSettings;
     _breadcrumb          = breadcrumb;
     _helper        = helper;
     _cookieManager = cookieManager;
 }
        public void MoveBackTo(IBreadcrumb breadcrumb)
        {
            if (breadcrumb == null)
            {
                throw new ArgumentNullException("breadcrumb");
            }

            if (!_breadcrumbsInternal.Contains(breadcrumb))
            {
                throw new ArgumentException("'breadcrumb' is not in the breadcrumb trail.");
            }

            for (int i = _breadcrumbsInternal.Count - 2; i > -1; --i)
            {
                bool finished = _breadcrumbsInternal[i] == breadcrumb;
                _breadcrumbsInternal.RemoveAt(i);
                if (finished)
                {
                    break;
                }
            }

            _previousSelectedObject = breadcrumb as ViewModelBase;

            _memoryExplorer.PropertyChanged -= this.OnMemoryExplorerPropertyChanged;
            _memoryExplorer.SelectedObject   = breadcrumb as ViewModelBase;
            _memoryExplorer.PropertyChanged += this.OnMemoryExplorerPropertyChanged;
        }
 public CatalogController(
     SmartDbContext db,
     ICategoryService categoryService,
     IManufacturerService manufacturerService,
     IProductService productService,
     IProductTagService productTagService,
     IRecentlyViewedProductsService recentlyViewedProductsService,
     IProductCompareService productCompareService,
     IAclService aclService,
     IStoreMappingService storeMappingService,
     ICatalogSearchService catalogSearchService,
     MediaSettings mediaSettings,
     CatalogSettings catalogSettings,
     CatalogHelper helper,
     IBreadcrumb breadcrumb,
     SeoSettings seoSettings,
     Lazy <IUrlHelper> urlHelper)
 {
     _db = db;
     _categoryService               = categoryService;
     _manufacturerService           = manufacturerService;
     _productService                = productService;
     _productTagService             = productTagService;
     _recentlyViewedProductsService = recentlyViewedProductsService;
     _productCompareService         = productCompareService;
     _aclService           = aclService;
     _storeMappingService  = storeMappingService;
     _catalogSearchService = catalogSearchService;
     _mediaSettings        = mediaSettings;
     _catalogSettings      = catalogSettings;
     _helper      = helper;
     _breadcrumb  = breadcrumb;
     _seoSettings = seoSettings;
     _urlHelper   = urlHelper;
 }
 public ProductController(
     ICommonServices services,
     IProductService productService,
     IProductAttributeService productAttributeService,
     ITaxService taxService,
     IMediaService mediaService,
     ICustomerContentService customerContentService,
     ICustomerService customerService,
     IRecentlyViewedProductsService recentlyViewedProductsService,
     IProductTagService productTagService,
     IOrderReportService orderReportService,
     IBackInStockSubscriptionService backInStockSubscriptionService,
     IAclService aclService,
     IStoreMappingService storeMappingService,
     MediaSettings mediaSettings,
     SeoSettings seoSettings,
     CatalogSettings catalogSettings,
     ShoppingCartSettings shoppingCartSettings,
     LocalizationSettings localizationSettings,
     CaptchaSettings captchaSettings,
     CatalogHelper helper,
     IBreadcrumb breadcrumb,
     Lazy <PrivacySettings> privacySettings,
     Lazy <TaxSettings> taxSettings,
     ILocalizationService localizationService,
     IProductAttributeParser productAttributeParser,
     IDownloadService downloadService,
     ProductUrlHelper productUrlHelper,
     IProductAttributeFormatter productAttributeFormatter)
 {
     _services                       = services;
     _productService                 = productService;
     _productAttributeService        = productAttributeService;
     _taxService                     = taxService;
     _mediaService                   = mediaService;
     _customerContentService         = customerContentService;
     _customerService                = customerService;
     _recentlyViewedProductsService  = recentlyViewedProductsService;
     _productTagService              = productTagService;
     _orderReportService             = orderReportService;
     _backInStockSubscriptionService = backInStockSubscriptionService;
     _aclService                     = aclService;
     _storeMappingService            = storeMappingService;
     _mediaSettings                  = mediaSettings;
     _seoSettings                    = seoSettings;
     _catalogSettings                = catalogSettings;
     _shoppingCartSettings           = shoppingCartSettings;
     _localizationSettings           = localizationSettings;
     _captchaSettings                = captchaSettings;
     _helper                    = helper;
     _breadcrumb                = breadcrumb;
     _privacySettings           = privacySettings;
     _taxSettings               = taxSettings;
     _localizationService       = localizationService;
     _downloadService           = downloadService;
     _productAttributeParser    = productAttributeParser;
     _productUrlHelper          = productUrlHelper;
     _productAttributeFormatter = productAttributeFormatter;
 }
        public CommonController(
            ICommonServices services,
            ITopicService topicService,
            Lazy <ILanguageService> languageService,
            Lazy <ICurrencyService> currencyService,
            IThemeContext themeContext,
            Lazy <IThemeRegistry> themeRegistry,
            Lazy <IForumService> forumService,
            Lazy <IGenericAttributeService> genericAttributeService,
            Lazy <IMobileDeviceHelper> mobileDeviceHelper,
            Lazy <IUrlRecordService> urlRecordService,
            IPageAssetsBuilder pageAssetsBuilder,
            Lazy <IPictureService> pictureService,
            Lazy <IManufacturerService> manufacturerService,
            CustomerSettings customerSettings,
            PrivacySettings privacySettings,
            TaxSettings taxSettings,
            CatalogSettings catalogSettings,
            ShoppingCartSettings shoppingCartSettings,
            EmailAccountSettings emailAccountSettings,
            CommonSettings commonSettings,
            NewsSettings newsSettings,
            BlogSettings blogSettings,
            ForumSettings forumSettings,
            LocalizationSettings localizationSettings,
            Lazy <SocialSettings> socialSettings,
            ThemeSettings themeSettings,
            IBreadcrumb breadcrumb)
        {
            _services                = services;
            _topicService            = topicService;
            _languageService         = languageService;
            _currencyService         = currencyService;
            _themeContext            = themeContext;
            _themeRegistry           = themeRegistry;
            _forumservice            = forumService;
            _genericAttributeService = genericAttributeService;
            _urlRecordService        = urlRecordService;
            _pageAssetsBuilder       = pageAssetsBuilder;
            _pictureService          = pictureService;
            _manufacturerService     = manufacturerService;

            _customerSettings     = customerSettings;
            _privacySettings      = privacySettings;
            _taxSettings          = taxSettings;
            _catalogSettings      = catalogSettings;
            _shoppingCartSettings = shoppingCartSettings;
            _commonSettings       = commonSettings;
            _newsSettings         = newsSettings;
            _blogSettings         = blogSettings;
            _forumSettings        = forumSettings;
            _localizationSettings = localizationSettings;
            _socialSettings       = socialSettings;
            _themeSettings        = themeSettings;

            _breadcrumb = breadcrumb;
        }
 public ProductController(
     SmartDbContext db,
     IWebHelper webHelper,
     IProductService productService,
     IProductTagService productTagService,
     IProductAttributeService productAttributeService,
     IRecentlyViewedProductsService recentlyViewedProductsService,
     IProductCompareService productCompareService,
     IAclService aclService,
     IStoreMappingService storeMappingService,
     ICatalogSearchService catalogSearchService,
     IMediaService mediaService,
     ICustomerService customerService,
     MediaSettings mediaSettings,
     CatalogSettings catalogSettings,
     CatalogHelper helper,
     IBreadcrumb breadcrumb,
     SeoSettings seoSettings,
     ContactDataSettings contactDataSettings,
     CaptchaSettings captchaSettings,
     LocalizationSettings localizationSettings,
     PrivacySettings privacySettings,
     Lazy <IUrlHelper> urlHelper,
     Lazy <IMessageFactory> messageFactory,
     Lazy <ProductUrlHelper> productUrlHelper,
     Lazy <IProductAttributeFormatter> productAttributeFormatter,
     Lazy <IProductAttributeMaterializer> productAttributeMaterializer)
 {
     _db                            = db;
     _webHelper                     = webHelper;
     _productService                = productService;
     _productTagService             = productTagService;
     _productAttributeService       = productAttributeService;
     _recentlyViewedProductsService = recentlyViewedProductsService;
     _productCompareService         = productCompareService;
     _aclService                    = aclService;
     _storeMappingService           = storeMappingService;
     _catalogSearchService          = catalogSearchService;
     _mediaService                  = mediaService;
     _customerService               = customerService;
     _mediaSettings                 = mediaSettings;
     _catalogSettings               = catalogSettings;
     _helper                        = helper;
     _breadcrumb                    = breadcrumb;
     _seoSettings                   = seoSettings;
     _contactDataSettings           = contactDataSettings;
     _captchaSettings               = captchaSettings;
     _localizationSettings          = localizationSettings;
     _privacySettings               = privacySettings;
     _urlHelper                     = urlHelper;
     _messageFactory                = messageFactory;
     _productUrlHelper              = productUrlHelper;
     _productAttributeFormatter     = productAttributeFormatter;
     _productAttributeMaterializer  = productAttributeMaterializer;
 }
 public MenuController(
     IMenuService menuService,
     IBreadcrumb breadcrumb,
     CatalogSettings catalogSettings,
     CatalogHelper catalogHelper)
 {
     _menuService     = menuService;
     _breadcrumb      = breadcrumb;
     _catalogSettings = catalogSettings;
     _catalogHelper   = catalogHelper;
 }
        void AddItemToTrail(IBreadcrumb breadcrumb)
        {
            int idx = _breadcrumbsInternal.Count - 1;

            if (idx < 0)
            {
                Debug.Fail("Insertion index should never be less than zero.");
                idx = 0;
            }

            _breadcrumbsInternal.Insert(idx, breadcrumb);
        }
 public string GetBreadcrumbLink(IBreadcrumb breadcrumb)
 {
     if (breadcrumb.IsCategory)
     {
         return(ECommerceContext.Get(ECommerceContext.URL_PREFIX) + breadcrumb.CategoryRef.Path);
     }
     else
     {
         // Facet
         IList <FacetParameter> selectedFacets = (IList <FacetParameter>)ECommerceContext.Get(ECommerceContext.FACETS);
         return(this.GetRemoveFacetLink(breadcrumb.Facet, selectedFacets));
     }
 }
        //private readonly ICookieManager _cookieManager;

        public TopicController(
            IAclService aclService,
            IStoreMappingService storeMappingService,
            SeoSettings seoSettings,
            IBreadcrumb breadcrumb,
            CatalogHelper helper)
        {
            _aclService          = aclService;
            _storeMappingService = storeMappingService;
            _seoSettings         = seoSettings;
            _breadcrumb          = breadcrumb;
            _helper = helper;
        }
Exemple #13
0
 public CatalogController(
     ICommonServices services,
     ICategoryService categoryService,
     IManufacturerService manufacturerService,
     IProductService productService,
     ICategoryTemplateService categoryTemplateService,
     IManufacturerTemplateService manufacturerTemplateService,
     ICurrencyService currencyService,
     IOrderReportService orderReportService,
     IProductTagService productTagService,
     IRecentlyViewedProductsService recentlyViewedProductsService,
     IPictureService pictureService,
     IPriceFormatter priceFormatter,
     ISpecificationAttributeService specificationAttributeService,
     ICompareProductsService compareProductsService,
     IGenericAttributeService genericAttributeService,
     IAclService aclService,
     IStoreMappingService storeMappingService,
     ICatalogSearchService catalogSearchService,
     MediaSettings mediaSettings,
     CatalogSettings catalogSettings,
     Lazy <ILanguageService> languageService,
     CatalogHelper helper,
     IBreadcrumb breadcrumb,
     IPromotionProductsService promotionService)
 {
     _services                      = services;
     _categoryService               = categoryService;
     _manufacturerService           = manufacturerService;
     _productService                = productService;
     _categoryTemplateService       = categoryTemplateService;
     _manufacturerTemplateService   = manufacturerTemplateService;
     _currencyService               = currencyService;
     _orderReportService            = orderReportService;
     _productTagService             = productTagService;
     _recentlyViewedProductsService = recentlyViewedProductsService;
     _compareProductsService        = compareProductsService;
     _pictureService                = pictureService;
     _priceFormatter                = priceFormatter;
     _specificationAttributeService = specificationAttributeService;
     _genericAttributeService       = genericAttributeService;
     _aclService                    = aclService;
     _storeMappingService           = storeMappingService;
     _catalogSearchService          = catalogSearchService;
     _mediaSettings                 = mediaSettings;
     _catalogSettings               = catalogSettings;
     _languageService               = languageService;
     _helper                = helper;
     _breadcrumb            = breadcrumb;
     this._promotionService = promotionService;
 }
        // TODO: (mh) (core) Remove or move this to helper class.
        private async Task GetBreadcrumbAsync(IBreadcrumb breadcrumb, ViewContext context, Product product = null)
        {
            var menu = await _menuService.GetMenuAsync("Main");

            // TODO: (mh) (core) Remove test code.
            // BEGIN: Manipulate Context to see some test results
            //context.RouteData.Values.Add("currentCategoryId", 1794);
            context.RouteData.Values.Add("currentProductId", product != null ? product.Id : 0);
            // END: Manipulate Context

            var currentNode = await menu.ResolveCurrentNodeAsync(context);

            if (currentNode != null)
            {
                currentNode.Trail.Where(x => !x.IsRoot).Each(x => breadcrumb.Track(x.Value));
            }

            // Add trail of parent product if product has no category assigned.
            if (product != null && !(breadcrumb.Trail?.Any() ?? false))
            {
                var parentProduct = await _db.Products
                                    .AsNoTracking()
                                    .FirstOrDefaultAsync(x => x.Id == product.ParentGroupedProductId);

                if (parentProduct != null)
                {
                    var fc = new PublicControllerBase();    // TODO: (mh) (core) PublicControllerBase was FakeController.
                    var rd = new RouteData();
                    rd.Values.Add("currentProductId", parentProduct.Id);
                    var fcc = new ControllerContext(new ActionContext(context.HttpContext, rd, context.ActionDescriptor));
                    fc.ControllerContext = fcc;

                    currentNode = await menu.ResolveCurrentNodeAsync(fcc);

                    if (currentNode != null)
                    {
                        currentNode.Trail.Where(x => !x.IsRoot).Each(x => breadcrumb.Track(x.Value));
                        var parentName = parentProduct.GetLocalized(x => x.Name);

                        breadcrumb.Track(new MenuItem
                        {
                            Text     = parentName,
                            Rtl      = parentName.CurrentLanguage.Rtl,
                            EntityId = parentProduct.Id,
                            Url      = await parentProduct.GetActiveSlugAsync()
                        });
                    }
                }
            }
        }
 /// <summary>
 /// Builds the breadcrumbs item.
 /// </summary>
 /// <param name="item">The breadcrumb item.</param>
 /// <param name="isClickable">if set to <c>true</c> [is clickable].</param>
 /// <returns>Breadcrumbs item string.</returns>
 public static String BuildBreadcrumb(IBreadcrumb item, bool isClickable)
 {
     var builder = new StringBuilder("<li>");
     if (!isClickable || String.IsNullOrEmpty(item.Url))
     {
         builder.Append(item.Text);
     }
     else
     {
         builder.AppendFormat(String.Format("<a href=\"{0}\">{1}</a>", item.Url, item.Text));
     }
     builder.Append("</li>");
     return builder.ToString();
 }
        /// <summary>
        /// Builds the breadcrumbs item.
        /// </summary>
        /// <param name="item">The breadcrumb item.</param>
        /// <param name="isClickable">if set to <c>true</c> [is clickable].</param>
        /// <returns>Breadcrumbs item string.</returns>
        public static String BuildBreadcrumb(IBreadcrumb item, bool isClickable)
        {
            var builder = new StringBuilder("<li>");

            if (!isClickable || String.IsNullOrEmpty(item.Url))
            {
                builder.Append(item.Text);
            }
            else
            {
                builder.AppendFormat(String.Format("<a href=\"{0}\">{1}</a>", item.Url, item.Text));
            }
            builder.Append("</li>");
            return(builder.ToString());
        }
Exemple #17
0
 public CatalogController(
     ICommonServices services,
     IMenuService menuService,
     ICategoryService categoryService,
     IManufacturerService manufacturerService,
     IProductService productService,
     ICategoryTemplateService categoryTemplateService,
     IManufacturerTemplateService manufacturerTemplateService,
     IOrderReportService orderReportService,
     IProductTagService productTagService,
     IRecentlyViewedProductsService recentlyViewedProductsService,
     IPictureService pictureService,
     ICompareProductsService compareProductsService,
     IGenericAttributeService genericAttributeService,
     IAclService aclService,
     IStoreMappingService storeMappingService,
     ICatalogSearchService catalogSearchService,
     MediaSettings mediaSettings,
     CatalogSettings catalogSettings,
     CatalogHelper helper,
     IBreadcrumb breadcrumb)
 {
     _services                      = services;
     _menuService                   = menuService;
     _categoryService               = categoryService;
     _manufacturerService           = manufacturerService;
     _productService                = productService;
     _categoryTemplateService       = categoryTemplateService;
     _manufacturerTemplateService   = manufacturerTemplateService;
     _orderReportService            = orderReportService;
     _productTagService             = productTagService;
     _recentlyViewedProductsService = recentlyViewedProductsService;
     _compareProductsService        = compareProductsService;
     _pictureService                = pictureService;
     _genericAttributeService       = genericAttributeService;
     _aclService                    = aclService;
     _storeMappingService           = storeMappingService;
     _catalogSearchService          = catalogSearchService;
     _mediaSettings                 = mediaSettings;
     _catalogSettings               = catalogSettings;
     _helper     = helper;
     _breadcrumb = breadcrumb;
 }
Exemple #18
0
        public async Task GetBreadcrumbAsync(IBreadcrumb breadcrumb, ActionContext context, Product product = null)
        {
            var menu = await _menuService.GetMenuAsync("Main");

            var currentNode = await menu.ResolveCurrentNodeAsync(context);

            if (currentNode != null)
            {
                currentNode.Trail.Where(x => !x.IsRoot).Each(x => breadcrumb.Track(x.Value));
            }

            // Add trail of parent product if product has no category assigned.
            if (product != null && !(breadcrumb.Trail?.Any() ?? false))
            {
                var parentProduct = await _db.Products.FindByIdAsync(product.ParentGroupedProductId, false);

                if (parentProduct != null)
                {
                    var routeData = new RouteData();
                    routeData.Values.Add("currentProductId", parentProduct.Id);
                    var actionContext = new ActionContext(context);

                    currentNode = await menu.ResolveCurrentNodeAsync(actionContext);

                    if (currentNode != null)
                    {
                        currentNode.Trail.Where(x => !x.IsRoot).Each(x => breadcrumb.Track(x.Value));
                        var parentName = parentProduct.GetLocalized(x => x.Name);

                        breadcrumb.Track(new MenuItem
                        {
                            Text     = parentName,
                            Rtl      = parentName.CurrentLanguage.Rtl,
                            EntityId = parentProduct.Id,
                            Url      = _urlHelper.RouteUrl("Product", new { SeName = await parentProduct.GetActiveSlugAsync() })
                        });
                    }
                }
            }
        }
        public void MoveBackTo(IBreadcrumb breadcrumb)
        {
            if (breadcrumb == null)
                throw new ArgumentNullException("breadcrumb");

            if (!_breadcrumbsInternal.Contains(breadcrumb))
                throw new ArgumentException("'breadcrumb' is not in the breadcrumb trail.");

            for (int i = _breadcrumbsInternal.Count - 2; i > -1; --i)
            {
                bool finished = _breadcrumbsInternal[i] == breadcrumb;
                _breadcrumbsInternal.RemoveAt(i);
                if (finished)
                    break;
            }

            _previousSelectedObject = breadcrumb as ViewModelBase;

            _memoryExplorer.PropertyChanged -= this.OnMemoryExplorerPropertyChanged;
            _memoryExplorer.SelectedObject = breadcrumb as ViewModelBase;
            _memoryExplorer.PropertyChanged += this.OnMemoryExplorerPropertyChanged;
        }
Exemple #20
0
        public CommonController(
            ICommonServices services,
            ITopicService topicService,
            Lazy <ILanguageService> languageService,
            Lazy <ICurrencyService> currencyService,
            IThemeContext themeContext,
            Lazy <IThemeRegistry> themeRegistry,
            Lazy <IForumService> forumService,
            Lazy <IGenericAttributeService> genericAttributeService,
            Lazy <IMobileDeviceHelper> mobileDeviceHelper,
            Lazy <ICompareProductsService> compareProductsService,
            Lazy <IUrlRecordService> urlRecordService,
            Lazy <ICatalogSearchService> catalogSearchService,
            StoreInformationSettings storeInfoSettings,
            CustomerSettings customerSettings,
            TaxSettings taxSettings,
            CatalogSettings catalogSettings,
            ShoppingCartSettings shoppingCartSettings,
            EmailAccountSettings emailAccountSettings,
            CommonSettings commonSettings,
            NewsSettings newsSettings,
            BlogSettings blogSettings,
            ForumSettings forumSettings,
            LocalizationSettings localizationSettings,
            Lazy <SecuritySettings> securitySettings,
            Lazy <SocialSettings> socialSettings,
            Lazy <MediaSettings> mediaSettings,
            Lazy <SearchSettings> searchSettings,
            IOrderTotalCalculationService orderTotalCalculationService,
            IPriceFormatter priceFormatter,
            ThemeSettings themeSettings,
            IPageAssetsBuilder pageAssetsBuilder,
            Lazy <IPictureService> pictureService,
            Lazy <IManufacturerService> manufacturerService,
            Lazy <ICategoryService> categoryService,
            Lazy <IProductService> productService,
            Lazy <IShoppingCartService> shoppingCartService,
            IBreadcrumb breadcrumb)
        {
            _services                = services;
            _topicService            = topicService;
            _languageService         = languageService;
            _currencyService         = currencyService;
            _themeContext            = themeContext;
            _themeRegistry           = themeRegistry;
            _forumservice            = forumService;
            _genericAttributeService = genericAttributeService;
            _compareProductsService  = compareProductsService;
            _urlRecordService        = urlRecordService;
            _catalogSearchService    = catalogSearchService;

            _storeInfoSettings    = storeInfoSettings;
            _customerSettings     = customerSettings;
            _taxSettings          = taxSettings;
            _catalogSettings      = catalogSettings;
            _shoppingCartSettings = shoppingCartSettings;
            _commonSettings       = commonSettings;
            _newsSettings         = newsSettings;
            _blogSettings         = blogSettings;
            _forumSettings        = forumSettings;
            _localizationSettings = localizationSettings;
            _securitySettings     = securitySettings;
            _socialSettings       = socialSettings;
            _mediaSettings        = mediaSettings;
            _searchSettings       = searchSettings;

            _orderTotalCalculationService = orderTotalCalculationService;
            _priceFormatter = priceFormatter;

            _themeSettings       = themeSettings;
            _pageAssetsBuilder   = pageAssetsBuilder;
            _pictureService      = pictureService;
            _manufacturerService = manufacturerService;
            _categoryService     = categoryService;
            _productService      = productService;
            _shoppingCartService = shoppingCartService;

            _breadcrumb = breadcrumb;
        }
 /// <summary>
 /// Builds the breadcrumbs.
 /// </summary>
 /// <param name="controller">The controller.</param>
 /// <param name="items">The items.</param>
 public void BuildBreadcrumbs(Controller controller, IBreadcrumb[] items)
 {
     controller.ViewData.Add(new KeyValuePair<String, Object>("Breadcrumbs", items));
 }
        void AddItemToTrail(IBreadcrumb breadcrumb)
        {
            int idx = _breadcrumbsInternal.Count - 1;

            if (idx < 0)
            {
                Debug.Fail("Insertion index should never be less than zero.");
                idx = 0;
            }

            _breadcrumbsInternal.Insert(idx, breadcrumb);
        }
Exemple #23
0
 public ProductController(
     ICommonServices services,
     IManufacturerService manufacturerService,
     IProductService productService,
     IProductAttributeService productAttributeService,
     IProductAttributeParser productAttributeParser,
     ITaxService taxService,
     ICurrencyService currencyService,
     IPictureService pictureService,
     IPriceCalculationService priceCalculationService,
     IPriceFormatter priceFormatter,
     ICustomerContentService customerContentService,
     ICustomerService customerService,
     IShoppingCartService shoppingCartService,
     IRecentlyViewedProductsService recentlyViewedProductsService,
     IWorkflowMessageService workflowMessageService,
     IProductTagService productTagService,
     IOrderReportService orderReportService,
     IBackInStockSubscriptionService backInStockSubscriptionService,
     IAclService aclService,
     IStoreMappingService storeMappingService,
     MediaSettings mediaSettings,
     SeoSettings seoSettings,
     CatalogSettings catalogSettings,
     ShoppingCartSettings shoppingCartSettings,
     LocalizationSettings localizationSettings,
     CaptchaSettings captchaSettings,
     CatalogHelper helper,
     IDownloadService downloadService,
     ILocalizationService localizationService,
     IBreadcrumb breadcrumb)
 {
     _services                       = services;
     _manufacturerService            = manufacturerService;
     _productService                 = productService;
     _productAttributeService        = productAttributeService;
     _productAttributeParser         = productAttributeParser;
     _taxService                     = taxService;
     _currencyService                = currencyService;
     _pictureService                 = pictureService;
     _priceCalculationService        = priceCalculationService;
     _priceFormatter                 = priceFormatter;
     _customerContentService         = customerContentService;
     _customerService                = customerService;
     _shoppingCartService            = shoppingCartService;
     _recentlyViewedProductsService  = recentlyViewedProductsService;
     _workflowMessageService         = workflowMessageService;
     _productTagService              = productTagService;
     _orderReportService             = orderReportService;
     _backInStockSubscriptionService = backInStockSubscriptionService;
     _aclService                     = aclService;
     _storeMappingService            = storeMappingService;
     _mediaSettings                  = mediaSettings;
     _seoSettings                    = seoSettings;
     _catalogSettings                = catalogSettings;
     _shoppingCartSettings           = shoppingCartSettings;
     _localizationSettings           = localizationSettings;
     _captchaSettings                = captchaSettings;
     _helper              = helper;
     _downloadService     = downloadService;
     _localizationService = localizationService;
     _breadcrumb          = breadcrumb;
 }
 public BreadcrumbViewComponent(SmartDbContext db, IMenuService menuService, IBreadcrumb breadcrumb)
 {
     _db          = db;
     _menuService = menuService;
     _breadcrumb  = breadcrumb;
 }