コード例 #1
0
        /// <summary>
        /// Install plugin
        /// </summary>
        /// <returns>A task that represents the asynchronous operation</returns>
        public override async Task InstallAsync()
        {
            //settings
            await _settingService.SaveSettingAsync(new FixedOrByCountryStateZipTaxSettings());

            //locales
            await _localizationService.AddOrUpdateLocaleResourceAsync(new Dictionary <string, string>
            {
                ["Plugins.Tax.FixedOrByCountryStateZip.Fixed"] = "Fixed rate",
                ["Plugins.Tax.FixedOrByCountryStateZip.Tax.Categories.Manage"]     = "Manage tax categories",
                ["Plugins.Tax.FixedOrByCountryStateZip.TaxCategoriesCanNotLoaded"] = "No tax categories can be loaded. You may manage tax categories by <a href='{0}'>this link</a>",
                ["Plugins.Tax.FixedOrByCountryStateZip.TaxByCountryStateZip"]      = "By Country",
                ["Plugins.Tax.FixedOrByCountryStateZip.Fields.TaxCategoryName"]    = "Tax category",
                ["Plugins.Tax.FixedOrByCountryStateZip.Fields.Rate"]               = "Rate",
                ["Plugins.Tax.FixedOrByCountryStateZip.Fields.Store"]              = "Store",
                ["Plugins.Tax.FixedOrByCountryStateZip.Fields.Store.Hint"]         = "If an asterisk is selected, then this shipping rate will apply to all stores.",
                ["Plugins.Tax.FixedOrByCountryStateZip.Fields.Country"]            = "Country",
                ["Plugins.Tax.FixedOrByCountryStateZip.Fields.Country.Hint"]       = "The country.",
                ["Plugins.Tax.FixedOrByCountryStateZip.Fields.StateProvince"]      = "State / province",
                ["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.",
                ["Plugins.Tax.FixedOrByCountryStateZip.Fields.Zip"]              = "Zip",
                ["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.",
                ["Plugins.Tax.FixedOrByCountryStateZip.Fields.TaxCategory"]      = "Tax category",
                ["Plugins.Tax.FixedOrByCountryStateZip.Fields.TaxCategory.Hint"] = "The tax category.",
                ["Plugins.Tax.FixedOrByCountryStateZip.Fields.Percentage"]       = "Percentage",
                ["Plugins.Tax.FixedOrByCountryStateZip.Fields.Percentage.Hint"]  = "The tax rate.",
                ["Plugins.Tax.FixedOrByCountryStateZip.AddRecord"]      = "Add tax rate",
                ["Plugins.Tax.FixedOrByCountryStateZip.AddRecordTitle"] = "New tax rate"
            });

            await base.InstallAsync();
        }
        public override async Task InstallAsync()
        {
            var settings = new PayuPaymentSettings()
            {
                MerchantId    = "",
                Key           = "",
                MerchantParam = "",
                PayUri        = "https://sandboxsecure.payu.in/_payment",
                AdditionalFee = 0,
            };

            _settingService.SaveSettingAsync(settings);

            //locales
            await _localizationService.AddOrUpdateLocaleResourceAsync(new Dictionary <string, string>
            {
                ["Plugins.Payments.Payu.RedirectionTip"]                      = "You will be redirected to Payu site to complete the order.",
                ["Plugins.Payments.Payu.Fields.MerchantId"]                   = "Key",
                ["Plugins.Payments.Payu.Fields.MerchantId.Hint"]              = "Enter Key.",
                ["Plugins.Payments.Payu.Fields.Key"]                          = "Salt",
                ["Plugins.Payments.Payu.Fields.Key.Hint"]                     = "Enter salt.",
                ["Plugins.Payments.Payu.Fields.MerchantParam"]                = "Merchant Param",
                ["Plugins.Payments.Payu.Fields.MerchantParam.Hint"]           = "Enter merchant param.",
                ["Plugins.Payments.Payu.Fields.PayUri"]                       = "Pay URI",
                ["Plugins.Payments.Payu.Fields.PayUri.Hint"]                  = "Enter Pay URI.",
                ["Plugins.Payments.Payu.Fields.AdditionalFee"]                = "Additional fee",
                ["Plugins.Payments.Payu.Fields.AdditionalFee.Hint"]           = "Enter additional fee to charge your customers.",
                ["Plugins.Payments.Payu.Fields.AdditionalFeePercentage"]      = "Additional fee.Use percentage",
                ["Plugins.Payments.Payu.Fields.AdditionalFeePercentage.Hint"] = "Determines whether to apply a percentage additional fee to the order total. If not enabled, a fixed value is used.",
            });


            await base.InstallAsync();
        }
コード例 #3
0
        /// <summary>
        /// Install plugin
        /// </summary>
        /// <returns>A task that represents the asynchronous operation</returns>
        public override async Task InstallAsync()
        {
            //settings
            var settings = new ShipStationSettings
            {
                PackingPackageVolume = 5184
            };
            await _settingService.SaveSettingAsync(settings);

            //locales
            await _localizationService.AddOrUpdateLocaleResourceAsync(new Dictionary <string, string>
            {
                ["Enums.Nop.Plugin.Shipping.ShipStation.PackingType.PackByDimensions"] = "Pack by dimensions",
                ["Enums.Nop.Plugin.Shipping.ShipStation.PackingType.PackByVolume"]     = "Pack by volume",
                ["Plugins.Shipping.ShipStation.Fields.ApiKey.Hint"]               = "Specify ShipStation API key.",
                ["Plugins.Shipping.ShipStation.Fields.ApiKey"]                    = "API key",
                ["Plugins.Shipping.ShipStation.Fields.ApiSecret.Hint"]            = "Specify ShipStation API secret.",
                ["Plugins.Shipping.ShipStation.Fields.ApiSecret"]                 = "API secret",
                ["Plugins.Shipping.ShipStation.Fields.PackingPackageVolume.Hint"] = "Enter your package volume.",
                ["Plugins.Shipping.ShipStation.Fields.PackingPackageVolume"]      = "Package volume",
                ["Plugins.Shipping.ShipStation.Fields.PackingType.Hint"]          = "Choose preferred packing type.",
                ["Plugins.Shipping.ShipStation.Fields.PackingType"]               = "Packing type",
                ["Plugins.Shipping.ShipStation.Fields.Password.Hint"]             = "Specify ShipStation password",
                ["Plugins.Shipping.ShipStation.Fields.Password"]                  = "******",
                ["Plugins.Shipping.ShipStation.Fields.PassDimensions.Hint"]       = "Check if need send dimensions to the ShipStation server",
                ["Plugins.Shipping.ShipStation.Fields.PassDimensions"]            = "Pass dimensions",
                ["Plugins.Shipping.ShipStation.Fields.UserName"]                  = "******",
                ["Plugins.Shipping.ShipStation.Fields.UserName.Hint"]             = "Specify ShipStation user name"
            });

            await base.InstallAsync();
        }
コード例 #4
0
        /// <summary>
        /// Install the plugin
        /// </summary>
        /// <returns>A task that represents the asynchronous operation</returns>
        public override async Task InstallAsync()
        {
            //settings
            var settings = new CheckMoneyOrderPaymentSettings
            {
                DescriptionText = "<p>Mail Personal or Business Check, Cashier's Check or money order to:</p><p><br /><b>NOP SOLUTIONS</b> <br /><b>your address here,</b> <br /><b>New York, NY 10001 </b> <br /><b>USA</b></p><p>Notice that if you pay by Personal or Business Check, your order may be held for up to 10 days after we receive your check to allow enough time for the check to clear.  If you want us to ship faster upon receipt of your payment, then we recommend your send a money order or Cashier's check.</p><p>P.S. You can edit this text from admin panel.</p>"
            };
            await _settingService.SaveSettingAsync(settings);

            //locales
            await _localizationService.AddOrUpdateLocaleResourceAsync(new Dictionary <string, string>
            {
                ["Plugins.Payment.CheckMoneyOrder.AdditionalFee"]                 = "Additional fee",
                ["Plugins.Payment.CheckMoneyOrder.AdditionalFee.Hint"]            = "The additional fee.",
                ["Plugins.Payment.CheckMoneyOrder.AdditionalFeePercentage"]       = "Additional fee. Use percentage",
                ["Plugins.Payment.CheckMoneyOrder.AdditionalFeePercentage.Hint"]  = "Determines whether to apply a percentage additional fee to the order total. If not enabled, a fixed value is used.",
                ["Plugins.Payment.CheckMoneyOrder.DescriptionText"]               = "Description",
                ["Plugins.Payment.CheckMoneyOrder.DescriptionText.Hint"]          = "Enter info that will be shown to customers during checkout",
                ["Plugins.Payment.CheckMoneyOrder.PaymentMethodDescription"]      = "Pay by cheque or money order",
                ["Plugins.Payment.CheckMoneyOrder.ShippableProductRequired"]      = "Shippable product required",
                ["Plugins.Payment.CheckMoneyOrder.ShippableProductRequired.Hint"] = "An option indicating whether shippable products are required in order to display this payment method during checkout."
            });

            await base.InstallAsync();
        }
コード例 #5
0
        /// <summary>
        /// Collect the UP migration expressions
        /// </summary>
        public override void Up()
        {
            if (!DataSettingsManager.IsDatabaseInstalled())
            {
                return;
            }

            //locales
            var languages  = _languageService.GetAllLanguagesAsync(true).Result;
            var languageId = languages
                             .FirstOrDefault(lang => lang.UniqueSeoCode == new CultureInfo(NopCommonDefaults.DefaultLanguageCulture).TwoLetterISOLanguageName)
                             ?.Id;

            _localizationService.AddOrUpdateLocaleResourceAsync(new Dictionary <string, string>
            {
                ["Plugins.Payments.PayPalCommerce.Fields.DisplayPayLaterMessages"]      = "Display Pay Later messages",
                ["Plugins.Payments.PayPalCommerce.Fields.DisplayPayLaterMessages.Hint"] = "Determine whether to display Pay Later messages. This message displays how much the customer pays in four payments. The message will be shown next to the PayPal buttons.",
            }, languageId).Wait();


            //settings
            if (!_settingService.SettingExistsAsync(_payPalCommerceSettings, settings => settings.DisplayPayLaterMessages).Result)
            {
                _payPalCommerceSettings.DisplayPayLaterMessages = false;
            }

            _settingService.SaveSettingAsync(_payPalCommerceSettings).Wait();
        }
コード例 #6
0
        /// <summary>
        /// Install the plugin
        /// </summary>
        /// <returns>A task that represents the asynchronous operation</returns>
        public override async Task InstallAsync()
        {
            //sample pickup point
            var country = await _countryService.GetCountryByThreeLetterIsoCodeAsync("USA");

            var state = await _stateProvinceService.GetStateProvinceByAbbreviationAsync("NY", country?.Id);

            var address = new Address
            {
                Address1        = "21 West 52nd Street",
                City            = "New York",
                CountryId       = country?.Id,
                StateProvinceId = state?.Id,
                ZipPostalCode   = "10021",
                CreatedOnUtc    = DateTime.UtcNow
            };
            await _addressService.InsertAddressAsync(address);

            var pickupPoint = new StorePickupPoint
            {
                Name         = "New York store",
                AddressId    = address.Id,
                OpeningHours = "10.00 - 19.00",
                PickupFee    = 1.99m
            };
            await _storePickupPointService.InsertStorePickupPointAsync(pickupPoint);

            //locales
            await _localizationService.AddOrUpdateLocaleResourceAsync(new Dictionary <string, string>
            {
                ["Plugins.Pickup.PickupInStore.AddNew"]                                      = "Add a new pickup point",
                ["Plugins.Pickup.PickupInStore.Fields.Description"]                          = "Description",
                ["Plugins.Pickup.PickupInStore.Fields.Description.Hint"]                     = "Specify a description of the pickup point.",
                ["Plugins.Pickup.PickupInStore.Fields.DisplayOrder"]                         = "Display order",
                ["Plugins.Pickup.PickupInStore.Fields.DisplayOrder.Hint"]                    = "Specify the pickup point display order.",
                ["Plugins.Pickup.PickupInStore.Fields.Latitude"]                             = "Latitude",
                ["Plugins.Pickup.PickupInStore.Fields.Latitude.Hint"]                        = "Specify a latitude (DD.dddddddd°).",
                ["Plugins.Pickup.PickupInStore.Fields.Latitude.InvalidPrecision"]            = "Precision should be less then 8",
                ["Plugins.Pickup.PickupInStore.Fields.Latitude.InvalidRange"]                = "Latitude should be in range -90 to 90",
                ["Plugins.Pickup.PickupInStore.Fields.Latitude.IsNullWhenLongitudeHasValue"] = "Latitude and Longitude should be specify together",
                ["Plugins.Pickup.PickupInStore.Fields.Longitude"]                            = "Longitude",
                ["Plugins.Pickup.PickupInStore.Fields.Longitude.Hint"]                       = "Specify a longitude (DD.dddddddd°).",
                ["Plugins.Pickup.PickupInStore.Fields.Longitude.InvalidPrecision"]           = "Precision should be less then 8",
                ["Plugins.Pickup.PickupInStore.Fields.Longitude.InvalidRange"]               = "Longitude should be in range -180 to 180",
                ["Plugins.Pickup.PickupInStore.Fields.Longitude.IsNullWhenLatitudeHasValue"] = "Latitude and Longitude should be specify together",
                ["Plugins.Pickup.PickupInStore.Fields.Name"]                                 = "Name",
                ["Plugins.Pickup.PickupInStore.Fields.Name.Hint"]                            = "Specify a name of the pickup point.",
                ["Plugins.Pickup.PickupInStore.Fields.OpeningHours"]                         = "Opening hours",
                ["Plugins.Pickup.PickupInStore.Fields.OpeningHours.Hint"]                    = "Specify opening hours of the pickup point (Monday - Friday: 09:00 - 19:00 for example).",
                ["Plugins.Pickup.PickupInStore.Fields.PickupFee"]                            = "Pickup fee",
                ["Plugins.Pickup.PickupInStore.Fields.PickupFee.Hint"]                       = "Specify a fee for the shipping to the pickup point.",
                ["Plugins.Pickup.PickupInStore.Fields.Store"]                                = "Store",
                ["Plugins.Pickup.PickupInStore.Fields.Store.Hint"]                           = "A store name for which this pickup point will be available.",
                ["Plugins.Pickup.PickupInStore.Fields.TransitDays"]                          = "Transit days",
                ["Plugins.Pickup.PickupInStore.Fields.TransitDays.Hint"]                     = "The number of days of delivery of the goods to pickup point.",
                ["Plugins.Pickup.PickupInStore.NoPickupPoints"]                              = "No pickup points are available"
            });

            await base.InstallAsync();
        }
コード例 #7
0
        /// <summary>
        /// Install the plugin
        /// </summary>
        /// <returns>A task that represents the asynchronous operation</returns>
        public override async Task InstallAsync()
        {
            //locales
            await _localizationService.AddOrUpdateLocaleResourceAsync("Plugins.ExchangeRate.EcbExchange.Error", "You can use ECB (European central bank) exchange rate provider only when the primary exchange rate currency is supported by ECB");

            await base.InstallAsync();
        }
コード例 #8
0
        /// <summary>
        /// Install plugin
        /// </summary>
        /// <returns>A task that represents the asynchronous operation</returns>
        public override async Task InstallAsync()
        {
            await _localizationService.AddOrUpdateLocaleResourceAsync(new Dictionary <string, string>
            {
                ["Plugins.Widgets.FacebookPixel.Configuration"] = "Configuration",
                ["Plugins.Widgets.FacebookPixel.Configuration.CookieSettingsWarning"]                                = "It looks like you have <a href=\"{0}\" target=\"_blank\">DisplayEuCookieLawWarning</a> setting disabled.",
                ["Plugins.Widgets.FacebookPixel.Configuration.CustomEvents"]                                         = "Configure custom events",
                ["Plugins.Widgets.FacebookPixel.Configuration.CustomEvents.SaveBeforeEdit"]                          = "You need to save the configuration before edit custom events.",
                ["Plugins.Widgets.FacebookPixel.Configuration.CustomEvents.Fields.EventName"]                        = "Event name",
                ["Plugins.Widgets.FacebookPixel.Configuration.CustomEvents.Fields.EventName.Hint"]                   = "Enter a name of the custom event (e.g. BlogView).",
                ["Plugins.Widgets.FacebookPixel.Configuration.CustomEvents.Fields.WidgetZones"]                      = "Widget zones",
                ["Plugins.Widgets.FacebookPixel.Configuration.CustomEvents.Fields.WidgetZones.Hint"]                 = "Choose widget zones in which the custom event will be tracked (e.g. blogpost_page_top).",
                ["Plugins.Widgets.FacebookPixel.Configuration.CustomEvents.Search.WidgetZone"]                       = "Widget zone",
                ["Plugins.Widgets.FacebookPixel.Configuration.CustomEvents.Search.WidgetZone.Hint"]                  = "Search custom events by the widget zone.",
                ["Plugins.Widgets.FacebookPixel.Configuration.Fields.DisableForUsersNotAcceptingCookieConsent"]      = "Disable for users not accepting Cookie Consent",
                ["Plugins.Widgets.FacebookPixel.Configuration.Fields.DisableForUsersNotAcceptingCookieConsent.Hint"] = "Check to disable the Facebook Pixel for users not accepting Cookie Consent. You may want this if you conduct business in countries that are subject to General Data Protection Regulation (GDPR). You also need to activate the \"DisplayEuCookieLawWarning\" setting on the General settings page in order to display Cookie Consent for users.",
                ["Plugins.Widgets.FacebookPixel.Configuration.Fields.Enabled"]                                       = "Enabled",
                ["Plugins.Widgets.FacebookPixel.Configuration.Fields.Enabled.Hint"]                                  = "Toggle to enable/disable this Facebook Pixel configuration.",
                ["Plugins.Widgets.FacebookPixel.Configuration.Fields.PixelId"]                                       = "Pixel ID",
                ["Plugins.Widgets.FacebookPixel.Configuration.Fields.PixelId.Hint"]                                  = "Enter the Facebook Pixel ID.",
                ["Plugins.Widgets.FacebookPixel.Configuration.Fields.PixelId.Required"]                              = "Pixel ID is required",
                ["Plugins.Widgets.FacebookPixel.Configuration.Fields.PassUserProperties"]                            = "Include User properties",
                ["Plugins.Widgets.FacebookPixel.Configuration.Fields.PassUserProperties.Hint"]                       = "Check to include User properties, data about the User, in a pixel. Then you can view User properties in the Facebook Analytics dashboard under People > User Properties.",
                ["Plugins.Widgets.FacebookPixel.Configuration.Fields.PassUserProperties.Forbidden"]                  = "User Properties cannot be used together with Advanced Matching",
                ["Plugins.Widgets.FacebookPixel.Configuration.Fields.Store"]                                         = "Store",
                ["Plugins.Widgets.FacebookPixel.Configuration.Fields.Store.Hint"]                                    = "Choose a store in which the Facebook Pixel is used.",
                ["Plugins.Widgets.FacebookPixel.Configuration.Fields.TrackAddToCart"]                                = "Track \"AddToCart\" event",
                ["Plugins.Widgets.FacebookPixel.Configuration.Fields.TrackAddToCart.Hint"]                           = "Check to enable tracking standard event, when a product is added to the shopping cart.",
                ["Plugins.Widgets.FacebookPixel.Configuration.Fields.TrackAddToWishlist"]                            = "Track \"AddToWishlist\" event",
                ["Plugins.Widgets.FacebookPixel.Configuration.Fields.TrackAddToWishlist.Hint"]                       = "Check to enable tracking standard event, when a product is added to the wishlist.",
                ["Plugins.Widgets.FacebookPixel.Configuration.Fields.TrackCompleteRegistration"]                     = "Track \"CompleteRegistration\" event",
                ["Plugins.Widgets.FacebookPixel.Configuration.Fields.TrackCompleteRegistration.Hint"]                = "Check to enable tracking standard event, when a registration form is completed.",
                ["Plugins.Widgets.FacebookPixel.Configuration.Fields.TrackContact"]                                  = "Track \"Contact\" event",
                ["Plugins.Widgets.FacebookPixel.Configuration.Fields.TrackContact.Hint"]                             = "Check to enable tracking standard event, when a person person submits a question via contact us form.",
                ["Plugins.Widgets.FacebookPixel.Configuration.Fields.TrackInitiateCheckout"]                         = "Track \"InitiateCheckout\" event",
                ["Plugins.Widgets.FacebookPixel.Configuration.Fields.TrackInitiateCheckout.Hint"]                    = "Check to enable tracking standard event, when a person enters the checkout flow prior to completing the checkout flow.",
                ["Plugins.Widgets.FacebookPixel.Configuration.Fields.TrackPageView"]                                 = "Track \"PageView\" event ",
                ["Plugins.Widgets.FacebookPixel.Configuration.Fields.TrackPageView.Hint"]                            = "Check to enable tracking standard event, when a person lands on the website pages.",
                ["Plugins.Widgets.FacebookPixel.Configuration.Fields.TrackPurchase"]                                 = "Track \"Purchase\" event",
                ["Plugins.Widgets.FacebookPixel.Configuration.Fields.TrackPurchase.Hint"]                            = "Check to enable tracking standard event, when an order is placed.",
                ["Plugins.Widgets.FacebookPixel.Configuration.Fields.TrackSearch"]                                   = "Track \"Search\" event",
                ["Plugins.Widgets.FacebookPixel.Configuration.Fields.TrackSearch.Hint"]                              = "Check to enable tracking standard event, when a search is made.",
                ["Plugins.Widgets.FacebookPixel.Configuration.Fields.TrackViewContent"]                              = "Track \"ViewContent\" event",
                ["Plugins.Widgets.FacebookPixel.Configuration.Fields.TrackViewContent.Hint"]                         = "Check to enable tracking standard event, when a person lands on a product details page.",
                ["Plugins.Widgets.FacebookPixel.Configuration.Fields.UseAdvancedMatching"]                           = "Advanced Matching",
                ["Plugins.Widgets.FacebookPixel.Configuration.Fields.UseAdvancedMatching.Hint"]                      = "Check to enable Advanced Matching for tracked conversion events. In this case, some of the visitor's data (in the hashed format) will be collected by the Facebook Pixel. If you automatically implement advanced matching using the Events Manager, uncheck this setting.",
                ["Plugins.Widgets.FacebookPixel.Configuration.Fields.UseAdvancedMatching.Forbidden"]                 = "Advanced Matching cannot be used together with User Properties",
                ["Plugins.Widgets.FacebookPixel.Configuration.Search.Store"]                                         = "Store",
                ["Plugins.Widgets.FacebookPixel.Configuration.Search.Store.Hint"]                                    = "Search configuration by the store."
            });

            await base.InstallAsync();
        }
コード例 #9
0
        /// <summary>
        /// Install plugin
        /// </summary>
        /// <returns>A task that represents the asynchronous operation</returns>
        public override async Task InstallAsync()
        {
            //settings
            var settings = new FedexSettings
            {
                Url                  = "https://gatewaybeta.fedex.com:443/web-services/rate",
                DropoffType          = DropoffType.BusinessServiceCenter,
                PackingPackageVolume = 5184
            };
            await _settingService.SaveSettingAsync(settings);

            //locales
            await _localizationService.AddOrUpdateLocaleResourceAsync(new Dictionary <string, string>
            {
                ["Plugins.Shipping.Fedex.Fields.Url"]                                   = "URL",
                ["Plugins.Shipping.Fedex.Fields.Url.Hint"]                              = "Specify FedEx URL.",
                ["Plugins.Shipping.Fedex.Fields.Key"]                                   = "Key",
                ["Plugins.Shipping.Fedex.Fields.Key.Hint"]                              = "Specify FedEx key.",
                ["Plugins.Shipping.Fedex.Fields.Password"]                              = "******",
                ["Plugins.Shipping.Fedex.Fields.Password.Hint"]                         = "Specify FedEx password.",
                ["Plugins.Shipping.Fedex.Fields.AccountNumber"]                         = "Account number",
                ["Plugins.Shipping.Fedex.Fields.AccountNumber.Hint"]                    = "Specify FedEx account number.",
                ["Plugins.Shipping.Fedex.Fields.MeterNumber"]                           = "Meter number",
                ["Plugins.Shipping.Fedex.Fields.MeterNumber.Hint"]                      = "Specify FedEx meter number.",
                ["Plugins.Shipping.Fedex.Fields.UseResidentialRates"]                   = "Use residential rates",
                ["Plugins.Shipping.Fedex.Fields.UseResidentialRates.Hint"]              = "Check to use residential rates.",
                ["Plugins.Shipping.Fedex.Fields.ApplyDiscounts"]                        = "Use discounted rates",
                ["Plugins.Shipping.Fedex.Fields.ApplyDiscounts.Hint"]                   = "Check to use discounted rates (instead of list rates).",
                ["Plugins.Shipping.Fedex.Fields.AdditionalHandlingCharge"]              = "Additional handling charge",
                ["Plugins.Shipping.Fedex.Fields.AdditionalHandlingCharge.Hint"]         = "Enter additional handling fee to charge your customers.",
                ["Plugins.Shipping.Fedex.Fields.CarrierServices"]                       = "Carrier Services Offered",
                ["Plugins.Shipping.Fedex.Fields.CarrierServices.Hint"]                  = "Select the services you want to offer to customers.",
                ["Plugins.Shipping.Fedex.Fields.PassDimensions"]                        = "Pass dimensions",
                ["Plugins.Shipping.Fedex.Fields.PassDimensions.Hint"]                   = "Check if you want to pass package dimensions when requesting rates.",
                ["Plugins.Shipping.Fedex.Fields.PackingType"]                           = "Packing type",
                ["Plugins.Shipping.Fedex.Fields.PackingType.Hint"]                      = "Choose preferred packing type.",
                ["Plugins.Shipping.Fedex.Fields.PackingPackageVolume"]                  = "Package volume",
                ["Plugins.Shipping.Fedex.Fields.PackingPackageVolume.Hint"]             = "Enter your package volume.",
                ["Plugins.Shipping.Fedex.Fields.DropoffType"]                           = "Dropoff Type",
                ["Plugins.Shipping.Fedex.Fields.DropoffType.Hint"]                      = "Choose preferred dropoff type.",
                ["Enums.Nop.Plugin.Shipping.Fedex.DropoffType.BusinessServiceCenter"]   = "Business service center",
                ["Enums.Nop.Plugin.Shipping.Fedex.DropoffType.DropBox"]                 = "Drop box",
                ["Enums.Nop.Plugin.Shipping.Fedex.DropoffType.RegularPickup"]           = "Regular pickup",
                ["Enums.Nop.Plugin.Shipping.Fedex.DropoffType.RequestCourier"]          = "Request courier",
                ["Enums.Nop.Plugin.Shipping.Fedex.DropoffType.Station"]                 = "Station",
                ["Enums.Nop.Plugin.Shipping.Fedex.PackingType.PackByDimensions"]        = "Pack by dimensions",
                ["Enums.Nop.Plugin.Shipping.Fedex.PackingType.PackByOneItemPerPackage"] = "Pack by one item per package",
                ["Enums.Nop.Plugin.Shipping.Fedex.PackingType.PackByVolume"]            = "Pack by volume"
            });

            await base.InstallAsync();
        }
コード例 #10
0
        /// <summary>
        /// Install plugin
        /// </summary>
        /// <returns>A task that represents the asynchronous operation</returns>
        public override async Task InstallAsync()
        {
            //settings
            await _settingService.SaveSettingAsync(new FixedByWeightByTotalSettings());

            //locales
            await _localizationService.AddOrUpdateLocaleResourceAsync(new Dictionary <string, string>
            {
                ["Plugins.Shipping.FixedByWeightByTotal.AddRecord"] = "Add record",
                ["Plugins.Shipping.FixedByWeightByTotal.Fields.AdditionalFixedCost"]      = "Additional fixed cost",
                ["Plugins.Shipping.FixedByWeightByTotal.Fields.AdditionalFixedCost.Hint"] = "Specify an additional fixed cost per shopping cart for this option. Set to 0 if you don't want an additional fixed cost to be applied.",
                ["Plugins.Shipping.FixedByWeightByTotal.Fields.Country"]                       = "Country",
                ["Plugins.Shipping.FixedByWeightByTotal.Fields.Country.Hint"]                  = "If an asterisk is selected, then this shipping rate will apply to all customers, regardless of the country.",
                ["Plugins.Shipping.FixedByWeightByTotal.Fields.DataHtml"]                      = "Data",
                ["Plugins.Shipping.FixedByWeightByTotal.Fields.LimitMethodsToCreated"]         = "Limit shipping methods to configured ones",
                ["Plugins.Shipping.FixedByWeightByTotal.Fields.LimitMethodsToCreated.Hint"]    = "If you check this option, then your customers will be limited to shipping options configured here. Otherwise, they'll be able to choose any existing shipping options even they are not configured here (zero shipping fee in this case).",
                ["Plugins.Shipping.FixedByWeightByTotal.Fields.LowerWeightLimit"]              = "Lower weight limit",
                ["Plugins.Shipping.FixedByWeightByTotal.Fields.LowerWeightLimit.Hint"]         = "Lower weight limit. This field can be used for \"per extra weight unit\" scenarios.",
                ["Plugins.Shipping.FixedByWeightByTotal.Fields.OrderSubtotalFrom"]             = "Order subtotal from",
                ["Plugins.Shipping.FixedByWeightByTotal.Fields.OrderSubtotalFrom.Hint"]        = "Order subtotal from.",
                ["Plugins.Shipping.FixedByWeightByTotal.Fields.OrderSubtotalTo"]               = "Order subtotal to",
                ["Plugins.Shipping.FixedByWeightByTotal.Fields.OrderSubtotalTo.Hint"]          = "Order subtotal to.",
                ["Plugins.Shipping.FixedByWeightByTotal.Fields.PercentageRateOfSubtotal"]      = "Charge percentage (of subtotal)",
                ["Plugins.Shipping.FixedByWeightByTotal.Fields.PercentageRateOfSubtotal.Hint"] = "Charge percentage (of subtotal).",
                ["Plugins.Shipping.FixedByWeightByTotal.Fields.Rate"] = "Rate",
                ["Plugins.Shipping.FixedByWeightByTotal.Fields.RatePerWeightUnit"]      = "Rate per weight unit",
                ["Plugins.Shipping.FixedByWeightByTotal.Fields.RatePerWeightUnit.Hint"] = "Rate per weight unit.",
                ["Plugins.Shipping.FixedByWeightByTotal.Fields.ShippingMethod"]         = "Shipping method",
                ["Plugins.Shipping.FixedByWeightByTotal.Fields.ShippingMethod.Hint"]    = "Choose shipping method.",
                ["Plugins.Shipping.FixedByWeightByTotal.Fields.StateProvince"]          = "State / province",
                ["Plugins.Shipping.FixedByWeightByTotal.Fields.StateProvince.Hint"]     = "If an asterisk is selected, then this shipping rate will apply to all customers from the given country, regardless of the state.",
                ["Plugins.Shipping.FixedByWeightByTotal.Fields.Store"]            = "Store",
                ["Plugins.Shipping.FixedByWeightByTotal.Fields.Store.Hint"]       = "If an asterisk is selected, then this shipping rate will apply to all stores.",
                ["Plugins.Shipping.FixedByWeightByTotal.Fields.TransitDays"]      = "Transit days",
                ["Plugins.Shipping.FixedByWeightByTotal.Fields.TransitDays.Hint"] = "The number of days of delivery of the goods.",
                ["Plugins.Shipping.FixedByWeightByTotal.Fields.Warehouse"]        = "Warehouse",
                ["Plugins.Shipping.FixedByWeightByTotal.Fields.Warehouse.Hint"]   = "If an asterisk is selected, then this shipping rate will apply to all warehouses.",
                ["Plugins.Shipping.FixedByWeightByTotal.Fields.WeightFrom"]       = "Order weight from",
                ["Plugins.Shipping.FixedByWeightByTotal.Fields.WeightFrom.Hint"]  = "Order weight from.",
                ["Plugins.Shipping.FixedByWeightByTotal.Fields.WeightTo"]         = "Order weight to",
                ["Plugins.Shipping.FixedByWeightByTotal.Fields.WeightTo.Hint"]    = "Order weight to.",
                ["Plugins.Shipping.FixedByWeightByTotal.Fields.Zip"]       = "Zip",
                ["Plugins.Shipping.FixedByWeightByTotal.Fields.Zip.Hint"]  = "Zip / postal code. If zip is empty, then this shipping rate will apply to all customers from the given country or state, regardless of the zip code.",
                ["Plugins.Shipping.FixedByWeightByTotal.Fixed"]            = "Fixed Rate",
                ["Plugins.Shipping.FixedByWeightByTotal.Formula"]          = "Formula to calculate rates",
                ["Plugins.Shipping.FixedByWeightByTotal.Formula.Value"]    = "[additional fixed cost] + ([order total weight] - [lower weight limit]) * [rate per weight unit] + [order subtotal] * [charge percentage]",
                ["Plugins.Shipping.FixedByWeightByTotal.ShippingByWeight"] = "By Weight"
            });

            await base.InstallAsync();
        }
コード例 #11
0
        /// <summary>
        /// Install the plugin
        /// </summary>
        /// <returns>A task that represents the asynchronous operation</returns>
        public override async Task InstallAsync()
        {
            //locales
            await _localizationService.AddOrUpdateLocaleResourceAsync(new Dictionary <string, string>
            {
                ["Plugins.DiscountRules.CustomerRoles.Fields.CustomerRole"]            = "Required customer role",
                ["Plugins.DiscountRules.CustomerRoles.Fields.CustomerRole.Hint"]       = "Discount will be applied if customer is in the selected customer role.",
                ["Plugins.DiscountRules.CustomerRoles.Fields.CustomerRole.Select"]     = "Select customer role",
                ["Plugins.DiscountRules.CustomerRoles.Fields.CustomerRoleId.Required"] = "Customer role is required",
                ["Plugins.DiscountRules.CustomerRoles.Fields.DiscountId.Required"]     = "Discount is required"
            });

            await base.InstallAsync();
        }
コード例 #12
0
        /// <summary>
        /// Install the plugin
        /// </summary>
        /// <returns>A task that represents the asynchronous operation</returns>
        public override async Task InstallAsync()
        {
            //settings
            var defaultSettings = new EcbExchangeRateSettings
            {
                EcbLink = "https://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml"
            };
            await _settingService.SaveSettingAsync(defaultSettings);

            //locales
            await _localizationService.AddOrUpdateLocaleResourceAsync("Plugins.ExchangeRate.EcbExchange.Error", "You can use ECB (European central bank) exchange rate provider only when the primary exchange rate currency is supported by ECB");

            await base.InstallAsync();
        }
        /// <summary>
        /// Install the plugin
        /// </summary>
        /// <returns>A task that represents the asynchronous operation</returns>
        public override async Task InstallAsync()
        {
            //locales
            await _localizationService.AddOrUpdateLocaleResourceAsync(new Dictionary <string, string>
            {
                ["Plugins.DiscountRules.HadSpentAmount.Fields.Amount"]               = "Required spent amount",
                ["Plugins.DiscountRules.HadSpentAmount.Fields.Amount.Hint"]          = "Discount will be applied if customer has spent/purchased x.xx amount.",
                ["Plugins.DiscountRules.HadSpentAmount.NotEnough"]                   = "Sorry, this offer requires more money spent (previously placed orders)",
                ["Plugins.DiscountRules.HadSpentAmount.Fields.SpentAmount.Required"] = "Spent amount should be greater 0",
                ["Plugins.DiscountRules.HadSpentAmount.Fields.DiscountId.Required"]  = "Discount is required"
            });

            await base.InstallAsync();
        }
コード例 #14
0
        /// <summary>
        /// Collect the UP migration expressions
        /// </summary>
        public override void Up()
        {
            if (!DataSettingsManager.IsDatabaseInstalled())
            {
                return;
            }

            //locales
            var languages  = _languageService.GetAllLanguagesAsync(true).Result;
            var languageId = languages
                             .FirstOrDefault(lang => lang.UniqueSeoCode == new CultureInfo(NopCommonDefaults.DefaultLanguageCulture).TwoLetterISOLanguageName)
                             ?.Id;

            _localizationService.AddOrUpdateLocaleResourceAsync(new Dictionary <string, string>
            {
                ["Plugins.Tax.Avalara.Fields.UseTaxRateTables"]      = "Use tax rate tables to estimate ",
                ["Plugins.Tax.Avalara.Fields.UseTaxRateTables.Hint"] = "Determine whether to use tax rate tables to estimate. This will be used as a default tax calculation for catalog pages and will be adjusted and reconciled to the final transaction tax during checkout. Tax rates are looked up by zip code (US only) in a file that will be periodically updated from the Avalara (see Schedule tasks).",
            }, languageId).Wait();

            //settings
            if (!_settingService.SettingExistsAsync(_avalaraTaxSettings, settings => settings.UseTaxRateTables).Result)
            {
                _avalaraTaxSettings.UseTaxRateTables = true;
            }
            _settingService.SaveSettingAsync(_avalaraTaxSettings).Wait();

            //in version 4.50 we added the LastEnabledUtc field to the ScheduleTask entity,
            //we need to make sure that these changes are applied before inserting new task into the database
            var scheduleTaskTableName = NameCompatibilityManager.GetTableName(typeof(ScheduleTask));

            //add column if not exists
            if (!Schema.Table(scheduleTaskTableName).Column(nameof(ScheduleTask.LastEnabledUtc)).Exists())
            {
                Alter.Table(scheduleTaskTableName)
                .AddColumn(nameof(ScheduleTask.LastEnabledUtc)).AsDateTime2().Nullable();
            }

            //schedule task
            Insert.IntoTable(scheduleTaskTableName).Row(new
            {
                Enabled        = true,
                LastEnabledUtc = DateTime.UtcNow,
                Seconds        = AvalaraTaxDefaults.DownloadTaxRatesTask.Days * 24 * 60 * 60,
                StopOnError    = false,
                Name           = AvalaraTaxDefaults.DownloadTaxRatesTask.Name,
                Type           = AvalaraTaxDefaults.DownloadTaxRatesTask.Type
            });
        }
        /// <summary>
        /// Install the plugin
        /// </summary>
        /// <returns>A task that represents the asynchronous operation</returns>
        public override async Task InstallAsync()
        {
            //locales
            await _localizationService.AddOrUpdateLocaleResourceAsync(new Dictionary <string, string>
            {
                ["Plugins.DiscountRules.HasAllProducts.Fields.Products"]                 = "Restricted products [and quantity range]",
                ["Plugins.DiscountRules.HasAllProducts.Fields.Products.Hint"]            = "The comma-separated list of product identifiers (e.g. 77, 123, 156). You can find a product ID on its details page. You can also specify the comma-separated list of product identifiers with quantities ({Product ID}:{Quantity}. for example, 77:1, 123:2, 156:3). And you can also specify the comma-separated list of product identifiers with quantity range ({Product ID}:{Min quantity}-{Max quantity}. for example, 77:1-3, 123:2-5, 156:3-8).",
                ["Plugins.DiscountRules.HasAllProducts.Fields.Products.AddNew"]          = "Add product",
                ["Plugins.DiscountRules.HasAllProducts.Fields.Products.Choose"]          = "Choose",
                ["Plugins.DiscountRules.HasAllProducts.Fields.ProductIds.Required"]      = "Products are required",
                ["Plugins.DiscountRules.HasAllProducts.Fields.ProductIds.InvalidFormat"] = "Invalid format of the products selection. Format should be comma-separated list of product identifiers (e.g. 77, 123, 156). You can find a product ID on its details page. You can also specify the comma-separated list of product identifiers with quantities ({Product ID}:{Quantity}. for example, 77:1, 123:2, 156:3). And you can also specify the comma-separated list of product identifiers with quantity range ({Product ID}:{Min quantity}-{Max quantity}. for example, 77:1-3, 123:2-5, 156:3-8).",
                ["Plugins.DiscountRules.HasAllProducts.Fields.DiscountId.Required"]      = "Discount is required"
            });

            await base.InstallAsync();
        }
コード例 #16
0
        /// <summary>
        /// Install the plugin
        /// </summary>
        /// <returns>A task that represents the asynchronous operation</returns>
        public override async Task InstallAsync()
        {
            //settings
            await _settingService.SaveSettingAsync(new FacebookExternalAuthSettings());

            //locales
            await _localizationService.AddOrUpdateLocaleResourceAsync(new Dictionary <string, string>
            {
                ["Plugins.ExternalAuth.Facebook.ClientKeyIdentifier"]      = "App ID/API Key",
                ["Plugins.ExternalAuth.Facebook.ClientKeyIdentifier.Hint"] = "Enter your app ID/API key here. You can find it on your FaceBook application page.",
                ["Plugins.ExternalAuth.Facebook.ClientSecret"]             = "App Secret",
                ["Plugins.ExternalAuth.Facebook.ClientSecret.Hint"]        = "Enter your app secret here. You can find it on your FaceBook application page.",
                ["Plugins.ExternalAuth.Facebook.Instructions"]             = "<p>To configure authentication with Facebook, please follow these steps:<br/><br/><ol><li>Navigate to the <a href=\"https://developers.facebook.com/apps\" target =\"_blank\" > Facebook for Developers</a> page and sign in. If you don't already have a Facebook account, use the <b>Sign up for Facebook</b> link on the login page to create one.</li><li>Tap the <b>+ Add a New App button</b> in the upper right corner to create a new App ID. (If this is your first app with Facebook, the text of the button will be <b>Create a New App</b>.)</li><li>Fill out the form and tap the <b>Create App ID button</b>.</li><li>The <b>Product Setup</b> page is displayed, letting you select the features for your new app. Click <b>Get Started</b> on <b>Facebook Login</b>.</li><li>Click the <b>Settings</b> link in the menu at the left, you are presented with the <b>Client OAuth Settings</b> page with some defaults already set.</li><li>Enter \"{0:s}signin-facebook\" into the <b>Valid OAuth Redirect URIs</b> field.</li><li>Click <b>Save Changes</b>.</li><li>Click the <b>Dashboard</b> link in the left navigation.</li><li>Copy your App ID and App secret below.</li></ol><br/><br/></p>"
            });

            await base.InstallAsync();
        }
コード例 #17
0
        /// <summary>
        /// Install the plugin
        /// </summary>
        /// <returns>A task that represents the asynchronous operation</returns>
        public override async Task InstallAsync()
        {
            var store = await _storeContext.GetCurrentStoreAsync();

            //settings
            await _settingService.SaveSettingAsync(new GoogleAuthenticatorSettings
            {
                BusinessPrefix    = store.Name,
                QRPixelsPerModule = GoogleAuthenticatorDefaults.DefaultQRPixelsPerModule
            });

            //locales
            await _localizationService.AddOrUpdateLocaleResourceAsync(new Dictionary <string, string>
            {
                //admin config
                ["Plugins.MultiFactorAuth.GoogleAuthenticator.BusinessPrefix"]         = "Business prefix",
                ["Plugins.MultiFactorAuth.GoogleAuthenticator.BusinessPrefix.Hint"]    = "Provide your business prefix so users can differentiate the account information for your store in the GoogleAuthenticator app.",
                ["Plugins.MultiFactorAuth.GoogleAuthenticator.QRPixelsPerModule"]      = "QRPixelsPerModule",
                ["Plugins.MultiFactorAuth.GoogleAuthenticator.QRPixelsPerModule.Hint"] = "Sets the number of pixels per unit. The module is one square in the QR code. By default is 3 for a 171x171 pixel image.",
                ["Plugins.MultiFactorAuth.GoogleAuthenticator.Instructions"]           = "To use Google Authenticator, the app is first installed on a smartphone. The plugin provides a shared secret key to the user over a secure channel, to be stored in the Google Authenticator app. This secret key will be used for all future logins to the site.",

                //db fields
                ["Plugins.MultiFactorAuth.GoogleAuthenticator.Fields.Customer"]  = "Customer",
                ["Plugins.MultiFactorAuth.GoogleAuthenticator.Fields.SecretKey"] = "Secret key",

                //customer config
                ["Plugins.MultiFactorAuth.GoogleAuthenticator.Customer.VerificationToken"] = "Google Authenticator Code",
                ["Plugins.MultiFactorAuth.GoogleAuthenticator.Customer.ManualSetupCode"]   = "Manual entry setup code",
                ["Plugins.MultiFactorAuth.GoogleAuthenticator.Customer.SendCode"]          = "Confirm",
                ["Plugins.MultiFactorAuth.GoogleAuthenticator.Customer.Instruction"]       = "Please download the app Google Authenticator to scan this QR code. If you already have a verified account with Google Authenticator, then you can change the parameters of your account by registering on this page. Your data in the system will be updated. Since the user is authenticated by email, make sure it is specified for your account.",
                ["Plugins.MultiFactorAuth.GoogleAuthenticator.Customer.InstructionManual"] = "You can not scan code? You can add the entry manually, please provide the following details to the application on your phone.",
                ["Plugins.MultiFactorAuth.GoogleAuthenticator.Customer.Account"]           = "Account: ",
                ["Plugins.MultiFactorAuth.GoogleAuthenticator.Customer.TypeKey"]           = "Time based : Yes",
                ["Plugins.MultiFactorAuth.GoogleAuthenticator.Customer.Key"] = "Key: ",
                ["Plugins.MultiFactorAuth.GoogleAuthenticator.MultiFactorAuthenticationMethodDescription"] = "Google Authenticator is a software-based authenticator by Google that implements two-step verification services, for authenticating users",

                //validators
                ["Plugins.MultiFactorAuth.GoogleAuthenticator.Fields.Code.Required"] = "Field cannot be empty. Enter the code from the Google Authenticator app no your mobile phone.",
                ["Plugins.MultiFactorAuth.GoogleAuthenticator.Fields.Code.Wrong"]    = "Field must be 6 digits. Enter the code from the Google Authenticator app no your mobile phone.",
                ["Plugins.MultiFactorAuth.GoogleAuthenticator.Token.Unsuccessful"]   = "Invalid token or its lifetime has expired.",
                ["Plugins.MultiFactorAuth.GoogleAuthenticator.Token.Successful"]     = "Configuration of Google Authenticator for current customer saved successful.",
                ["Plugins.MultiFactorAuth.GoogleAuthenticator.Record.Notfound"]      = "Failed to match user credentials to active authentication provider settings record."
            });

            await base.InstallAsync();
        }
コード例 #18
0
        /// <summary>
        /// Install plugin
        /// </summary>
        /// <returns>A task that represents the asynchronous operation</returns>
        public override async Task InstallAsync()
        {
            await _settingService.SaveSettingAsync(new AccessiBeSettings
            {
                WidgetZone = PublicWidgetZones.HeadHtmlTag
            });

            await _localizationService.AddOrUpdateLocaleResourceAsync(new Dictionary <string, string>
            {
                ["Plugins.Widgets.AccessiBe.Fields.Enabled"]         = "Enable",
                ["Plugins.Widgets.AccessiBe.Fields.Enabled.Hint"]    = "Check to activate this widget.",
                ["Plugins.Widgets.AccessiBe.Fields.Script"]          = "Installation script",
                ["Plugins.Widgets.AccessiBe.Fields.Script.Hint"]     = "Find your unique installation script on the Installation tab in your account and then copy it into this field.",
                ["Plugins.Widgets.AccessiBe.Fields.Script.Required"] = "Installation script is required",
            });

            await base.InstallAsync();
        }
コード例 #19
0
        /// <summary>
        /// Install plugin
        /// </summary>
        /// <returns>A task that represents the asynchronous operation</returns>
        public override async Task InstallAsync()
        {
            var settings = new GoogleAnalyticsSettings
            {
                GoogleId                 = "UA-0000000-0",
                TrackingScript           = @"<!-- Global site tag (gtag.js) - Google Analytics -->
                <script async src='https://www.googletagmanager.com/gtag/js?id={GOOGLEID}'></script>
                <script>
                  window.dataLayer = window.dataLayer || [];
                  function gtag(){dataLayer.push(arguments);}
                  gtag('js', new Date());

                  gtag('config', '{GOOGLEID}');
                  {CUSTOMER_TRACKING}
                  {ECOMMERCE_TRACKING}
                </script>",
                UseJsToSendEcommerceInfo = true
            };
            await _settingService.SaveSettingAsync(settings);

            await _localizationService.AddOrUpdateLocaleResourceAsync(new Dictionary <string, string>
            {
                ["Plugins.Widgets.GoogleAnalytics.GoogleId"]                      = "ID",
                ["Plugins.Widgets.GoogleAnalytics.GoogleId.Hint"]                 = "Enter Google Analytics ID.",
                ["Plugins.Widgets.GoogleAnalytics.TrackingScript"]                = "Tracking code",
                ["Plugins.Widgets.GoogleAnalytics.TrackingScript.Hint"]           = "Paste the tracking code generated by Google Analytics here. {GOOGLEID} and {CUSTOMER_TRACKING} will be dynamically replaced.",
                ["Plugins.Widgets.GoogleAnalytics.EnableEcommerce"]               = "Enable eCommerce",
                ["Plugins.Widgets.GoogleAnalytics.EnableEcommerce.Hint"]          = "Check to pass information about orders to Google eCommerce feature.",
                ["Plugins.Widgets.GoogleAnalytics.UseJsToSendEcommerceInfo"]      = "Use JS to send eCommerce info",
                ["Plugins.Widgets.GoogleAnalytics.UseJsToSendEcommerceInfo.Hint"] = "Check to use JS code to send eCommerce info from the order completed page. But in case of redirection payment methods some customers may skip it. Otherwise, eCommerce information will be sent using HTTP request. Information is sent each time an order is paid but UTM is not supported in this mode.",
                ["Plugins.Widgets.GoogleAnalytics.IncludeCustomerId"]             = "Include customer ID",
                ["Plugins.Widgets.GoogleAnalytics.IncludeCustomerId.Hint"]        = "Check to include customer identifier to script.",
                ["Plugins.Widgets.GoogleAnalytics.IncludingTax"]                  = "Include tax",
                ["Plugins.Widgets.GoogleAnalytics.IncludingTax.Hint"]             = "Check to include tax when generating tracking code for eCommerce part.",
                ["Plugins.Widgets.GoogleAnalytics.Instructions"]                  = "<p>Google Analytics is a free website stats tool from Google. It keeps track of statistics about the visitors and eCommerce conversion on your website.<br /><br />Follow the next steps to enable Google Analytics integration:<br /><ul><li><a href=\"http://www.google.com/analytics/\" target=\"_blank\">Create a Google Analytics account</a> and follow the wizard to add your website</li><li>Copy the Tracking ID into the 'ID' box below</li><li>Click the 'Save' button below and Google Analytics will be integrated into your store</li></ul><br />If you would like to switch between Google Analytics (used by default) and Universal Analytics, then please use the buttons below:</p>"
            });

            await base.InstallAsync();
        }
コード例 #20
0
        /// <summary>
        /// Collect the UP migration expressions
        /// </summary>
        public override void Up()
        {
            if (!DataSettingsManager.IsDatabaseInstalled())
            {
                return;
            }

            //locales
            var languages  = _languageService.GetAllLanguagesAsync(true).Result;
            var languageId = languages
                             .FirstOrDefault(lang => lang.UniqueSeoCode == new CultureInfo(NopCommonDefaults.DefaultLanguageCulture).TwoLetterISOLanguageName)
                             ?.Id;

            _localizationService.AddOrUpdateLocaleResourceAsync(new Dictionary <string, string>
            {
                ["Plugins.Tax.Avalara.Fields.UseTaxRateTables"]      = "Use tax rate tables to estimate ",
                ["Plugins.Tax.Avalara.Fields.UseTaxRateTables.Hint"] = "Determine whether to use tax rate tables to estimate. This will be used as a default tax calculation for catalog pages and will be adjusted and reconciled to the final transaction tax during checkout. Tax rates are looked up by zip code (US only) in a file that will be periodically updated from the Avalara (see Schedule tasks).",
            }, languageId).Wait();

            //settings
            if (!_settingService.SettingExistsAsync(_avalaraTaxSettings, settings => settings.UseTaxRateTables).Result)
            {
                _avalaraTaxSettings.UseTaxRateTables = true;
            }
            _settingService.SaveSettingAsync(_avalaraTaxSettings).Wait();

            //schedule task
            if (_scheduleTaskService.GetTaskByTypeAsync(AvalaraTaxDefaults.DownloadTaxRatesTask.Type).Result is null)
            {
                _scheduleTaskService.InsertTaskAsync(new()
                {
                    Enabled        = true,
                    LastEnabledUtc = DateTime.UtcNow,
                    Seconds        = AvalaraTaxDefaults.DownloadTaxRatesTask.Days * 24 * 60 * 60,
                    Name           = AvalaraTaxDefaults.DownloadTaxRatesTask.Name,
                    Type           = AvalaraTaxDefaults.DownloadTaxRatesTask.Type
                }).Wait();
            }
        }
コード例 #21
0
        /// <summary>
        /// Install plugin
        /// </summary>
        /// <returns>A task that represents the asynchronous operation</returns>
        public override async Task InstallAsync()
        {
            //pictures
            var sampleImagesPath = _fileProvider.MapPath("~/Plugins/Widgets.NivoSlider/Content/nivoslider/sample-images/");

            //settings
            var settings = new NivoSliderSettings
            {
                Picture1Id = (await _pictureService.InsertPictureAsync(await _fileProvider.ReadAllBytesAsync(_fileProvider.Combine(sampleImagesPath, "banner1.jpg")), MimeTypes.ImagePJpeg, "banner_1")).Id,
                Text1      = "",
                Link1      = _webHelper.GetStoreLocation(),
                Picture2Id = (await _pictureService.InsertPictureAsync(await _fileProvider.ReadAllBytesAsync(_fileProvider.Combine(sampleImagesPath, "banner2.jpg")), MimeTypes.ImagePJpeg, "banner_2")).Id,
                Text2      = "",
                Link2      = _webHelper.GetStoreLocation()
                             //Picture3Id = _pictureService.InsertPicture(File.ReadAllBytes(_fileProvider.Combine(sampleImagesPath,"banner3.jpg")), MimeTypes.ImagePJpeg, "banner_3").Id,
                             //Text3 = "",
                             //Link3 = _webHelper.GetStoreLocation(),
            };
            await _settingService.SaveSettingAsync(settings);

            await _localizationService.AddOrUpdateLocaleResourceAsync(new Dictionary <string, string>
            {
                ["Plugins.Widgets.NivoSlider.Picture1"]     = "Picture 1",
                ["Plugins.Widgets.NivoSlider.Picture2"]     = "Picture 2",
                ["Plugins.Widgets.NivoSlider.Picture3"]     = "Picture 3",
                ["Plugins.Widgets.NivoSlider.Picture4"]     = "Picture 4",
                ["Plugins.Widgets.NivoSlider.Picture5"]     = "Picture 5",
                ["Plugins.Widgets.NivoSlider.Picture"]      = "Picture",
                ["Plugins.Widgets.NivoSlider.Picture.Hint"] = "Upload picture.",
                ["Plugins.Widgets.NivoSlider.Text"]         = "Comment",
                ["Plugins.Widgets.NivoSlider.Text.Hint"]    = "Enter comment for picture. Leave empty if you don't want to display any text.",
                ["Plugins.Widgets.NivoSlider.Link"]         = "URL",
                ["Plugins.Widgets.NivoSlider.Link.Hint"]    = "Enter URL. Leave empty if you don't want this picture to be clickable.",
                ["Plugins.Widgets.NivoSlider.AltText"]      = "Image alternate text",
                ["Plugins.Widgets.NivoSlider.AltText.Hint"] = "Enter alternate text that will be added to image."
            });

            await base.InstallAsync();
        }
コード例 #22
0
        /// <summary>
        /// Install plugin
        /// </summary>
        /// <returns>A task that represents the asynchronous operation</returns>
        public override async Task InstallAsync()
        {
            await _settingService.SaveSettingAsync(new What3wordsSettings());

            if (!_widgetSettings.ActiveWidgetSystemNames.Contains(What3wordsDefaults.SystemName))
            {
                _widgetSettings.ActiveWidgetSystemNames.Add(What3wordsDefaults.SystemName);
                await _settingService.SaveSettingAsync(_widgetSettings);
            }

            //locales
            await _localizationService.AddOrUpdateLocaleResourceAsync(new Dictionary <string, string>
            {
                ["Plugins.Widgets.What3words.Configuration"] = "Configuration",
                ["Plugins.Widgets.What3words.Configuration.Fields.Enabled"]      = "Enabled",
                ["Plugins.Widgets.What3words.Configuration.Fields.Enabled.Hint"] = "Toggle to enable/disable what3words service.",
                ["Plugins.Widgets.What3words.Configuration.Failed"]       = "Failed to get the generated API key",
                ["Plugins.Widgets.What3words.Address.Field.Label"]        = "what3words address",
                ["Plugins.Widgets.What3words.Address.Field.Tooltip"]      = "Is your property hard to find? To help your delivery driver find your exact location, please enter your what3words delivery address.",
                ["Plugins.Widgets.What3words.Address.Field.Tooltip.Link"] = "Find yours here"
            });

            await base.InstallAsync();
        }
コード例 #23
0
        /// <summary>
        /// Install the plugin
        /// </summary>
        /// <returns>A task that represents the asynchronous operation</returns>
        public override async Task InstallAsync()
        {
            //settings
            var settings = new ManualPaymentSettings
            {
                TransactMode = TransactMode.Pending
            };
            await _settingService.SaveSettingAsync(settings);

            //locales
            await _localizationService.AddOrUpdateLocaleResourceAsync(new Dictionary <string, string>
            {
                ["Plugins.Payments.Manual.Instructions"]                        = "This payment method stores credit card information in database (it's not sent to any third-party processor). In order to store credit card information, you must be PCI compliant.",
                ["Plugins.Payments.Manual.Fields.AdditionalFee"]                = "Additional fee",
                ["Plugins.Payments.Manual.Fields.AdditionalFee.Hint"]           = "Enter additional fee to charge your customers.",
                ["Plugins.Payments.Manual.Fields.AdditionalFeePercentage"]      = "Additional fee. Use percentage",
                ["Plugins.Payments.Manual.Fields.AdditionalFeePercentage.Hint"] = "Determines whether to apply a percentage additional fee to the order total. If not enabled, a fixed value is used.",
                ["Plugins.Payments.Manual.Fields.TransactMode"]                 = "After checkout mark payment as",
                ["Plugins.Payments.Manual.Fields.TransactMode.Hint"]            = "Specify transaction mode.",
                ["Plugins.Payments.Manual.PaymentMethodDescription"]            = "Pay by credit / debit card"
            });

            await base.InstallAsync();
        }
コード例 #24
0
        public override async Task InstallAsync()
        {
            //settings
            var settings = new ZarinpalPaymentSettings
            {
                UseSandbox    = true,
                RialToToman   = true,
                UseZarinGate  = false,
                BlockOverseas = false,
                Method        = EnumMethod.REST,
                ZarinGateType = EnumZarinGate.ZarinGate,
                MerchantID    = "99999999-9999-9999-9999-999999999999",
            };
            await _settingService.SaveSettingAsync(settings);

            await _localizationService.AddOrUpdateLocaleResourceAsync("Plugins.Payments.Zarinpal.Fields.ZarinGate.Use", "Use ZarinGate");

            await _localizationService.AddOrUpdateLocaleResourceAsync("Plugins.Payments.Zarinpal.Fields.ZarinGate.Use", "استفاده از زرین گیت", languageCulture : "fa-IR");

            await _localizationService.AddOrUpdateLocaleResourceAsync("Plugins.Payments.Zarinpal.Fields.ZarinGate.Type", "Select ZarinGate Type");

            await _localizationService.AddOrUpdateLocaleResourceAsync("Plugins.Payments.Zarinpal.Fields.ZarinGate.Type", "انتخاب نوع زرین گیت", languageCulture : "fa-IR");

            var zarinGateLink = "https://www.zarinpal.com/blog/زرین-گیت،-درگاهی-اختصاصی-به-نام-وبسایت/";
            await _localizationService.AddOrUpdateLocaleResourceAsync("Plugins.Payments.Zarinpal.Fields.ZarinGate.Instructions", $"Read About the <a href=\"{zarinGateLink}\">Zarin Gate</a> Then Select the ZarinGateLink type from below :");

            await _localizationService.AddOrUpdateLocaleResourceAsync("Plugins.Payments.Zarinpal.Fields.ZarinGate.Instructions",
                                                                      string.Concat("لطفا اول شرایط استفاده از زرین گیت را در ", $"<a href=\"{zarinGateLink}\"> در این قسمت </a>", "مطالعه نموده و سپس نوع آن را انتخاب نمایید")
                                                                      , languageCulture : "fa-IR");


            await _localizationService.AddOrUpdateLocaleResourceAsync("Plugins.Payments.ZarinPal.Fields.Method", "Communication Method");

            await _localizationService.AddOrUpdateLocaleResourceAsync("Plugins.Payments.ZarinPal.Fields.Method", "روش پرداخت", languageCulture : "fa-IR");

            await _localizationService.AddOrUpdateLocaleResourceAsync("Plugins.Payments.ZarinPal.Fields.Method.REST", "REST(recommanded)");

            await _localizationService.AddOrUpdateLocaleResourceAsync("Plugins.Payments.ZarinPal.Fields.Method.SOAP", "SOAP");

            await _localizationService.AddOrUpdateLocaleResourceAsync("Plugins.Payments.ZarinPal.Fields.UseSandbox", "Use Snadbox for testing payment GateWay without real paying.");

            await _localizationService.AddOrUpdateLocaleResourceAsync("Plugins.Payments.ZarinPal.Fields.UseSandbox", "تست درگاه زرین پال بدون پرداخت هزینه", languageCulture : "fa-IR");

            await _localizationService.AddOrUpdateLocaleResourceAsync("Plugins.Payments.ZarinPal.Fields.MerchantID", "GateWay Merchant ID");

            await _localizationService.AddOrUpdateLocaleResourceAsync("Plugins.Payments.ZarinPal.Fields.MerchantID", "کد پذیرنده", languageCulture : "fa-IR");

            await _localizationService.AddOrUpdateLocaleResourceAsync("Plugins.Payments.ZarinPal.Instructions",
                                                                      string.Concat("You can use Zarinpal.com GateWay as a payment gateway. Zarinpal is not a bank but it is an interface which customers can pay with.",
                                                                                    "<br/>", "Please consider that if you leave MerchantId field empty the Zarinpal Gateway will be hidden and not choosable when checking out"));

            await _localizationService.AddOrUpdateLocaleResourceAsync("Plugins.Payments.ZarinPal.Instructions",
                                                                      string.Concat("شما می توانید از زرین پال به عنوان یک درگاه پرداخت استفاده نمایید، زرین پال یک بانک نیست بلکه یک واسط بانکی است که کاربران میتوانند از طریق آن مبلغ مورد نظر را پرداخت نمایند، باید آگاه باشید که درگاه زرین پال درصدی از پول پرداخت شده کاربران را به عنوان کارمزد دریافت میکند.",
                                                                                    "<br/>", "توجه داشته باشید که اگر فیلد کد پذیرنده خالی باشد درگاه زرین پال در هنگام پرداخت مخفی می شود و قابل انتخاب نیست"), languageCulture : "fa-IR");

            await _localizationService.AddOrUpdateLocaleResourceAsync("plugins.payments.zarinpal.PaymentMethodDescription", "ZarinPal, The Bank Interface");

            await _localizationService.AddOrUpdateLocaleResourceAsync("plugins.payments.zarinpal.PaymentMethodDescription", "درگاه واسط زرین پال", languageCulture : "fa-IR");

            await _localizationService.AddOrUpdateLocaleResourceAsync("Plugins.Payments.Zarinpal.Fields.RedirectionTip", "You will be redirected to ZarinPal site to complete the order.");

            await _localizationService.AddOrUpdateLocaleResourceAsync("Plugins.Payments.Zarinpal.Fields.RedirectionTip", "هم اکنون به درگاه بانک زرین پال منتقل می شوید.", languageCulture : "fa-IR");

            await _localizationService.AddOrUpdateLocaleResourceAsync("Plugins.Payments.Zarinpal.Fields.BlockOverseas", "Block oversease access (block non Iranians)");

            await _localizationService.AddOrUpdateLocaleResourceAsync("Plugins.Payments.Zarinpal.Fields.BlockOverseas", "قطع دسترسی برای آی پی های خارج از کشور", languageCulture : "fa-IR");

            await _localizationService.AddOrUpdateLocaleResourceAsync("Plugins.Payments.Zarinpal.Fields.RialToToman", "Convert Rial To Toman");

            await _localizationService.AddOrUpdateLocaleResourceAsync("Plugins.Payments.Zarinpal.Fields.RialToToman", "تبدیل ریال به تومن", languageCulture : "fa-IR");

            await _localizationService.AddOrUpdateLocaleResourceAsync("Plugins.Payments.Zarinpal.Fields.RialToToman.Instructions",
                                                                      string.Concat(
                                                                          "The default currency of zarinpal is Toman", "<br/>",
                                                                          "Therefore if your website uses Rial before paying it should be converted to Toman", "<br/>",
                                                                          "please consider that to convert Rial to Toman system divides total to 10, so the last digit will be removed", "<br/>",
                                                                          "To do the stuff check this option"
                                                                          ));

            await _localizationService.AddOrUpdateLocaleResourceAsync("Plugins.Payments.Zarinpal.Fields.RialToToman.Instructions",
                                                                      string.Concat(
                                                                          "واحد ارزی پیش فرض درگاه پرداخت زرین پال تومان می باشد.", "<br/>",
                                                                          "لذا در صورتی که وبسایت شما از واحد ارزی ریال استفاده می کند باید قبل از پرداخت مبلغ نهایی به تومان تبدیل گردد", "<br/>",
                                                                          "لطفا در نظر داشته باشید که جهت تبدیل ریال به تومان عدد تقسیم بر 10 شده و در واقع رقم آخر حذف می گردد", "<br/>",
                                                                          "در صورتی که مایل به تغییر از ریال به تومان هنگام پرداخت می باشید این گزینه را فعال نمایید"
                                                                          ), languageCulture : "fa-IR");

            await base.InstallAsync();
        }
        /// <summary>
        /// Install the plugin
        /// </summary>
        /// <returns>The <see cref="Task"/></returns>
        public override async Task InstallAsync()
        {
            //settings
            await _settingService.SaveSettingAsync(new OpenPayPaymentSettings
            {
                UseSandbox = true,
                DisplayProductPageWidget    = true,
                DisplayProductListingWidget = true,
                DisplayCartWidget           = true,
                DisplayInfoBeltWidget       = true,
                DisplayLandingPageWidget    = true,
                PlanTiers                     = "2,4,6",
                LogCallbackErrors             = true,
                CartWidgetLogo                = "grey-on-amberbg",
                InfoBeltWidgetColor           = "white",
                ProductListingWidgetLogo      = "grey",
                ProductListingHideLogo        = false,
                ProductPageWidgetLogo         = "grey-on-amberbg",
                ProductPageWidgetLogoPosition = "left"
            });

            if (!_widgetSettings.ActiveWidgetSystemNames.Contains(Defaults.SystemName))
            {
                _widgetSettings.ActiveWidgetSystemNames.Add(Defaults.SystemName);
                await _settingService.SaveSettingAsync(_widgetSettings);
            }

            //schedule tasks
            foreach (var task in Defaults.ScheduleTasks)
            {
                if (await _scheduleTaskService.GetTaskByTypeAsync(task.Type) == null)
                {
                    await _scheduleTaskService.InsertTaskAsync(task);
                }
            }

            //locales
            await _localizationService.AddOrUpdateLocaleResourceAsync(new Dictionary <string, string>
            {
                ["Plugins.Payments.OpenPay.Fields.UseSandbox"]                         = "Use sandbox",
                ["Plugins.Payments.OpenPay.Fields.UseSandbox.Hint"]                    = "Determine whether to use the sandbox environment for testing purposes.",
                ["Plugins.Payments.OpenPay.Fields.ApiToken"]                           = "API Token",
                ["Plugins.Payments.OpenPay.Fields.ApiToken.Hint"]                      = "Enter the token to sign the API requests.",
                ["Plugins.Payments.OpenPay.Fields.ApiToken.Required"]                  = "The API Token is required.",
                ["Plugins.Payments.OpenPay.Fields.CartWidgetLogo"]                     = "Logo style",
                ["Plugins.Payments.OpenPay.Fields.CartWidgetLogo.Hint"]                = "Enter the logo style of the cart widget (e.g. 'grey-on-amberbg' or 'grey').",
                ["Plugins.Payments.OpenPay.Fields.InfoBeltWidgetColor"]                = "Color style",
                ["Plugins.Payments.OpenPay.Fields.InfoBeltWidgetColor.Hint"]           = "Enter the color style of the info belt widget (e.g. 'amber', 'white' or 'grey').",
                ["Plugins.Payments.OpenPay.Fields.ProductListingWidgetLogo"]           = "Logo style",
                ["Plugins.Payments.OpenPay.Fields.ProductListingWidgetLogo.Hint"]      = "Enter the logo style of the product listing widget (e.g. 'grey' or 'white').",
                ["Plugins.Payments.OpenPay.Fields.RegionTwoLetterIsoCode"]             = "Payment from applicable country",
                ["Plugins.Payments.OpenPay.Fields.RegionTwoLetterIsoCode.Hint"]        = "Select the applicable country. Note that the primary store currency must match the currency of the country.",
                ["Plugins.Payments.OpenPay.Fields.RegionTwoLetterIsoCode.Required"]    = "The country is required.",
                ["Plugins.Payments.OpenPay.Fields.MinOrderTotal"]                      = "Minimum order total",
                ["Plugins.Payments.OpenPay.Fields.MinOrderTotal.Hint"]                 = "The minimum order total. If order total is less the minimum order total then the payment method will be hidden in checkout process.",
                ["Plugins.Payments.OpenPay.Fields.MaxOrderTotal"]                      = "Maximum order total",
                ["Plugins.Payments.OpenPay.Fields.MaxOrderTotal.Hint"]                 = "The maximum order total. If order total is greater the maximum order total then the payment method will be hidden in checkout process.",
                ["Plugins.Payments.OpenPay.Fields.AdditionalFee"]                      = "Additional fee",
                ["Plugins.Payments.OpenPay.Fields.AdditionalFee.Hint"]                 = "Enter additional fee to charge your customers.",
                ["Plugins.Payments.OpenPay.Fields.AdditionalFeePercentage"]            = "Additional fee. Use percentage",
                ["Plugins.Payments.OpenPay.Fields.AdditionalFeePercentage.Hint"]       = "Determines whether to apply a percentage additional fee to the order total. If not enabled, a fixed value is used.",
                ["Plugins.Payments.OpenPay.Fields.DisplayProductPageWidget"]           = "Display the product page widget",
                ["Plugins.Payments.OpenPay.Fields.DisplayProductPageWidget.Hint"]      = "Check to display the product page widget on a product page.",
                ["Plugins.Payments.OpenPay.Fields.DisplayProductListingWidget"]        = "Display the product listing widget",
                ["Plugins.Payments.OpenPay.Fields.DisplayProductListingWidget.Hint"]   = "Check to display the product listing widget in a product box (e.g. on a category page).",
                ["Plugins.Payments.OpenPay.Fields.ProductListingHideLogo"]             = "Hide logo",
                ["Plugins.Payments.OpenPay.Fields.ProductListingHideLogo.Hint"]        = "Check to hide the logo of the product listing widget.",
                ["Plugins.Payments.OpenPay.Fields.DisplayCartWidget"]                  = "Display the cart widget",
                ["Plugins.Payments.OpenPay.Fields.DisplayCartWidget.Hint"]             = "Check to display the cart widget in the shopping cart.",
                ["Plugins.Payments.OpenPay.Fields.DisplayInfoBeltWidget"]              = "Display the info belt widget",
                ["Plugins.Payments.OpenPay.Fields.DisplayInfoBeltWidget.Hint"]         = "Check to display the info belt in the page head.",
                ["Plugins.Payments.OpenPay.Fields.DisplayLandingPageWidget"]           = "Display the landing page widget",
                ["Plugins.Payments.OpenPay.Fields.DisplayLandingPageWidget.Hint"]      = "Check to display the landing page link in footer.",
                ["Plugins.Payments.OpenPay.Fields.PlanTiers"]                          = "Plan tiers",
                ["Plugins.Payments.OpenPay.Fields.PlanTiers.Hint"]                     = "Enter the plan tiers in months. E.g. '2,4,6' for 2 months, 4 months and 6 months.",
                ["Plugins.Payments.OpenPay.Fields.PlanTiers.Required"]                 = "The plan tiers are required.",
                ["Plugins.Payments.OpenPay.Fields.ProductPageWidgetLogo"]              = "Logo style",
                ["Plugins.Payments.OpenPay.Fields.ProductPageWidgetLogo.Hint"]         = "Enter the logo style of the product page widget (e.g. 'grey-on-amberbg', 'grey', 'amber' or 'white').",
                ["Plugins.Payments.OpenPay.Fields.ProductPageWidgetLogoPosition"]      = "Logo position",
                ["Plugins.Payments.OpenPay.Fields.ProductPageWidgetLogoPosition.Hint"] = "Enter the logo position of the product page widget (e.g. 'left' or 'right').",
                ["Plugins.Payments.OpenPay.PaymentMethodDescription"]                  = "Pay by Openpay",
                ["Plugins.Payments.OpenPay.InvalidCurrency"]                           = "The primary store currency must match the currency of the country '{0}'. You must set the primary store currency to '{1}'.",
                ["Plugins.Payments.OpenPay.DownloadOrderLimitsButton"]                 = "Get Min/Max limits",
                ["Plugins.Payments.OpenPay.OrderLimitsDownloaded"]                     = "The order limits are downloaded successfully.",
                ["Plugins.Payments.OpenPay.FailedOrderCreation"]                       = "Error when calling Openpay create order endpoint. Please try again or contact with store owner.",
                ["Plugins.Payments.OpenPay.IsNotConfigured"]                           = "Plugin isn't configured.",
                ["Plugins.Payments.OpenPay.SuccessfulPayment"]                         = "The payment was successful. Thanks you.",
                ["Plugins.Payments.OpenPay.InvalidPayment"]                = "The payment was not processed. Please try again or contact with store owner.",
                ["Plugins.Payments.OpenPay.CartWidgetMoreInfoText"]        = "Learn more",
                ["Plugins.Payments.OpenPay.ProductPageWidgetMoreInfoText"] = "Learn more",
                ["Plugins.Payments.OpenPay.Widgets"]                = "Widgets",
                ["Plugins.Payments.OpenPay.OrderLimits"]            = "Order limits",
                ["Plugins.Payments.OpenPay.LandingPageLinkName"]    = "Openpay",
                ["Plugins.Payments.OpenPay.RedirectionTip"]         = "You will be redirected to Openpay's website to complete your order.",
                ["Plugins.Payments.OpenPay.OrderLimitsDescription"] = "Click <i>Get Min/Max limits</i> button to get the currently configured Min and Max purchase price range. This is necessary in order to not display Openpay as a payment option if the order total is not within the range. You can get the order limits only 3 times on any given calendar day. Also you can configure the background task <a href=\"{0}\" target=\"_blank\">here</a> to get the order limits periodically.",
                ["Plugins.Payments.OpenPay.Instructions"]           = @"
                    <p>
                        1. <a href=""https://www.openpay.co.uk/for-business/"" target=""_blank"">Apply for United Kingdom</a> or <a href=""https://www.openpay.com.au/business/"" target=""_blank"">Apply for Australia</a> Openpay Merchant Account
                        <br />2. Enter the API token provided by Openpay
                        <br />3. Choose the applicable country. Note that the primary store currency must match the currency of the country
                        <br />4. Click <i>Save</i> button
                        <br />5. Click <i>Get Min/Max limits</i> button
	                    <br />
                        <i>Note: The Openpay payment method isn't available for the products that cannot be shipped.</i>
                    </p>",
            });

            await base.InstallAsync();
        }
コード例 #26
0
        /// <summary>
        /// Collect the UP migration expressions
        /// </summary>
        public override void Up()
        {
            if (!DataSettingsManager.IsDatabaseInstalled())
            {
                return;
            }

            //locales
            var languages  = _languageService.GetAllLanguagesAsync(true).Result;
            var languageId = languages
                             .FirstOrDefault(lang => lang.UniqueSeoCode == new CultureInfo(NopCommonDefaults.DefaultLanguageCulture).TwoLetterISOLanguageName)
                             ?.Id;

            _localizationService.AddOrUpdateLocaleResourceAsync(new Dictionary <string, string>
            {
                ["Plugins.Tax.Avalara.Configuration.Certificates"]                = "Exemption certificates",
                ["Plugins.Tax.Avalara.Configuration.Certificates.InProgress"]     = "Exemption certificates",
                ["Plugins.Tax.Avalara.Configuration.Certificates.NotProvisioned"] = "The selected company isn't configured to use exemption certificates, use the button 'Request certificate setup' below to access this feature",
                ["Plugins.Tax.Avalara.Configuration.Certificates.Provisioned"]    = "The selected company is configured to use exemption certificates",
                ["Plugins.Tax.Avalara.Configuration.Certificates.Button"]         = "Request certificate setup",
                ["Plugins.Tax.Avalara.Configuration.Common"]                          = "Common settings",
                ["Plugins.Tax.Avalara.Configuration.Credentials.Button"]              = "Check connection",
                ["Plugins.Tax.Avalara.Configuration.Credentials.Declined"]            = "Credentials declined",
                ["Plugins.Tax.Avalara.Configuration.Credentials.Verified"]            = "Credentials verified",
                ["Plugins.Tax.Avalara.Configuration.TaxCalculation"]                  = "Tax calculation",
                ["Plugins.Tax.Avalara.ExemptionCertificates"]                         = "Tax exemption certificates",
                ["Plugins.Tax.Avalara.ExemptionCertificates.Add.ExposureZone"]        = "State",
                ["Plugins.Tax.Avalara.ExemptionCertificates.Add.Fail"]                = "An error occurred while adding a certificate",
                ["Plugins.Tax.Avalara.ExemptionCertificates.Add.Success"]             = "Certificate added successfully",
                ["Plugins.Tax.Avalara.ExemptionCertificates.Description"]             = @"
                    <h3>Here you can view and manage your certificates.</h3>
                    <p>
                        The certificate document contains information about a customer's eligibility for exemption from sales.<br />
                        When you add a certificate, it will be processed and become available for use in calculating tax exemptions.<br />
                    </p>
                    <p>
                        You can also go to <a href=""{0}"" target=""_blank"">CertExpress website</a> where you can follow a step-by-step guide to enter information about your exemption certificates.
                    </p>
                    <p>
                        The certificates entered will be recorded and automatically linked to your account.
                    </p>
                    <p>If you have any questions, please <a href=""{1}"" target=""_blank"">contact us</a>.</p>",
                ["Plugins.Tax.Avalara.ExemptionCertificates.ExpirationDate"]          = "Expiration date",
                ["Plugins.Tax.Avalara.ExemptionCertificates.ExposureZone"]            = "State",
                ["Plugins.Tax.Avalara.ExemptionCertificates.None"]                    = "No downloaded certificates yet",
                ["Plugins.Tax.Avalara.ExemptionCertificates.OrderReview"]             = "Tax",
                ["Plugins.Tax.Avalara.ExemptionCertificates.OrderReview.Applied"]     = "Exemption certificate applied",
                ["Plugins.Tax.Avalara.ExemptionCertificates.OrderReview.None"]        = @"You have no valid certificates in the selected region. You can add them in your account on <a href=""{0}"" target=""_blank"" style=""color: #4ab2f1;"">this page</a>.",
                ["Plugins.Tax.Avalara.ExemptionCertificates.SignedDate"]              = "Signed date",
                ["Plugins.Tax.Avalara.ExemptionCertificates.Status"]                  = "Status",
                ["Plugins.Tax.Avalara.ExemptionCertificates.View"]                    = "View",
                ["Plugins.Tax.Avalara.Fields.AllowEditCustomer"]                      = "Allow edit info",
                ["Plugins.Tax.Avalara.Fields.AllowEditCustomer.Hint"]                 = "Determine whether to allow customers to edit their info (name, phone, address, etc) when managing certificates. If disabled, the info will be auto updated when customers change details in their accounts.",
                ["Plugins.Tax.Avalara.Fields.AutoValidateCertificate"]                = "Auto validate certificates",
                ["Plugins.Tax.Avalara.Fields.AutoValidateCertificate.Hint"]           = "Determine whether the new certificates are automatically valid, this allows your customers to make exempt purchases right away, otherwise a customer is not treated as exempt until you validate the document.",
                ["Plugins.Tax.Avalara.Fields.CustomerRoles"]                          = "Limited to customer roles",
                ["Plugins.Tax.Avalara.Fields.CustomerRoles.Hint"]                     = "Select customer roles for which exemption certificates will be available. Leave empty if you want this feature to be available to all customers.",
                ["Plugins.Tax.Avalara.Fields.DisplayNoValidCertificatesMessage"]      = "Display 'No valid certificates' message",
                ["Plugins.Tax.Avalara.Fields.DisplayNoValidCertificatesMessage.Hint"] = "Determine whether to display a message that there are no valid certificates for the customer on the order confirmation page.",
                ["Plugins.Tax.Avalara.Fields.EnableCertificates"]                     = "Enable exemption certificates",
                ["Plugins.Tax.Avalara.Fields.EnableCertificates.Hint"]                = "Determine whether to enable this feature. In this case, a new page will be added in the account section, so customers can manage their exemption certificates before making a purchase.",
                ["Plugins.Tax.Avalara.Fields.EnableCertificates.Warning"]             = "To use this feature, you need the following information from customers: name, country, state, city, address, postal code. Ensure that the appropriate Customer form fields are enabled under <a href=\"{0}\" target=\"_blank\">Customer settings</a>",
                ["Plugins.Tax.Avalara.TestTax.Button"] = "Submit",
            }, languageId).Wait();

            _localizationService.DeleteLocaleResourcesAsync(new List <string>
            {
                "Enums.Nop.Plugin.Tax.Avalara.Domain.LogType.Create",
                "Enums.Nop.Plugin.Tax.Avalara.Domain.LogType.CreateResponse",
                "Enums.Nop.Plugin.Tax.Avalara.Domain.LogType.Error",
                "Enums.Nop.Plugin.Tax.Avalara.Domain.LogType.Refund",
                "Enums.Nop.Plugin.Tax.Avalara.Domain.LogType.RefundResponse",
                "Enums.Nop.Plugin.Tax.Avalara.Domain.LogType.Void",
                "Enums.Nop.Plugin.Tax.Avalara.Domain.LogType.VoidResponse",
                "Plugins.Tax.Avalara.VerifyCredentials",
                "Plugins.Tax.Avalara.VerifyCredentials.Declined",
                "Plugins.Tax.Avalara.VerifyCredentials.Verified",
            }).Wait();

            //settings
            if (!_settingService.SettingExistsAsync(_avalaraTaxSettings, settings => settings.CompanyId).Result)
            {
                _avalaraTaxSettings.CompanyId = null;
            }
            if (!_settingService.SettingExistsAsync(_avalaraTaxSettings, settings => settings.EnableCertificates).Result)
            {
                _avalaraTaxSettings.EnableCertificates = false;
            }
            if (!_settingService.SettingExistsAsync(_avalaraTaxSettings, settings => settings.AutoValidateCertificate).Result)
            {
                _avalaraTaxSettings.AutoValidateCertificate = true;
            }
            if (!_settingService.SettingExistsAsync(_avalaraTaxSettings, settings => settings.AllowEditCustomer).Result)
            {
                _avalaraTaxSettings.AllowEditCustomer = true;
            }
            if (!_settingService.SettingExistsAsync(_avalaraTaxSettings, settings => settings.DisplayNoValidCertificatesMessage).Result)
            {
                _avalaraTaxSettings.DisplayNoValidCertificatesMessage = true;
            }
            if (!_settingService.SettingExistsAsync(_avalaraTaxSettings, settings => settings.CustomerRoleIds).Result)
            {
                _avalaraTaxSettings.CustomerRoleIds = null;
            }
            if (!_settingService.SettingExistsAsync(_avalaraTaxSettings, settings => settings.PreviewCertificate).Result)
            {
                _avalaraTaxSettings.PreviewCertificate = false;
            }
            if (!_settingService.SettingExistsAsync(_avalaraTaxSettings, settings => settings.UploadOnly).Result)
            {
                _avalaraTaxSettings.UploadOnly = false;
            }
            if (!_settingService.SettingExistsAsync(_avalaraTaxSettings, settings => settings.FillOnly).Result)
            {
                _avalaraTaxSettings.FillOnly = false;
            }
            _settingService.SaveSettingAsync(_avalaraTaxSettings).Wait();
        }
コード例 #27
0
        /// <summary>
        /// Install the plugin
        /// </summary>
        /// <returns>A task that represents the asynchronous operation</returns>
        public override async Task InstallAsync()
        {
            //settings
            await _settingService.SaveSettingAsync(new SendinblueSettings
            {
                //prepopulate a tracking script
                TrackingScript = $@"<!-- Sendinblue tracking code -->
                <script>
                    (function() {{
                        window.sib = {{ equeue: [], client_key: '{SendinblueDefaults.TrackingScriptId}' }};
                        window.sib.email_id = '{SendinblueDefaults.TrackingScriptCustomerEmail}';
                        window.sendinblue = {{}}; for (var j = ['track', 'identify', 'trackLink', 'page'], i = 0; i < j.length; i++) {{ (function(k) {{ window.sendinblue[k] = function() {{ var arg = Array.prototype.slice.call(arguments); (window.sib[k] || function() {{ var t = {{}}; t[k] = arg; window.sib.equeue.push(t);}})(arg[0], arg[1], arg[2]);}};}})(j[i]);}}var n = document.createElement('script'),i = document.getElementsByTagName('script')[0]; n.type = 'text/javascript', n.id = 'sendinblue-js', n.async = !0, n.src = 'https://sibautomation.com/sa.js?key=' + window.sib.client_key, i.parentNode.insertBefore(n, i), window.sendinblue.page();
                    }})();
                </script>"
            });

            if (!_widgetSettings.ActiveWidgetSystemNames.Contains(SendinblueDefaults.SystemName))
            {
                _widgetSettings.ActiveWidgetSystemNames.Add(SendinblueDefaults.SystemName);
                await _settingService.SaveSettingAsync(_widgetSettings);
            }

            //install synchronization task
            if (await _scheduleTaskService.GetTaskByTypeAsync(SendinblueDefaults.SynchronizationTask) == null)
            {
                await _scheduleTaskService.InsertTaskAsync(new ScheduleTask
                {
                    Enabled        = true,
                    LastEnabledUtc = DateTime.UtcNow,
                    Seconds        = SendinblueDefaults.DefaultSynchronizationPeriod * 60 * 60,
                    Name           = SendinblueDefaults.SynchronizationTaskName,
                    Type           = SendinblueDefaults.SynchronizationTask,
                });
            }

            //locales
            await _localizationService.AddOrUpdateLocaleResourceAsync(new Dictionary <string, string>
            {
                ["Plugins.Misc.Sendinblue.AccountInfo"]                        = "Account info",
                ["Plugins.Misc.Sendinblue.AccountInfo.Hint"]                   = "Display account information.",
                ["Plugins.Misc.Sendinblue.ActivateSMTP"]                       = "On your Sendinblue account, the SMTP has not been enabled yet. To request its activation, simply send an email to our support team at [email protected] and mention that you will be using the SMTP with the nopCommerce plugin.",
                ["Plugins.Misc.Sendinblue.AddNewSMSNotification"]              = "Add new SMS notification",
                ["Plugins.Misc.Sendinblue.BillingAddressPhone"]                = "Billing address phone number",
                ["Plugins.Misc.Sendinblue.CustomerPhone"]                      = "Customer phone number",
                ["Plugins.Misc.Sendinblue.EditTemplate"]                       = "Edit template",
                ["Plugins.Misc.Sendinblue.Fields.AllowedTokens"]               = "Allowed message variables",
                ["Plugins.Misc.Sendinblue.Fields.AllowedTokens.Hint"]          = "This is a list of the message variables you can use in your SMS.",
                ["Plugins.Misc.Sendinblue.Fields.ApiKey"]                      = "API v3 key",
                ["Plugins.Misc.Sendinblue.Fields.ApiKey.Hint"]                 = "Paste your Sendinblue account API v3 key.",
                ["Plugins.Misc.Sendinblue.Fields.CampaignList"]                = "List",
                ["Plugins.Misc.Sendinblue.Fields.CampaignList.Hint"]           = "Choose list of contacts to send SMS campaign.",
                ["Plugins.Misc.Sendinblue.Fields.CampaignSenderName"]          = "Send SMS campaign from",
                ["Plugins.Misc.Sendinblue.Fields.CampaignSenderName.Hint"]     = "Input the name of the sender. The number of characters is limited to 11 (alphanumeric format).",
                ["Plugins.Misc.Sendinblue.Fields.CampaignText"]                = "Text",
                ["Plugins.Misc.Sendinblue.Fields.CampaignText.Hint"]           = "Specify SMS campaign content. The number of characters is limited to 160 for one message.",
                ["Plugins.Misc.Sendinblue.Fields.List"]                        = "List",
                ["Plugins.Misc.Sendinblue.Fields.List.Hint"]                   = "Select the Sendinblue list where your nopCommerce newsletter subscribers will be added.",
                ["Plugins.Misc.Sendinblue.Fields.MaKey"]                       = "Tracker ID",
                ["Plugins.Misc.Sendinblue.Fields.MaKey.Hint"]                  = "Input your Tracker ID.",
                ["Plugins.Misc.Sendinblue.Fields.Sender"]                      = "Send emails from",
                ["Plugins.Misc.Sendinblue.Fields.Sender.Hint"]                 = "Choose sender of your transactional emails.",
                ["Plugins.Misc.Sendinblue.Fields.SmsSenderName"]               = "Send SMS from",
                ["Plugins.Misc.Sendinblue.Fields.SmsSenderName.Hint"]          = "Input the name of the sender. The number of characters is limited to 11 (alphanumeric format).",
                ["Plugins.Misc.Sendinblue.Fields.SmtpKey"]                     = "SMTP key",
                ["Plugins.Misc.Sendinblue.Fields.SmtpKey.Hint"]                = "Specify SMTP key (password).",
                ["Plugins.Misc.Sendinblue.Fields.StoreOwnerPhoneNumber"]       = "Store owner phone number",
                ["Plugins.Misc.Sendinblue.Fields.StoreOwnerPhoneNumber.Hint"]  = "Input store owner phone number for SMS notifications.",
                ["Plugins.Misc.Sendinblue.Fields.TrackingScript"]              = "Tracking script",
                ["Plugins.Misc.Sendinblue.Fields.TrackingScript.Hint"]         = $"Paste the tracking script generated by Sendinblue here. {SendinblueDefaults.TrackingScriptId} and {SendinblueDefaults.TrackingScriptCustomerEmail} will be dynamically replaced.",
                ["Plugins.Misc.Sendinblue.Fields.UseMarketingAutomation"]      = "Use Marketing Automation",
                ["Plugins.Misc.Sendinblue.Fields.UseMarketingAutomation.Hint"] = "Check for enable Sendinblue Automation.",
                ["Plugins.Misc.Sendinblue.Fields.UseSmsNotifications"]         = "Use SMS notifications",
                ["Plugins.Misc.Sendinblue.Fields.UseSmsNotifications.Hint"]    = "Check for sending transactional SMS.",
                ["Plugins.Misc.Sendinblue.Fields.UseSmtp"]                     = "Use Sendinblue SMTP",
                ["Plugins.Misc.Sendinblue.Fields.UseSmtp.Hint"]                = "Check for using Sendinblue SMTP for sending transactional emails.",
                ["Plugins.Misc.Sendinblue.General"]             = "General",
                ["Plugins.Misc.Sendinblue.ImportProcess"]       = "Your import is in process",
                ["Plugins.Misc.Sendinblue.ManualSync"]          = "Manual synchronization",
                ["Plugins.Misc.Sendinblue.SyncNow"]             = "Sync now",
                ["Plugins.Misc.Sendinblue.MarketingAutomation"] = "Marketing Automation",
                ["Plugins.Misc.Sendinblue.MyPhone"]             = "Store owner phone number",
                ["Plugins.Misc.Sendinblue.PhoneType"]           = "Type of phone number",
                ["Plugins.Misc.Sendinblue.PhoneType.Hint"]      = "Specify the type of phone number to send SMS.",
                ["Plugins.Misc.Sendinblue.SMS"]                   = "SMS",
                ["Plugins.Misc.Sendinblue.SMS.Campaigns"]         = "SMS campaigns",
                ["Plugins.Misc.Sendinblue.SMS.Campaigns.Sent"]    = "Campaign successfully sent",
                ["Plugins.Misc.Sendinblue.SMS.Campaigns.Submit"]  = "Send campaign",
                ["Plugins.Misc.Sendinblue.SMSText"]               = "Text",
                ["Plugins.Misc.Sendinblue.SMSText.Hint"]          = "Enter SMS text to send.",
                ["Plugins.Misc.Sendinblue.Synchronization"]       = "Contacts",
                ["Plugins.Misc.Sendinblue.Transactional"]         = "Transactional emails",
                ["Plugins.Misc.Sendinblue.UseSendinblueTemplate"] = "Sendinblue template"
            });

            await base.InstallAsync();
        }
コード例 #28
0
        /// <summary>
        /// Install plugin
        /// </summary>
        /// <returns>A task that represents the asynchronous operation</returns>
        public override async Task InstallAsync()
        {
            await _settingService.SaveSettingAsync(new EasyPostSettings
            {
                UseSandbox = true,
                UseAllAvailableCarriers = true,
                LogShipmentMessages     = true,
                UseSmartRates           = true
            });

            if (!_widgetSettings.ActiveWidgetSystemNames.Contains(EasyPostDefaults.SystemName))
            {
                _widgetSettings.ActiveWidgetSystemNames.Add(EasyPostDefaults.SystemName);
                await _settingService.SaveSettingAsync(_widgetSettings);
            }

            await _localizationService.AddOrUpdateLocaleResourceAsync(new Dictionary <string, string>
            {
                ["Plugins.Shipping.EasyPost.Batch"]                     = "EasyPost Batches",
                ["Plugins.Shipping.EasyPost.Batch.BackToList"]          = "back to batch list",
                ["Plugins.Shipping.EasyPost.Batch.DownloadLabel"]       = "Download label",
                ["Plugins.Shipping.EasyPost.Batch.DownloadManifest"]    = "Download manifest",
                ["Plugins.Shipping.EasyPost.Batch.Edit"]                = "Edit batch details",
                ["Plugins.Shipping.EasyPost.Batch.Fields.CreatedOn"]    = "Created on",
                ["Plugins.Shipping.EasyPost.Batch.Fields.Id"]           = "Batch Id",
                ["Plugins.Shipping.EasyPost.Batch.Fields.PickupStatus"] = "Pickup status",
                ["Plugins.Shipping.EasyPost.Batch.Fields.Status"]       = "Status",
                ["Plugins.Shipping.EasyPost.Batch.Fields.UpdatedOn"]    = "Updated on",
                ["Plugins.Shipping.EasyPost.Batch.GenerateLabel"]       = "Generate label",
                ["Plugins.Shipping.EasyPost.Batch.GenerateLabel.Pdf"]   = "PDF",
                ["Plugins.Shipping.EasyPost.Batch.GenerateLabel.Zpl"]   = "ZPL",
                ["Plugins.Shipping.EasyPost.Batch.GenerateManifest"]    = "Generate manifest",
                ["Plugins.Shipping.EasyPost.Batch.Search.Status"]       = "Status",
                ["Plugins.Shipping.EasyPost.Batch.Search.Status.Hint"]  = "Search by the status.",
                ["Plugins.Shipping.EasyPost.Batch.Shipments"]           = "Associated shipments",
                ["Plugins.Shipping.EasyPost.Batch.Shipments.Add"]       = "Add shipments",
                ["Plugins.Shipping.EasyPost.Batch.Shipments.Add.Save"]  = "Add selected",

                ["Plugins.Shipping.EasyPost.Checkout.AddressVerification.Warning"] = "Unable to verify the address: {0}. Please double check your input and if you are sure that data is correct, ignore this message.",
                ["Plugins.Shipping.EasyPost.Checkout.Error"] = "Failed to get shipping rates, please contact the manager.",

                ["Plugins.Shipping.EasyPost.Configuration.AddressVerification"]                   = "Address verification",
                ["Plugins.Shipping.EasyPost.Configuration.Carriers"]                              = "Carriers",
                ["Plugins.Shipping.EasyPost.Configuration.Credentials"]                           = "Credentials",
                ["Plugins.Shipping.EasyPost.Configuration.Currency.Warning"]                      = "Required currency ({0}) is not found. Make sure it is created on <a href=\"{1}\" target=\"_blank\">this page</a>",
                ["Plugins.Shipping.EasyPost.Configuration.Fields.AddressVerification"]            = "Address verification",
                ["Plugins.Shipping.EasyPost.Configuration.Fields.AddressVerification.Hint"]       = "Check to use the address verification. Verification system will automatically make minor corrections to spelling/format if applicable.",
                ["Plugins.Shipping.EasyPost.Configuration.Fields.ApiKey"]                         = "Production API key",
                ["Plugins.Shipping.EasyPost.Configuration.Fields.ApiKey.Hint"]                    = "Specify EasyPost production API key.",
                ["Plugins.Shipping.EasyPost.Configuration.Fields.ApiKey.Required"]                = "API key is required",
                ["Plugins.Shipping.EasyPost.Configuration.Fields.CarrierAccounts"]                = "Carrier accounts",
                ["Plugins.Shipping.EasyPost.Configuration.Fields.CarrierAccounts.Hint"]           = "Select carrier accounts whose shipping rates to use.",
                ["Plugins.Shipping.EasyPost.Configuration.Fields.CarrierAccounts.None"]           = "There are no configured carrier accounts",
                ["Plugins.Shipping.EasyPost.Configuration.Fields.StrictAddressVerification"]      = "Strict address verification",
                ["Plugins.Shipping.EasyPost.Configuration.Fields.StrictAddressVerification.Hint"] = "Check to use the strict address verification. The failure of this verification causes the whole request to fail and the customer will need to correct and specify the address again.",
                ["Plugins.Shipping.EasyPost.Configuration.Fields.TestApiKey"]                     = "Test API key",
                ["Plugins.Shipping.EasyPost.Configuration.Fields.TestApiKey.Hint"]                = "Specify EasyPost test API key.",
                ["Plugins.Shipping.EasyPost.Configuration.Fields.UseAllAvailableCarriers"]        = "Use all available carriers",
                ["Plugins.Shipping.EasyPost.Configuration.Fields.UseAllAvailableCarriers.Hint"]   = "Check to use all available carrier accounts to get shipping rates.",
                ["Plugins.Shipping.EasyPost.Configuration.Fields.UseSandbox"]                     = "Test mode",
                ["Plugins.Shipping.EasyPost.Configuration.Fields.UseSandbox.Hint"]                = "Check to use Test mode for testing purposes.",
                ["Plugins.Shipping.EasyPost.Configuration.Measures.Warning"]                      = "Required measures ({0} and {1}) are not found. Make sure they are created and the ratio is set correctly on <a href=\"{2}\" target=\"_blank\">this page</a>",

                ["Plugins.Shipping.EasyPost.Error"]       = "Error: {0} (see details in the <a href=\"{1}\" target=\"_blank\">log</a>)",
                ["Plugins.Shipping.EasyPost.Error.Alert"] = "Error: {0} (see details in the log)",

                ["Plugins.Shipping.EasyPost.Pickup"]                   = "Pickup",
                ["Plugins.Shipping.EasyPost.Pickup.Buy"]               = "Buy pickup",
                ["Plugins.Shipping.EasyPost.Pickup.Cancel"]            = "Cancel pickup",
                ["Plugins.Shipping.EasyPost.Pickup.Create"]            = "Create pickup",
                ["Plugins.Shipping.EasyPost.Pickup.Instructions"]      = "Instructions",
                ["Plugins.Shipping.EasyPost.Pickup.Instructions.Hint"] = "Additional text to help the driver successfully obtain the package.",
                ["Plugins.Shipping.EasyPost.Pickup.MaxDate"]           = "Max date",
                ["Plugins.Shipping.EasyPost.Pickup.MaxDate.Hint"]      = "The latest time at which the package is available to pick up.",
                ["Plugins.Shipping.EasyPost.Pickup.MinDate"]           = "Min date",
                ["Plugins.Shipping.EasyPost.Pickup.MinDate.Hint"]      = "The earliest time at which the package is available to pick up.",
                ["Plugins.Shipping.EasyPost.Pickup.Rate"]              = "Rate",
                ["Plugins.Shipping.EasyPost.Pickup.Rate.Hint"]         = "Specify the rate to purchase a pickup.",
                ["Plugins.Shipping.EasyPost.Pickup.Rate.None"]         = "No available rates",

                ["Plugins.Shipping.EasyPost.Product"]                               = "EasyPost",
                ["Plugins.Shipping.EasyPost.Product.CustomsInfo"]                   = "Customs Info",
                ["Plugins.Shipping.EasyPost.Product.Fields.HtsNumber"]              = "Harmonized Tariff Schedule",
                ["Plugins.Shipping.EasyPost.Product.Fields.HtsNumber.Hint"]         = "Specify the six digit code for your product as specified by harmonized system for tariffs.",
                ["Plugins.Shipping.EasyPost.Product.Fields.OriginCountry"]          = "Origin country",
                ["Plugins.Shipping.EasyPost.Product.Fields.OriginCountry.Hint"]     = "Specify where the product was manufactured or assembled.",
                ["Plugins.Shipping.EasyPost.Product.Fields.PredefinedPackage"]      = "Predefined package",
                ["Plugins.Shipping.EasyPost.Product.Fields.PredefinedPackage.Hint"] = "Specify a predefined package for this product (used only if it's the single item in the cart with a quantity of 1).",
                ["Plugins.Shipping.EasyPost.Product.PredefinedPackage"]             = "Predefined package",

                ["Plugins.Shipping.EasyPost.Shipment"]          = "EasyPost",
                ["Plugins.Shipping.EasyPost.Shipment.BuyLabel"] = "Buy label",

                ["Plugins.Shipping.EasyPost.Shipment.CustomsInfo"] = "Customs Info",
                ["Plugins.Shipping.EasyPost.Shipment.CustomsInfo.ContentsExplanation"]      = "Content explanation",
                ["Plugins.Shipping.EasyPost.Shipment.CustomsInfo.ContentsExplanation.Hint"] = "If you specify 'Other' as the content type, you must supply a brief description in this field.",
                ["Plugins.Shipping.EasyPost.Shipment.CustomsInfo.ContentsType"]             = "Content type",
                ["Plugins.Shipping.EasyPost.Shipment.CustomsInfo.ContentsType.Hint"]        = "Specify the type of item you are sending.",
                ["Plugins.Shipping.EasyPost.Shipment.CustomsInfo.CustomsCertify"]           = "Certify",
                ["Plugins.Shipping.EasyPost.Shipment.CustomsInfo.CustomsCertify.Hint"]      = "Determine a value that takes the place of the signature on the physical customs form. This is how you indicate that the information you have provided is accurate.",
                ["Plugins.Shipping.EasyPost.Shipment.CustomsInfo.CustomsSigner"]            = "Signer",
                ["Plugins.Shipping.EasyPost.Shipment.CustomsInfo.CustomsSigner.Hint"]       = "Enter the name of the person who is certifying that the information provided on the customs form is accurate. Use a name of the person in your organization who is responsible for this.",
                ["Plugins.Shipping.EasyPost.Shipment.CustomsInfo.EelPfc"]                   = "EEL or PFC",
                ["Plugins.Shipping.EasyPost.Shipment.CustomsInfo.EelPfc.Hint"]              = "When shipping outside the US, you need to provide either an Exemption and Exclusion Legend (EEL) code or a Proof of Filing Citation (PFC). Which you need is based on the value of the goods being shipped.",
                ["Plugins.Shipping.EasyPost.Shipment.CustomsInfo.NonDeliveryOption"]        = "Non-delivery option",
                ["Plugins.Shipping.EasyPost.Shipment.CustomsInfo.NonDeliveryOption.Hint"]   = "Select an option that tells the carrier what you want to happen to the package if the shipment cannot be delivered. If you pass 'Abandon', you will not receive the package back if it cannot be delivered.",
                ["Plugins.Shipping.EasyPost.Shipment.CustomsInfo.RestrictionComments"]      = "Restriction comments",
                ["Plugins.Shipping.EasyPost.Shipment.CustomsInfo.RestrictionComments.Hint"] = "If you specify 'Other' as the restriction type, you must supply a brief description of what is required.",
                ["Plugins.Shipping.EasyPost.Shipment.CustomsInfo.RestrictionType"]          = "Restriction type",
                ["Plugins.Shipping.EasyPost.Shipment.CustomsInfo.RestrictionType.Hint"]     = "Determine if your shipment requires any special treatment / quarantine when entering the country.",
                ["Plugins.Shipping.EasyPost.Shipment.CustomsInfo.UseCustomsInfo"]           = "Use customs info",
                ["Plugins.Shipping.EasyPost.Shipment.CustomsInfo.UseCustomsInfo.Hint"]      = "Determine whether to pass the customs information.",

                ["Plugins.Shipping.EasyPost.Shipment.DownloadLabel"]     = "Download label",
                ["Plugins.Shipping.EasyPost.Shipment.DownloadLabel.Png"] = "PNG",
                ["Plugins.Shipping.EasyPost.Shipment.DownloadLabel.Pdf"] = "PDF",
                ["Plugins.Shipping.EasyPost.Shipment.DownloadLabel.Zpl"] = "ZPL",
                ["Plugins.Shipping.EasyPost.Shipment.DownloadInvoice"]   = "Download invoice",

                ["Plugins.Shipping.EasyPost.Shipment.Fields.RefundStatus"] = "Refund status",
                ["Plugins.Shipping.EasyPost.Shipment.Fields.Id"]           = "Shipment id",
                ["Plugins.Shipping.EasyPost.Shipment.Fields.Insurance"]    = "Insurance",
                ["Plugins.Shipping.EasyPost.Shipment.Fields.PickupStatus"] = "Pickup status",
                ["Plugins.Shipping.EasyPost.Shipment.Fields.Rate"]         = "Rate name",
                ["Plugins.Shipping.EasyPost.Shipment.Fields.RateValue"]    = "Rate value",
                ["Plugins.Shipping.EasyPost.Shipment.Fields.Status"]       = "Status",
                ["Plugins.Shipping.EasyPost.Shipment.Insurance"]           = "Insurance",
                ["Plugins.Shipping.EasyPost.Shipment.Insurance.Hint"]      = "Specify an amount to insure shipment.",

                ["Plugins.Shipping.EasyPost.Shipment.Options"] = "Options",
                ["Plugins.Shipping.EasyPost.Shipment.Options.AdditionalHandling"]      = "Additional handling",
                ["Plugins.Shipping.EasyPost.Shipment.Options.AdditionalHandling.Hint"] = @"
                    Setting this option, will add an additional handling charge. An Additional Handling charge may be applied to the following:
                    Any article that is encased in an outside shipping container made of metal or wood.
                    Any item, such as a barrel, drum, pail or tire, that is not fully encased in a corrugated cardboard shipping container.
                    Any package with the longest side exceeding 60 inches or its second longest side exceeding 30 inches.
                    Any package with an actual weight greater than 70 pounds.",
                ["Plugins.Shipping.EasyPost.Shipment.Options.Alcohol"]                   = "Alcohol",
                ["Plugins.Shipping.EasyPost.Shipment.Options.Alcohol.Hint"]              = "Set this option if your shipment contains alcohol.",
                ["Plugins.Shipping.EasyPost.Shipment.Options.ByDrone"]                   = "By drone",
                ["Plugins.Shipping.EasyPost.Shipment.Options.ByDrone.Hint"]              = "Setting this option will indicate to the carrier to prefer delivery by drone, if the carrier supports drone delivery.",
                ["Plugins.Shipping.EasyPost.Shipment.Options.CarbonNeutral"]             = "Carbon neutral",
                ["Plugins.Shipping.EasyPost.Shipment.Options.CarbonNeutral.Hint"]        = "Setting this optione will add a charge to reduce carbon emissions.",
                ["Plugins.Shipping.EasyPost.Shipment.Options.DeliveryConfirmation"]      = "Delivery confirmation",
                ["Plugins.Shipping.EasyPost.Shipment.Options.DeliveryConfirmation.Hint"] = "Choose an option to request a signature. You may also request 'No Signature' to leave the package at the door.",
                ["Plugins.Shipping.EasyPost.Shipment.Options.Endorsement"]               = "Endorsement",
                ["Plugins.Shipping.EasyPost.Shipment.Options.Endorsement.Hint"]          = "Choose an endorsement type.",
                ["Plugins.Shipping.EasyPost.Shipment.Options.HandlingInstructions"]      = "Handling instructions",
                ["Plugins.Shipping.EasyPost.Shipment.Options.HandlingInstructions.Hint"] = "This is to designate special instructions for the carrier like 'Do not drop!'.",
                ["Plugins.Shipping.EasyPost.Shipment.Options.Hazmat"]                       = "Hazmat",
                ["Plugins.Shipping.EasyPost.Shipment.Options.Hazmat.Hint"]                  = "Dangerous goods indicator. Applies to USPS, FedEx and DHL eCommerce.",
                ["Plugins.Shipping.EasyPost.Shipment.Options.InvoiceNumber"]                = "Invoice number",
                ["Plugins.Shipping.EasyPost.Shipment.Options.InvoiceNumber.Hint"]           = "This will print an invoice number on the postage label.",
                ["Plugins.Shipping.EasyPost.Shipment.Options.Machinable"]                   = "Machinable",
                ["Plugins.Shipping.EasyPost.Shipment.Options.Machinable.Hint"]              = "Whether or not the parcel can be processed by the carriers equipment.",
                ["Plugins.Shipping.EasyPost.Shipment.Options.PrintCustom"]                  = "Custom message",
                ["Plugins.Shipping.EasyPost.Shipment.Options.PrintCustom.Hint"]             = "You can optionally print up to 3 custom messages on labels. The locations of these fields show up on different spots on the carrier's labels.",
                ["Plugins.Shipping.EasyPost.Shipment.Options.PrintCustomCode"]              = "Custom message type",
                ["Plugins.Shipping.EasyPost.Shipment.Options.PrintCustomCode.Hint"]         = "Specify the type of custom message.",
                ["Plugins.Shipping.EasyPost.Shipment.Options.SpecialRatesEligibility"]      = "Special rates",
                ["Plugins.Shipping.EasyPost.Shipment.Options.SpecialRatesEligibility.Hint"] = "This option allows you to request restrictive rates from USPS.",
                ["Plugins.Shipping.EasyPost.Shipment.Options.CertifiedMail"]                = "Certified mail",
                ["Plugins.Shipping.EasyPost.Shipment.Options.CertifiedMail.Hint"]           = "Certified Mail provides the sender with a mailing receipt and, upon request, electronic verification that an article was delivered or that a delivery attempt was made.",
                ["Plugins.Shipping.EasyPost.Shipment.Options.RegisteredMail"]               = "Registered mail",
                ["Plugins.Shipping.EasyPost.Shipment.Options.RegisteredMail.Hint"]          = "Registered Mail is the most secure service that the USPS offers. It incorporates a system of receipts to monitor the movement of the mail from the point of acceptance to delivery.",
                ["Plugins.Shipping.EasyPost.Shipment.Options.RegisteredMailAmount"]         = "Registered mail amount",
                ["Plugins.Shipping.EasyPost.Shipment.Options.RegisteredMailAmount.Hint"]    = "The value of the package contents.",
                ["Plugins.Shipping.EasyPost.Shipment.Options.ReturnReceipt"]                = "Return receipt",
                ["Plugins.Shipping.EasyPost.Shipment.Options.ReturnReceipt.Hint"]           = "An electronic return receipt may be purchased at the time of mailing and provides a shipper with evidence of delivery (to whom the mail was delivered and date of delivery), and information about the recipient's actual delivery address. Only applies to the USPS.",

                ["Plugins.Shipping.EasyPost.Shipment.Rate"]                        = "Rate",
                ["Plugins.Shipping.EasyPost.Shipment.Rate.Hint"]                   = "Specify the rate to purchase a shipment.",
                ["Plugins.Shipping.EasyPost.Shipment.Rate.None"]                   = "No available rates",
                ["Plugins.Shipping.EasyPost.Shipment.Rate.Selected"]               = "(selected by the customer)",
                ["Plugins.Shipping.EasyPost.Shipment.Rate.SmartRate.Display"]      = "Display Smart Rates",
                ["Plugins.Shipping.EasyPost.Shipment.Rate.SmartRate.Display.Hint"] = "Check to display Smart Rates for this shipment.",
                ["Plugins.Shipping.EasyPost.Shipment.Rate.SmartRate.DeliveryDays"] = "Delivery days",
                ["Plugins.Shipping.EasyPost.Shipment.Rate.SmartRate.Name"]         = "Name",
                ["Plugins.Shipping.EasyPost.Shipment.UpdateShipment"]              = "Update",

                ["Plugins.Shipping.EasyPost.Success"] = "Successfully completed",
            });

            await base.InstallAsync();
        }
コード例 #29
0
        /// <summary>
        /// Install the plugin
        /// </summary>
        /// <returns>A task that represents the asynchronous operation</returns>
        public override async Task InstallAsync()
        {
            //settings
            await _settingService.SaveSettingAsync(new AvalaraTaxSettings
            {
                CompanyCode                       = Guid.Empty.ToString(),
                UseSandbox                        = true,
                CommitTransactions                = true,
                TaxOriginAddressType              = TaxOriginAddressType.DefaultTaxAddress,
                EnableLogging                     = true,
                UseTaxRateTables                  = true,
                GetTaxRateByAddressOnly           = true,
                TaxRateByAddressCacheTime         = 480,
                AutoValidateCertificate           = true,
                AllowEditCustomer                 = true,
                DisplayNoValidCertificatesMessage = true
            });

            if (!_widgetSettings.ActiveWidgetSystemNames.Contains(AvalaraTaxDefaults.SystemName))
            {
                _widgetSettings.ActiveWidgetSystemNames.Add(AvalaraTaxDefaults.SystemName);
                await _settingService.SaveSettingAsync(_widgetSettings);
            }

            //schedule task
            if (await _scheduleTaskService.GetTaskByTypeAsync(AvalaraTaxDefaults.DownloadTaxRatesTask.Type) is null)
            {
                await _scheduleTaskService.InsertTaskAsync(new()
                {
                    Enabled        = true,
                    LastEnabledUtc = DateTime.UtcNow,
                    Seconds        = AvalaraTaxDefaults.DownloadTaxRatesTask.Days * 24 * 60 * 60,
                    Name           = AvalaraTaxDefaults.DownloadTaxRatesTask.Name,
                    Type           = AvalaraTaxDefaults.DownloadTaxRatesTask.Type
                });
            }

            //locales
            await _localizationService.AddOrUpdateLocaleResourceAsync(new Dictionary <string, string>
            {
                ["Enums.Nop.Plugin.Tax.Avalara.Domain.TaxOriginAddressType.DefaultTaxAddress"] = "Default tax address",
                ["Enums.Nop.Plugin.Tax.Avalara.Domain.TaxOriginAddressType.ShippingOrigin"]    = "Shipping origin address",
                ["Plugins.Tax.Avalara.AddressValidation.Confirm"]                             = "For the correct tax calculation we need the most accurate address, so we clarified the address you entered ({0}) through the validation system. Do you confirm the use of this updated address ({1})?",
                ["Plugins.Tax.Avalara.AddressValidation.Error"]                               = "For the correct tax calculation we need the most accurate address. There are some errors from the validation system: {0}",
                ["Plugins.Tax.Avalara.Configuration"]                                         = "Configuration",
                ["Plugins.Tax.Avalara.Configuration.Certificates"]                            = "Exemption certificates",
                ["Plugins.Tax.Avalara.Configuration.Certificates.InProgress"]                 = "Exemption certificates",
                ["Plugins.Tax.Avalara.Configuration.Certificates.NotProvisioned"]             = "The selected company isn't configured to use exemption certificates, use the button 'Request certificate setup' below to access this feature",
                ["Plugins.Tax.Avalara.Configuration.Certificates.Provisioned"]                = "The selected company is configured to use exemption certificates",
                ["Plugins.Tax.Avalara.Configuration.Certificates.Button"]                     = "Request certificate setup",
                ["Plugins.Tax.Avalara.Configuration.Common"]                                  = "Common settings",
                ["Plugins.Tax.Avalara.Configuration.Credentials.Button"]                      = "Check connection",
                ["Plugins.Tax.Avalara.Configuration.Credentials.Declined"]                    = "Credentials declined",
                ["Plugins.Tax.Avalara.Configuration.Credentials.Verified"]                    = "Credentials verified",
                ["Plugins.Tax.Avalara.Configuration.TaxCalculation"]                          = "Tax calculation",
                ["Plugins.Tax.Avalara.ExemptionCertificates"]                                 = "Tax exemption certificates",
                ["Plugins.Tax.Avalara.ExemptionCertificates.Add.ExposureZone"]                = "State",
                ["Plugins.Tax.Avalara.ExemptionCertificates.Add.Fail"]                        = "An error occurred while adding a certificate",
                ["Plugins.Tax.Avalara.ExemptionCertificates.Add.Success"]                     = "Certificate added successfully",
                ["Plugins.Tax.Avalara.ExemptionCertificates.Description"]                     = @"
                    <h3>Here you can view and manage your certificates.</h3>
                    <p>
                        The certificate document contains information about a customer's eligibility for exemption from sales.<br />
                        When you add a certificate, it will be processed and become available for use in calculating tax exemptions.<br />
                    </p>
                    <p>
                        You can also go to <a href=""{0}"" target=""_blank"">CertExpress website</a> where you can follow a step-by-step guide to enter information about your exemption certificates.
                    </p>
                    <p>
                        The certificates entered will be recorded and automatically linked to your account.
                    </p>
                    <p>If you have any questions, please <a href=""{1}"" target=""_blank"">contact us</a>.</p>",
                ["Plugins.Tax.Avalara.ExemptionCertificates.ExpirationDate"]                  = "Expiration date",
                ["Plugins.Tax.Avalara.ExemptionCertificates.ExposureZone"]                    = "State",
                ["Plugins.Tax.Avalara.ExemptionCertificates.None"]                            = "No downloaded certificates yet",
                ["Plugins.Tax.Avalara.ExemptionCertificates.OrderReview"]                     = "Tax",
                ["Plugins.Tax.Avalara.ExemptionCertificates.OrderReview.Applied"]             = "Exemption certificate applied",
                ["Plugins.Tax.Avalara.ExemptionCertificates.OrderReview.None"]                = @"You have no valid certificates in the selected region. You can add them in your account on <a href=""{0}"" target=""_blank"" style=""color: #4ab2f1;"">this page</a>.",
                ["Plugins.Tax.Avalara.ExemptionCertificates.SignedDate"]                      = "Signed date",
                ["Plugins.Tax.Avalara.ExemptionCertificates.Status"]                          = "Status",
                ["Plugins.Tax.Avalara.ExemptionCertificates.View"]                            = "View",
                ["Plugins.Tax.Avalara.Fields.AccountId"]                                      = "Account ID",
                ["Plugins.Tax.Avalara.Fields.AccountId.Hint"]                                 = "Specify Avalara account ID.",
                ["Plugins.Tax.Avalara.Fields.AccountId.Required"]                             = "Account ID is required",
                ["Plugins.Tax.Avalara.Fields.AllowEditCustomer"]                              = "Allow edit info",
                ["Plugins.Tax.Avalara.Fields.AllowEditCustomer.Hint"]                         = "Determine whether to allow customers to edit their info (name, phone, address, etc) when managing certificates. If disabled, the info will be auto updated when customers change details in their accounts.",
                ["Plugins.Tax.Avalara.Fields.AutoValidateCertificate"]                        = "Auto validate certificates",
                ["Plugins.Tax.Avalara.Fields.AutoValidateCertificate.Hint"]                   = "Determine whether the new certificates are automatically valid, this allows your customers to make exempt purchases right away, otherwise a customer is not treated as exempt until you validate the document.",
                ["Plugins.Tax.Avalara.Fields.CommitTransactions"]                             = "Commit transactions",
                ["Plugins.Tax.Avalara.Fields.CommitTransactions.Hint"]                        = "Determine whether to commit tax transactions right after they are saved.",
                ["Plugins.Tax.Avalara.Fields.Company"]                                        = "Company",
                ["Plugins.Tax.Avalara.Fields.Company.Currency.Warning"]                       = "The default currency used by '{0}' company ({1}) does not match the primary store currency ({2})",
                ["Plugins.Tax.Avalara.Fields.Company.Hint"]                                   = "Choose a company that was previously added to the Avalara account.",
                ["Plugins.Tax.Avalara.Fields.Company.NotExist"]                               = "There are no active companies",
                ["Plugins.Tax.Avalara.Fields.CustomerRoles"]                                  = "Limited to customer roles",
                ["Plugins.Tax.Avalara.Fields.CustomerRoles.Hint"]                             = "Select customer roles for which exemption certificates will be available. Leave empty if you want this feature to be available to all customers.",
                ["Plugins.Tax.Avalara.Fields.DisplayNoValidCertificatesMessage"]              = "Display 'No valid certificates' message",
                ["Plugins.Tax.Avalara.Fields.DisplayNoValidCertificatesMessage.Hint"]         = "Determine whether to display a message that there are no valid certificates for the customer on the order confirmation page.",
                ["Plugins.Tax.Avalara.Fields.EnableCertificates"]                             = "Enable exemption certificates",
                ["Plugins.Tax.Avalara.Fields.EnableCertificates.Hint"]                        = "Determine whether to enable this feature. In this case, a new page will be added in the account section, so customers can manage their exemption certificates before making a purchase.",
                ["Plugins.Tax.Avalara.Fields.EnableCertificates.Warning"]                     = "To use this feature, you need the following information from customers: name, country, state, city, address, postal code. Ensure that the appropriate Customer form fields are enabled under <a href=\"{0}\" target=\"_blank\">Customer settings</a>",
                ["Plugins.Tax.Avalara.Fields.EnableLogging"]                                  = "Enable logging",
                ["Plugins.Tax.Avalara.Fields.EnableLogging.Hint"]                             = "Determine whether to enable logging of all requests to Avalara services.",
                ["Plugins.Tax.Avalara.Fields.EntityUseCode"]                                  = "Entity use code",
                ["Plugins.Tax.Avalara.Fields.EntityUseCode.Hint"]                             = "Choose a code that can be used to designate the reason for a particular sale being exempt. Each entity use code stands for a different exemption reason, the logic of which can be found in Avalara exemption reason documentation.",
                ["Plugins.Tax.Avalara.Fields.EntityUseCode.None"]                             = "None",
                ["Plugins.Tax.Avalara.Fields.GetTaxRateByAddressOnly"]                        = "Tax rates by address only",
                ["Plugins.Tax.Avalara.Fields.GetTaxRateByAddressOnly.Hint"]                   = "Determine whether to get tax rates by the address only. This may lead to not entirely accurate results (for example, when a customer is exempt to tax, or the product belongs to a tax category that has a specific rate), but it will significantly reduce the number of GetTax API calls. This applies only to tax rates in the catalog, on the checkout full information is always used in requests.",
                ["Plugins.Tax.Avalara.Fields.LicenseKey"]                                     = "License key",
                ["Plugins.Tax.Avalara.Fields.LicenseKey.Hint"]                                = "Specify Avalara account license key.",
                ["Plugins.Tax.Avalara.Fields.LicenseKey.Required"]                            = "Account license key is required",
                ["Plugins.Tax.Avalara.Fields.TaxCodeDescription"]                             = "Description",
                ["Plugins.Tax.Avalara.Fields.TaxCodeType"]                                    = "Type",
                ["Plugins.Tax.Avalara.Fields.TaxCodeType.Hint"]                               = "Choose a tax code type.",
                ["Plugins.Tax.Avalara.Fields.TaxOriginAddressType"]                           = "Tax origin address",
                ["Plugins.Tax.Avalara.Fields.TaxOriginAddressType.DefaultTaxAddress.Warning"] = "Ensure that you have correctly filled in the 'Default tax address' under <a href=\"{0}\" target=\"_blank\">Tax settings</a>",
                ["Plugins.Tax.Avalara.Fields.TaxOriginAddressType.Hint"]                      = "Choose which address will be used as the origin for tax requests to Avalara services.",
                ["Plugins.Tax.Avalara.Fields.TaxOriginAddressType.ShippingOrigin.Warning"]    = "Ensure that you have correctly filled in the 'Shipping origin' under <a href=\"{0}\" target=\"_blank\">Shipping settings</a>",
                ["Plugins.Tax.Avalara.Fields.UseSandbox"]                                     = "Use sandbox",
                ["Plugins.Tax.Avalara.Fields.UseSandbox.Hint"]                                = "Determine whether to use sandbox (testing environment).",
                ["Plugins.Tax.Avalara.Fields.UseTaxRateTables"]                               = "Use tax rate tables to estimate ",
                ["Plugins.Tax.Avalara.Fields.UseTaxRateTables.Hint"]                          = "Determine whether to use tax rate tables to estimate. This will be used as a default tax calculation for catalog pages and will be adjusted and reconciled to the final transaction tax during checkout. Tax rates are looked up by zip code (US only) in a file that will be periodically updated from the Avalara (see Schedule tasks).",
                ["Plugins.Tax.Avalara.Fields.ValidateAddress"]                                = "Validate address",
                ["Plugins.Tax.Avalara.Fields.ValidateAddress.Hint"]                           = "Determine whether to validate entered by customer addresses before the tax calculation.",
                ["Plugins.Tax.Avalara.Items.Export"] = "Export to Avalara (selected)",
                ["Plugins.Tax.Avalara.Items.Export.AlreadyExported"] = "Selected products have already been exported",
                ["Plugins.Tax.Avalara.Items.Export.Error"]           = "An error has occurred on export products",
                ["Plugins.Tax.Avalara.Items.Export.Success"]         = "Successfully exported {0} products",
                ["Plugins.Tax.Avalara.Log"]                             = "Log",
                ["Plugins.Tax.Avalara.Log.BackToList"]                  = "back to log",
                ["Plugins.Tax.Avalara.Log.ClearLog"]                    = "Clear log",
                ["Plugins.Tax.Avalara.Log.CreatedDate"]                 = "Created on",
                ["Plugins.Tax.Avalara.Log.CreatedDate.Hint"]            = "Date and time the log entry was created.",
                ["Plugins.Tax.Avalara.Log.Customer"]                    = "Customer",
                ["Plugins.Tax.Avalara.Log.Customer.Hint"]               = "Name of the customer.",
                ["Plugins.Tax.Avalara.Log.Deleted"]                     = "The log entry has been deleted successfully.",
                ["Plugins.Tax.Avalara.Log.Hint"]                        = "View log entry details",
                ["Plugins.Tax.Avalara.Log.RequestMessage"]              = "Request message",
                ["Plugins.Tax.Avalara.Log.RequestMessage.Hint"]         = "The details of the request.",
                ["Plugins.Tax.Avalara.Log.ResponseMessage"]             = "Response message",
                ["Plugins.Tax.Avalara.Log.ResponseMessage.Hint"]        = "The details of the response.",
                ["Plugins.Tax.Avalara.Log.StatusCode"]                  = "Status code",
                ["Plugins.Tax.Avalara.Log.StatusCode.Hint"]             = "The status code of the response.",
                ["Plugins.Tax.Avalara.Log.Url"]                         = "Url",
                ["Plugins.Tax.Avalara.Log.Url.Hint"]                    = "The requested URL.",
                ["Plugins.Tax.Avalara.Log.Search.CreatedFrom"]          = "Created from",
                ["Plugins.Tax.Avalara.Log.Search.CreatedFrom.Hint"]     = "The creation from date for the search.",
                ["Plugins.Tax.Avalara.Log.Search.CreatedTo"]            = "Created to",
                ["Plugins.Tax.Avalara.Log.Search.CreatedTo.Hint"]       = "The creation to date for the search.",
                ["Plugins.Tax.Avalara.TaxCodes"]                        = "Avalara tax codes",
                ["Plugins.Tax.Avalara.TaxCodes.Delete"]                 = "Delete Avalara system tax codes",
                ["Plugins.Tax.Avalara.TaxCodes.Delete.Error"]           = "An error has occurred on delete tax codes",
                ["Plugins.Tax.Avalara.TaxCodes.Delete.Success"]         = "System tax codes successfully deleted",
                ["Plugins.Tax.Avalara.TaxCodes.Export"]                 = "Export tax codes to Avalara",
                ["Plugins.Tax.Avalara.TaxCodes.Export.AlreadyExported"] = "All tax codes have already been exported",
                ["Plugins.Tax.Avalara.TaxCodes.Export.Error"]           = "An error has occurred on export tax codes",
                ["Plugins.Tax.Avalara.TaxCodes.Export.Success"]         = "Successfully exported {0} tax codes",
                ["Plugins.Tax.Avalara.TaxCodes.Import"]                 = "Import Avalara system tax codes",
                ["Plugins.Tax.Avalara.TaxCodes.Import.Error"]           = "An error has occurred on import tax codes",
                ["Plugins.Tax.Avalara.TaxCodes.Import.Success"]         = "Successfully imported {0} tax codes",
                ["Plugins.Tax.Avalara.TestTax"]                         = "Test tax calculation",
                ["Plugins.Tax.Avalara.TestTax.Button"]                  = "Submit",
                ["Plugins.Tax.Avalara.TestTax.Error"]                   = "An error has occurred on tax request",
                ["Plugins.Tax.Avalara.TestTax.Success"]                 = "The tax was successfully received"
            });

            await base.InstallAsync();
        }
コード例 #30
0
        /// <summary>
        /// Install plugin
        /// </summary>
        /// <returns>A task that represents the asynchronous operation</returns>
        public override async Task InstallAsync()
        {
            //settings
            await _settingService.SaveSettingAsync(new UPSSettings
            {
                UseSandbox             = true,
                CustomerClassification = CustomerClassification.StandardListRates,
                PickupType             = PickupType.OneTimePickup,
                PackagingType          = PackagingType.ExpressBox,
                PackingPackageVolume   = 5184,
                PackingType            = PackingType.PackByDimensions,
                PassDimensions         = true,
                WeightType             = "LBS",
                DimensionsType         = "IN"
            });

            //locales
            await _localizationService.AddOrUpdateLocaleResourceAsync(new Dictionary <string, string>
            {
                ["Enums.Nop.Plugin.Shipping.UPS.PackingType.PackByDimensions"]        = "Pack by dimensions",
                ["Enums.Nop.Plugin.Shipping.UPS.PackingType.PackByOneItemPerPackage"] = "Pack by one item per package",
                ["Enums.Nop.Plugin.Shipping.UPS.PackingType.PackByVolume"]            = "Pack by volume",
                ["Plugins.Shipping.UPS.Fields.AccessKey"]                     = "Access Key",
                ["Plugins.Shipping.UPS.Fields.AccessKey.Hint"]                = "Specify UPS access key.",
                ["Plugins.Shipping.UPS.Fields.AccountNumber"]                 = "Account number",
                ["Plugins.Shipping.UPS.Fields.AccountNumber.Hint"]            = "Specify UPS account number (required to get negotiated rates).",
                ["Plugins.Shipping.UPS.Fields.AdditionalHandlingCharge"]      = "Additional handling charge",
                ["Plugins.Shipping.UPS.Fields.AdditionalHandlingCharge.Hint"] = "Enter additional handling fee to charge your customers.",
                ["Plugins.Shipping.UPS.Fields.AvailableCarrierServices"]      = "Carrier Services",
                ["Plugins.Shipping.UPS.Fields.AvailableCarrierServices.Hint"] = "Select the services you want to offer to customers.",
                ["Plugins.Shipping.UPS.Fields.CustomerClassification"]        = "UPS Customer Classification",
                ["Plugins.Shipping.UPS.Fields.CustomerClassification.Hint"]   = "Choose customer classification.",
                ["Plugins.Shipping.UPS.Fields.DimensionsType"]                = "Dimensions type",
                ["Plugins.Shipping.UPS.Fields.DimensionsType.Hint"]           = "Choose dimensions type (inches or centimeters).",
                ["Plugins.Shipping.UPS.Fields.InsurePackage"]                 = "Insure package",
                ["Plugins.Shipping.UPS.Fields.InsurePackage.Hint"]            = "Check to insure packages.",
                ["Plugins.Shipping.UPS.Fields.PackagingType"]                 = "UPS Packaging Type",
                ["Plugins.Shipping.UPS.Fields.PackagingType.Hint"]            = "Choose UPS packaging type.",
                ["Plugins.Shipping.UPS.Fields.PackingPackageVolume"]          = "Package volume",
                ["Plugins.Shipping.UPS.Fields.PackingPackageVolume.Hint"]     = "Enter your package volume.",
                ["Plugins.Shipping.UPS.Fields.PackingType"]                   = "Packing type",
                ["Plugins.Shipping.UPS.Fields.PackingType.Hint"]              = "Choose preferred packing type.",
                ["Plugins.Shipping.UPS.Fields.PassDimensions"]                = "Pass dimensions",
                ["Plugins.Shipping.UPS.Fields.PassDimensions.Hint"]           = "Check if you want to pass package dimensions when requesting rates.",
                ["Plugins.Shipping.UPS.Fields.Password"]                     = "******",
                ["Plugins.Shipping.UPS.Fields.Password.Hint"]                = "Specify UPS password.",
                ["Plugins.Shipping.UPS.Fields.PickupType"]                   = "UPS Pickup Type",
                ["Plugins.Shipping.UPS.Fields.PickupType.Hint"]              = "Choose UPS pickup type.",
                ["Plugins.Shipping.UPS.Fields.SaturdayDeliveryEnabled"]      = "Saturday Delivery enabled",
                ["Plugins.Shipping.UPS.Fields.SaturdayDeliveryEnabled.Hint"] = "Check to get rates for Saturday Delivery options.",
                ["Plugins.Shipping.UPS.Fields.Tracing"]         = "Tracing",
                ["Plugins.Shipping.UPS.Fields.Tracing.Hint"]    = "Check if you want to record plugin tracing in System Log. Warning: The entire request and response XML will be logged (including AccessKey/Username,Password). Do not leave this enabled in a production environment.",
                ["Plugins.Shipping.UPS.Fields.Username"]        = "******",
                ["Plugins.Shipping.UPS.Fields.Username.Hint"]   = "Specify UPS username.",
                ["Plugins.Shipping.UPS.Fields.UseSandbox"]      = "Use sandbox",
                ["Plugins.Shipping.UPS.Fields.UseSandbox.Hint"] = "Check to use sandbox (testing environment).",
                ["Plugins.Shipping.UPS.Fields.WeightType"]      = "Weight type",
                ["Plugins.Shipping.UPS.Fields.WeightType.Hint"] = "Choose the weight type (pounds or kilograms).",
                ["Plugins.Shipping.UPS.Tracker.Arrived"]        = "Arrived",
                ["Plugins.Shipping.UPS.Tracker.Booked"]         = "Booked",
                ["Plugins.Shipping.UPS.Tracker.Delivered"]      = "Delivered",
                ["Plugins.Shipping.UPS.Tracker.Departed"]       = "Departed",
                ["Plugins.Shipping.UPS.Tracker.ExportScanned"]  = "Export scanned",
                ["Plugins.Shipping.UPS.Tracker.NotDelivered"]   = "Not delivered",
                ["Plugins.Shipping.UPS.Tracker.OriginScanned"]  = "Origin scanned",
                ["Plugins.Shipping.UPS.Tracker.Pickup"]         = "Pickup"
            });

            await base.InstallAsync();
        }