public FixedOrByCountryStateZipTaxProvider(FixedOrByCountryStateZipTaxSettings countryStateZipSettings, ICacheKeyService cacheKeyService, ICountryStateZipService taxRateService, IGenericAttributeService genericAttributeService, IHttpContextAccessor httpContextAccessor, ILocalizationService localizationService, IOrderTotalCalculationService orderTotalCalculationService, IPaymentService paymentService, ISettingService settingService, IStaticCacheManager staticCacheManager, ITaxCategoryService taxCategoryService, ITaxService taxService, IWebHelper webHelper, TaxSettings taxSettings) { _countryStateZipSettings = countryStateZipSettings; _cacheKeyService = cacheKeyService; _taxRateService = taxRateService; _genericAttributeService = genericAttributeService; _httpContextAccessor = httpContextAccessor; _localizationService = localizationService; _orderTotalCalculationService = orderTotalCalculationService; _paymentService = paymentService; _settingService = settingService; _staticCacheManager = staticCacheManager; _taxCategoryService = taxCategoryService; _taxService = taxService; _webHelper = webHelper; _taxSettings = taxSettings; }
/// <summary> /// Install plugin /// </summary> public override void Install() { //database objects _objectContext.Install(); //settings var settings = new FixedOrByCountryStateZipTaxSettings { CountryStateZipEnabled = false }; _settingService.SaveSetting(settings); //locales this.AddOrUpdatePluginLocaleResource("Plugins.Tax.FixedOrByCountryStateZip.Fixed", "Fixed rate"); this.AddOrUpdatePluginLocaleResource("Plugins.Tax.FixedOrByCountryStateZip.TaxByCountryStateZip", "By Country"); this.AddOrUpdatePluginLocaleResource("Plugins.Tax.FixedOrByCountryStateZip.Fields.TaxCategoryName", "Tax category"); this.AddOrUpdatePluginLocaleResource("Plugins.Tax.FixedOrByCountryStateZip.Fields.Rate", "Rate"); this.AddOrUpdatePluginLocaleResource("Plugins.Tax.FixedOrByCountryStateZip.Fields.Store", "Store"); this.AddOrUpdatePluginLocaleResource("Plugins.Tax.FixedOrByCountryStateZip.Fields.Store.Hint", "If an asterisk is selected, then this shipping rate will apply to all stores."); this.AddOrUpdatePluginLocaleResource("Plugins.Tax.FixedOrByCountryStateZip.Fields.Country", "Country"); this.AddOrUpdatePluginLocaleResource("Plugins.Tax.FixedOrByCountryStateZip.Fields.Country.Hint", "The country."); this.AddOrUpdatePluginLocaleResource("Plugins.Tax.FixedOrByCountryStateZip.Fields.StateProvince", "State / province"); this.AddOrUpdatePluginLocaleResource("Plugins.Tax.FixedOrByCountryStateZip.Fields.StateProvince.Hint", "If an asterisk is selected, then this tax rate will apply to all customers from the given country, regardless of the state."); this.AddOrUpdatePluginLocaleResource("Plugins.Tax.FixedOrByCountryStateZip.Fields.Zip", "Zip"); this.AddOrUpdatePluginLocaleResource("Plugins.Tax.FixedOrByCountryStateZip.Fields.Zip.Hint", "Zip / postal code. If zip is empty, then this tax rate will apply to all customers from the given country or state, regardless of the zip code."); this.AddOrUpdatePluginLocaleResource("Plugins.Tax.FixedOrByCountryStateZip.Fields.TaxCategory", "Tax category"); this.AddOrUpdatePluginLocaleResource("Plugins.Tax.FixedOrByCountryStateZip.Fields.TaxCategory.Hint", "The tax category."); this.AddOrUpdatePluginLocaleResource("Plugins.Tax.FixedOrByCountryStateZip.Fields.Percentage", "Percentage"); this.AddOrUpdatePluginLocaleResource("Plugins.Tax.FixedOrByCountryStateZip.Fields.Percentage.Hint", "The tax rate."); this.AddOrUpdatePluginLocaleResource("Plugins.Tax.FixedOrByCountryStateZip.AddRecord", "Add tax rate"); this.AddOrUpdatePluginLocaleResource("Plugins.Tax.FixedOrByCountryStateZip.AddRecordTitle", "New tax rate"); base.Install(); }
public FixedOrByCountryStateZipTaxProvider(ICountryStateZipService taxRateService, IStoreContext storeContext, CountryStateZipObjectContext objectContext, ICacheManager cacheManager, ISettingService settingService, FixedOrByCountryStateZipTaxSettings countryStateZipSettings) { this._taxRateService = taxRateService; this._storeContext = storeContext; this._objectContext = objectContext; this._cacheManager = cacheManager; this._settingService = settingService; this._countryStateZipSettings = countryStateZipSettings; }
public FixedOrByCountryStateZipTaxProvider(FixedOrByCountryStateZipTaxSettings countryStateZipSettings, ICountryStateZipService taxRateService, ILocalizationService localizationService, ISettingService settingService, IStaticCacheManager cacheManager, ITaxCategoryService taxCategoryService, IWebHelper webHelper) { _countryStateZipSettings = countryStateZipSettings; _taxRateService = taxRateService; _localizationService = localizationService; _settingService = settingService; _cacheManager = cacheManager; _taxCategoryService = taxCategoryService; _webHelper = webHelper; }
public FixedOrByCountryStateZipTaxProvider(CountryStateZipObjectContext objectContext, FixedOrByCountryStateZipTaxSettings countryStateZipSettings, ICountryStateZipService taxRateService, ILocalizationService localizationService, ISettingService settingService, IStaticCacheManager cacheManager, ITaxCategoryService taxCategoryService, IWebHelper webHelper) { this._objectContext = objectContext; this._countryStateZipSettings = countryStateZipSettings; this._taxRateService = taxRateService; this._localizationService = localizationService; this._settingService = settingService; this._cacheManager = cacheManager; this._taxCategoryService = taxCategoryService; this._webHelper = webHelper; }