public override void Install() { var settings = new ProductMessageSettings { Message = "50% discount in December" }; _settingService.SaveSetting(settings); this.AddOrUpdatePluginLocaleResource("Plugins.Widgets.ProductMessage.Message", "Message"); this.AddOrUpdatePluginLocaleResource("Plugins.Widgets.ProductMessage.Message.Hint", "Enter a message to display on product details page."); base.Install(); }
/// <summary> /// Install plugin /// </summary> public override void Install() { //settings var settings = new ProductMessageSettings { MessageText = "" }; _settingService.SaveSetting(settings); this.AddOrUpdatePluginLocaleResource("Plugins.Widgets.ProductMessage.MessageText", "Product message"); this.AddOrUpdatePluginLocaleResource("Plugins.Widgets.ProductMessage.MessageText.Hint", "Enter product message (e.g. 50% discount in December or Free shipping this weekend)"); this.AddOrUpdatePluginLocaleResource("Plugins.Widgets.ProductMessage.Instructions", "This plugin displays a message at the bottom of all the product detail pages in your store.</p>"); base.Install(); }
public ProductMessagePlugin(IWebHelper webHelper, ISettingService settingService, ProductMessageSettings productMessageSettings) { this._webHelper = webHelper; this._settingService = settingService; }