public ActionResult Configure()
        {
            var model = new FeedFroogleModel();
            model.Copy(_googleService.Settings, true);

            if (TempData["GenerateFeedRunning"] != null)
                model.IsRunning = (bool)TempData["GenerateFeedRunning"];

            _googleService.SetupModel(model);

            return View(model);
        }
        public ActionResult Configure(FeedFroogleModel model)
        {
            if (!ModelState.IsValid)
                return Configure();

            model.Copy(_googleService.Settings, false);
            _settingService.SaveSetting(_googleService.Settings);

            _googleService.Helper.UpdateScheduleTask(model.TaskEnabled, model.GenerateStaticFileEachMinutes * 60);

            NotifySuccess(_googleService.Helper.GetResource("ConfigSaveNote"), true);

            _googleService.SetupModel(model);

            return View(model);
        }
Exemplo n.º 3
0
        public void SetupModel(FeedFroogleModel model)
        {
            Helper.SetupConfigModel(model, "FeedFroogle");

            //model.GenerateStaticFileEachMinutes = Helper.ScheduleTask.Seconds / 60;
            model.TaskEnabled = Helper.ScheduleTask.Enabled;
            model.ScheduleTaskId = Helper.ScheduleTask.Id;

            model.AvailableCurrencies = Helper.AvailableCurrencies();
            model.AvailableGoogleCategories = GetTaxonomyList();

            var urlHelper = new UrlHelper(HttpContext.Current.Request.RequestContext);
            model.GridEditUrl = urlHelper.Action("GoogleProductEdit", "FeedFroogle",
                new { Namespaces = "SmartStore.GoogleMerchantCenter.Controllers", area = "SmartStore.GoogleMerchantCenter" });

            model.GridPageSize = _adminAreaSettings.GridPageSize;
        }