/// <summary>
        /// Install the plugin
        /// </summary>
        public override void Install()
        {            
            var shippingByTotalSettings = new ShippingByTotalSettings()
            {
                LimitMethodsToCreated = false,
                SmallQuantityThreshold = 0,
                SmallQuantitySurcharge = 0
            };
            _settingService.SaveSetting(shippingByTotalSettings);

            _localizationService.ImportPluginResourcesFromXml(this.PluginDescriptor);

            base.Install();

            _logger.Information(string.Format("Plugin installed: SystemName: {0}, Version: {1}, Description: '{2}'", PluginDescriptor.SystemName, PluginDescriptor.Version, PluginDescriptor.FriendlyName));
        }
Exemple #2
0
        /// <summary>
        /// Install the plugin
        /// </summary>
        public override void Install()
        {
            var shippingByTotalSettings = new ShippingByTotalSettings()
            {
                LimitMethodsToCreated  = false,
                SmallQuantityThreshold = 0,
                SmallQuantitySurcharge = 0
            };

            _settingService.SaveSetting(shippingByTotalSettings);

            _localizationService.ImportPluginResourcesFromXml(this.PluginDescriptor);

            base.Install();

            _logger.Info(string.Format("Plugin installed: SystemName: {0}, Version: {1}, Description: '{2}'", PluginDescriptor.SystemName, PluginDescriptor.Version, PluginDescriptor.FriendlyName));
        }
 /// <summary>
 /// Ctor
 /// </summary>
 /// <param name="shippingService">Shipping service</param>
 /// <param name="shippingByTotalService">ShippingByTotal service</param>
 /// <param name="shippingByTotalSettings">ShippingByTotal settings</param>
 /// <param name="objectContext">ShippingByTotal object context</param>
 /// <param name="priceCalculationService">PriceCalculation service</param>
 /// <param name="settingService">Settings service</param>
 /// <param name="logger">Logger</param>
 public ByTotalProvider(IShippingService shippingService,
                        IStoreContext storeContext,
                        IShippingByTotalService shippingByTotalService,
                        ShippingByTotalSettings shippingByTotalSettings,
                        IPriceCalculationService priceCalculationService,
                        ILogger logger,
                        ISettingService settingService,
                        ILocalizationService localizationService)
 {
     this._shippingService         = shippingService;
     this._storeContext            = storeContext;
     this._shippingByTotalService  = shippingByTotalService;
     this._shippingByTotalSettings = shippingByTotalSettings;
     this._priceCalculationService = priceCalculationService;
     this._logger              = logger;
     this._settingService      = settingService;
     this._localizationService = localizationService;
 }
        /// <summary>
        /// Ctor
        /// </summary>
        /// <param name="shippingService">Shipping service</param>
        /// <param name="shippingByTotalService">ShippingByTotal service</param>
        /// <param name="shippingByTotalSettings">ShippingByTotal settings</param>
        /// <param name="objectContext">ShippingByTotal object context</param>
        /// <param name="priceCalculationService">PriceCalculation service</param>
        /// <param name="settingService">Settings service</param>
        /// <param name="logger">Logger</param>
        public ByTotalProvider(IShippingService shippingService,
			IStoreContext storeContext,
            IShippingByTotalService shippingByTotalService,
            ShippingByTotalSettings shippingByTotalSettings,
            IPriceCalculationService priceCalculationService,
            ILogger logger,
            ISettingService settingService,
            ILocalizationService localizationService)
        {
            this._shippingService = shippingService;
            this._storeContext = storeContext;
            this._shippingByTotalService = shippingByTotalService;
            this._shippingByTotalSettings = shippingByTotalSettings;
            this._priceCalculationService = priceCalculationService;
            this._logger = logger;
            this._settingService = settingService;
            this._localizationService = localizationService;
        }