Ejemplo n.º 1
0
        /// <summary>
        /// Install plugin
        /// </summary>
        public override void Install()
        {
            //settings
            var settings = new ProductDetailMessageSettings
            {
                Message = ""
            };

            _settingService.SaveSetting(settings);

            this.AddOrUpdatePluginLocaleResource("Plugins.Widgets.ProductDetailMessage.Message", "Message");
            this.AddOrUpdatePluginLocaleResource("Plugins.Widgets.ProductDetailMessage.Message.Hint", "Enter your Message here.");

            base.Install();
        }
Ejemplo n.º 2
0
        public override void Install()
        {
            var settings = new ProductDetailMessageSettings
            {
                Message   = "50% discount in December",
                IsEnabled = true
            };

            _settingService.SaveSetting(settings);

            foreach (var locale in _locales)
            {
                _localizationService.AddOrUpdatePluginLocaleResource(locale.Key, locale.Value);
            }
            base.Install();
        }