public PriceGrabberService(IProductService productService, ICategoryService categoryService, IManufacturerService manufacturerService, IPictureService pictureService, ICurrencyService currencyService, IWebHelper webHelper, ISettingService settingService, PriceGrabberSettings priceGrabberSettings, CurrencySettings currencySettings) { this._productService = productService; this._categoryService = categoryService; this._manufacturerService = manufacturerService; this._pictureService = pictureService; this._currencyService = currencyService; this._webHelper = webHelper; this._settingService = settingService; this._priceGrabberSettings = priceGrabberSettings; this._currencySettings = currencySettings; }
/// <summary> /// Install plugin /// </summary> public override void Install() { var settings = new PriceGrabberSettings() { ProductPictureSize = 125, }; _settingService.SaveSetting(settings); this.AddOrUpdatePluginLocaleResource("Plugins.Feed.PriceGrabber.ClickHere", "Click here"); this.AddOrUpdatePluginLocaleResource("Plugins.Feed.PriceGrabber.Currency", "Currency"); this.AddOrUpdatePluginLocaleResource("Plugins.Feed.PriceGrabber.Currency.Hint", "Select the default currency that will be used to generate the feed."); this.AddOrUpdatePluginLocaleResource("Plugins.Feed.PriceGrabber.Generate", "Generate feed"); this.AddOrUpdatePluginLocaleResource("Plugins.Feed.PriceGrabber.ProductPictureSize", "Product thumbnail image size"); this.AddOrUpdatePluginLocaleResource("Plugins.Feed.PriceGrabber.ProductPictureSize.Hint", "The default size (pixels) for product thumbnail images."); this.AddOrUpdatePluginLocaleResource("Plugins.Feed.PriceGrabber.SuccessResult", "PriceGrabber feed has been successfully generated. {0} to see generated feed"); base.Install(); }