/// <summary> /// Install plugin /// </summary> public override void Install() { //settings var settings = new HomePageNewProductsSettings { // default 4 items NumberOfProducts = 4 }; _settingService.SaveSetting(settings); this.AddOrUpdatePluginLocaleResource("Plugins.Widgets.HomePageNewProducts.NumberOfProducts", "Number Of Products: "); this.AddOrUpdatePluginLocaleResource("Plugins.Widgets.HomePageNewProducts.NumberOfProducts.Hint", "Specify the number of Products to be shown"); base.Install(); }
/// <summary> /// Install plugin /// </summary> public override void Install() { //settings var settings = new HomePageNewProductsSettings { ProductsCount = DefaultShownProductsCount, SelectedZone = PublicWidgetZones.HomePageTop }; _settingService.SaveSetting(settings); this.AddOrUpdatePluginLocaleResource(LocalConstants.LatestProductsLacaleKey, LatestProductsLacaleDefaultValue); this.AddOrUpdatePluginLocaleResource(LocalConstants.ProductsCountLocaleKey, ProductsCountDefaultLacaleValue); this.AddOrUpdatePluginLocaleResource(LocalConstants.SelectZoneLocaleKey, SelectZoneDefaultLacaleValue); this.AddOrUpdatePluginLocaleResource(LocalConstants.AddedOnLocaleKey, DateAddedDefaultLacaleValue); base.Install(); }
public HomePageNewProductsPlugin(IWebHelper webHelper, ISettingService settingService, HomePageNewProductsSettings homePageNewProductsSettings) { this._settingService = settingService; this._homePageNewProductsSettings = homePageNewProductsSettings; this._webHelper = webHelper; }