示例#1
0
        public ActionResult InfoBlock()
        {
            var model = new InfoBlockModel
            {
                SitemapEnabled       = _commonSettings.SitemapEnabled,
                ForumEnabled         = _forumSettings.ForumsEnabled,
                AllowPrivateMessages = _forumSettings.AllowPrivateMessages,
            };

            return(PartialView(model));
        }
示例#2
0
        public ActionResult InfoBlock()
        {
            var model = new InfoBlockModel()
            {
                RecentlyAddedProductsEnabled  = _catalogSettings.RecentlyAddedProductsEnabled,
                RecentlyViewedProductsEnabled = _catalogSettings.RecentlyViewedProductsEnabled,
                CompareProductsEnabled        = _catalogSettings.CompareProductsEnabled,
                BlogEnabled    = _blogSettings.Enabled,
                SitemapEnabled = _commonSettings.SitemapEnabled,
                ForumEnabled   = _forumSettings.ForumsEnabled
            };

            return(PartialView(model));
        }
示例#3
0
        public ActionResult InfoBlock()
        {
            var customer = _workContext.CurrentCustomer;

            var model = new InfoBlockModel()
            {
                RecentlyAddedProductsEnabled  = _catalogSettings.RecentlyAddedProductsEnabled,
                RecentlyViewedProductsEnabled = _catalogSettings.RecentlyViewedProductsEnabled,
                CompareProductsEnabled        = _catalogSettings.CompareProductsEnabled,
                BlogEnabled          = _blogSettings.Enabled,
                NewsEnabled          = _newsSettings.Enabled,
                SitemapEnabled       = _commonSettings.SitemapEnabled,
                ForumEnabled         = _forumSettings.ForumsEnabled,
                AllowPrivateMessages = customer.IsRegistered() && _forumSettings.AllowPrivateMessages,
            };

            return(PartialView(model));
        }