/// <summary>
        /// Install plugin
        /// </summary>
        public override async Task InstallAsync()
        {
            var settings = new IParamPaymentSettings()
            {
                UseSandbox     = true,
                ClientCode     = "10738",
                ClientUsername = "******",
                ClientPassword = "******",
                Guid           = "0c13d406-873b-403b-9c09-a5766840d98c",
                TestUrl        = "https://test-dmz.param.com.tr:4443/turkpos.ws/service_turkpos_test.asmx?wsdl",
                ProductUrl     = "https://posws.param.com.tr/turkpos.ws/service_turkpos_prod.asmx?wsdl",
                Installment    = false
            };
            await _settingService.SaveSettingAsync(settings);

            //locales
            await _localizationService.AddLocaleResourceAsync(new Dictionary <string, string>
            {
                ["Plugins.Payments.Param.UseSandbox"]          = "Test Mode:",
                ["Plugins.Payments.Param.UseSandbox.Hint"]     = "Use test mode?:",
                ["Plugins.Payments.Param.ClientCode"]          = "Client Code:",
                ["Plugins.Payments.Param.ClientUsername"]      = "******",
                ["Plugins.Payments.Param.ClientUsername.Hint"] = "Enter Client Username.",
                ["Plugins.Payments.Param.ClientPassword"]      = "******",
                ["Plugins.Payments.Param.Guid"]                     = "GUID:",
                ["Plugins.Payments.Param.Installment"]              = "Installment:",
                ["Plugins.Payments.Param.Installment.Hint"]         = "Use installment?:",
                ["Plugins.Payments.Param.PaymentMethodDescription"] = "Pay with credit card via the param.",
                ["Plugins.Payments.Param.BankName"]                 = "Bank Name:",
                ["Plugins.Payments.Param.ErrorAvailable"]           = "This page has expired. Please, create a new order."
            }, 1); //EN

            await _localizationService.AddLocaleResourceAsync(new Dictionary <string, string>
            {
                ["Plugins.Payments.Param.UseSandbox"]               = "Test Modu:",
                ["Plugins.Payments.Param.UseSandbox.Hint"]          = "Test Modunu?:",
                ["Plugins.Payments.Param.ClientCode"]               = "Müşteri Kodu:",
                ["Plugins.Payments.Param.ClientUsername"]           = "******",
                ["Plugins.Payments.Param.ClientPassword"]           = "******",
                ["Plugins.Payments.Param.Guid"]                     = "GUID:",
                ["Plugins.Payments.Param.Installment"]              = "Taksitlendirme:",
                ["Plugins.Payments.Param.Installment.Hint"]         = "Taksitlendirme?:",
                ["Plugins.Payments.Param.PaymentMethodDescription"] = "Param ile kredi kartı ödemesi yaparsınız.",
                ["Plugins.Payments.Param.BankName"]                 = "Banka Adı:",
                ["Plugins.Payments.Param.ErrorAvailable"]           = "Bu ödeme sayfasının süresi doldu. Lütfen yeni bir sipariş oluşturun."
            }, 2); //TR

            await base.InstallAsync();
        }
        /// <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.AddLocaleResourceAsync(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();
        }
        /// <summary>
        /// Install plugin
        /// </summary>
        public override async Task InstallAsync()
        {
            //settings
            await _settingService.SaveSettingAsync(new FixedOrByCountryStateZipTaxSettings());

            //locales
            await _localizationService.AddLocaleResourceAsync(new Dictionary <string, string>
            {
                ["Plugins.Tax.FixedOrByCountryStateZip.Fixed"] = "Fixed rate",
                ["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();
        }
Example #4
0
        /// <summary>
        /// Install the plugin
        /// </summary>
        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.AddLocaleResourceAsync(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();
        }
        /// <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.AddLocaleResourceAsync(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();
        }
Example #6
0
 private async System.Threading.Tasks.Task AddOrUpdatePluginLocaleResourcesAsync()
 {
     await _localizationService.AddLocaleResourceAsync(new Dictionary <string, string>
     {
         [LocaleKey.DaysToKeepLogs] = "Days to Keep Logs"
     });
 }
Example #7
0
        public override async Task InstallAsync()
        {
            //locales

            await _localizationService.AddLocaleResourceAsync(new Dictionary <string, string>
            {
                { "Plugins.Api", "Api plugin" },
                { "Plugins.Api.Admin.Menu.ManageClients", "Manage Api Clients" },
                { "Plugins.Api.Admin.Configure", "Configure Web Api" },
                { "Plugins.Api.Admin.GeneralSettings", "General Settings" },
                { "Plugins.Api.Admin.EnableApi", "Enable Api" },
                { "Plugins.Api.Admin.EnableApi.Hint", "By checking this settings you can Enable/Disable the Web Api" },
                { "Plugins.Api.Admin.Menu.Title", "API" },
                { "Plugins.Api.Admin.Menu.Settings.Title", "Settings" },
                { "Plugins.Api.Admin.Page.Settings.Title", "Api Settings" },
                { "Plugins.Api.Admin.Settings.GeneralSettingsTitle", "General Settings" },
                { "Plugins.Api.Admin.Edit", "Edit" },
                { "Api.Categories.Fields.Id.Invalid", "Id is invalid" },
                { "Api.InvalidPropertyType", "Invalid Property Type" },
                { "Api.InvalidType", "Invalid {0} type" },
                { "Api.InvalidRequest", "Invalid request" },
                { "Api.InvalidRootProperty", "Invalid root property" },
                { "Api.NoJsonProvided", "No Json provided" },
                { "Api.InvalidJsonFormat", "Json format is invalid" },
                { "Api.Category.InvalidImageAttachmentFormat", "Invalid image attachment base64 format" },
                { "Api.Category.InvalidImageSrc", "Invalid image source" },
                { "Api.Category.InvalidImageSrcType", "You have provided an invalid image source/attachment " },
            });



            await _settingService.SaveSettingAsync(new ApiSettings());

            var apiRole = await _customerService.GetCustomerRoleBySystemNameAsync(Constants.Roles.ApiRoleSystemName);

            if (apiRole == null)
            {
                apiRole = new CustomerRole
                {
                    Name       = Constants.Roles.ApiRoleName,
                    Active     = true,
                    SystemName = Constants.Roles.ApiRoleSystemName
                };

                await _customerService.InsertCustomerRoleAsync(apiRole);
            }
            else if (apiRole.Active == false)
            {
                apiRole.Active = true;
                await _customerService.UpdateCustomerRoleAsync(apiRole);
            }


            await base.InstallAsync();

            // Changes to Web.Config trigger application restart.
            // This doesn't appear to affect the Install function, but just to be safe we will made web.config changes after the plugin was installed.
            //_webConfigMangerHelper.AddConfiguration();
        }
Example #8
0
 private void AddLocales()
 {
     _localizationService.AddLocaleResourceAsync(new Dictionary <string, string>
     {
         [AbcPromosLocales.IncludeExpiredPromosOnRebatesPromosPage]
             = "Include Expired Promos on Rebates/Promos Page",
         [AbcPromosLocales.IncludeExpiredPromosOnRebatesPromosPageHint]
             = "Shows expired promos (by one month) on the rebates/promos page.",
     });
 }
Example #9
0
        /// <summary>
        /// Install plugin
        /// </summary>
        /// <returns>A task that represents the asynchronous operation</returns>
        public override async Task InstallAsync()
        {
            await _localizationService.AddLocaleResourceAsync(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();
        }
Example #10
0
 private async System.Threading.Tasks.Task UpdateLocalizationsAsync()
 {
     await _localizationService.AddLocaleResourceAsync(new Dictionary <string, string>
     {
         [ExportOrderLocaleKeys.OrderIdPrefix]         = "Order ID Prefix",
         [ExportOrderLocaleKeys.OrderIdPrefixHint]     = "The order ID prefix to use when sending orders to ISAM.",
         [ExportOrderLocaleKeys.TablePrefix]           = "Table Prefix",
         [ExportOrderLocaleKeys.TablePrefixHint]       = "The ISAM table prefix to send to.",
         [ExportOrderLocaleKeys.FailureAlertEmail]     = "Failure Alert Email",
         [ExportOrderLocaleKeys.FailureAlertEmailHint] = "Email to send failure notifications to.",
     });
 }
Example #11
0
        /// <summary>
        /// Install plugin
        /// </summary>
        public override async Task InstallAsync()
        {
            //settings
            await _settingService.SaveSettingAsync(new FixedByWeightByTotalSettings());

            //locales
            await _localizationService.AddLocaleResourceAsync(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();
        }
        /// <summary>
        /// Install the plugin
        /// </summary>
        public override async Task InstallAsync()
        {
            //locales
            await _localizationService.AddLocaleResourceAsync(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();
        }
Example #13
0
        public override async Task InstallAsync()
        {
            //settings
            await _settingService.SaveSettingAsync(new AbcTaxSettings());

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

            // If possible, import data from old Tax plugin
            await _nopDataProvider.ExecuteNonQueryAsync($@"
                INSERT INTO AbcTaxRate (StoreId, TaxCategoryId, CountryId, StateProvinceId, Zip, Percentage, IsTaxJarEnabled)
                SELECT
                    StoreId,
                    TaxCategoryId,
                    CountryId,
                    StateProvinceId,
                    Zip,
                    Percentage,
                    EnableTaxState
                FROM
                    TaxRate
            ");

            await base.InstallAsync();
        }
Example #14
0
        /// <summary>
        /// Install plugin
        /// </summary>
        public override async Task InstallAsync()
        {
            await _settingService.SaveSettingAsync(new AccessiBeSettings
            {
                WidgetZone = PublicWidgetZones.HeadHtmlTag
            });

            await _localizationService.AddLocaleResourceAsync(new Dictionary <string, string>
            {
                ["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();
        }
        /// <summary>
        /// Install plugin
        /// </summary>
        public override async Task InstallAsync()
        {
            //settings
            var settings = new HelloWorldSettings
            {
                Text = "При заказе до 1 декабря скидка на доставку 50 %"
            };
            await _settingService.SaveSettingAsync(settings);

            await _localizationService.AddLocaleResourceAsync(new Dictionary <string, string>
            {
                ["Plugins.Widgets.HelloWorld.Text"]      = "Text to show",
                ["Plugins.Widgets.HelloWorld.Text.Hint"] = "Enter the text, which would be shown on product card",
            });

            await base.InstallAsync();
        }
        /// <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.AddLocaleResourceAsync(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();
        }
Example #17
0
 private async Task UpdateLocales()
 {
     await _localizationService.AddLocaleResourceAsync(
         new Dictionary <string, string>
     {
         [CoreLocales.BackendDbConnectionString]       = "Backend DB Connection String",
         [CoreLocales.BackendDbConnectionStringHint]   = "Connection string for connecting to ERP database.",
         ["Admin.Catalog.Products.PLPDescription"]     = "PLP description",
         ["Admin.Catalog.Products.PLPDescriptionHint"] = "Product listing page description.",
         [CoreLocales.IsDebugMode]                 = "Debug Mode",
         [CoreLocales.IsDebugModeHint]             = "Logs detailed information, useful for debugging issues.",
         [CoreLocales.AreExternalCallsSkipped]     = "Skip External Calls",
         [CoreLocales.AreExternalCallsSkippedHint] = "Skips calls to ISAM API, useful for local development.",
         [CoreLocales.PLPDescription]              = "PLP Description",
         [CoreLocales.PLPDescriptionHint]          = "Description displayed for PLP (Product Box)."
     }
         );
 }
        /// <summary>
        /// Install the plugin
        /// </summary>
        public override async Task InstallAsync()
        {
            //settings
            await _settingService.SaveSettingAsync(new GoogleAuthenticatorSettings
            {
                BusinessPrefix    = (await _storeContext.GetCurrentStoreAsync()).Name,
                QRPixelsPerModule = GoogleAuthenticatorDefaults.DefaultQRPixelsPerModule
            });

            //locales
            await _localizationService.AddLocaleResourceAsync(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();
        }
Example #19
0
        public override Task InstallAsync()
        {
            var settings = new LuceneSettings
            {
                Enabled = true,
                AutoCompleteSearchEnabled = true
            };

            _settingService.SaveSettingAsync(settings);

            //locales
            _localizationService.AddLocaleResourceAsync(new Dictionary <string, string>
            {
                { "Plugins.Misc.Lucene.Fields.Enabled", "Enable Lucene search" },
                { "Plugins.Misc.Lucene.Fields.Enabled.Hint", "Turn on the Lucene Full-Text search funtionality" },
                { "Plugins.Misc.Lucene.Fields.AutoCompleteSearchEnabled", "Enable auto complete search" },
                { "Plugins.Misc.Lucene.Fields.AutoCompleteSearchEnabled.Hint", "Turn on the Lucene Full-Text search funtionality for auto complete" }
            });

            return(base.InstallAsync());
        }
        /// <summary>
        /// Install the plugin
        /// </summary>
        /// <returns>A task that represents the asynchronous operation</returns>
        public override async Task InstallAsync()
        {
            //settings
            await _settingService.SaveSettingAsync(new PurchaseOrderPaymentSettings());

            //locales

            await _localizationService.AddLocaleResourceAsync(new Dictionary <string, string>
            {
                ["Plugins.Payment.PurchaseOrder.AdditionalFee"]                 = "Additional fee",
                ["Plugins.Payment.PurchaseOrder.AdditionalFee.Hint"]            = "The additional fee.",
                ["Plugins.Payment.PurchaseOrder.AdditionalFeePercentage"]       = "Additional fee. Use percentage",
                ["Plugins.Payment.PurchaseOrder.AdditionalFeePercentage.Hint"]  = "Determines whether to apply a percentage additional fee to the order total. If not enabled, a fixed value is used.",
                ["Plugins.Payment.PurchaseOrder.PaymentMethodDescription"]      = "Pay by purchase order (PO) number",
                ["Plugins.Payment.PurchaseOrder.PurchaseOrderNumber"]           = "PO Number",
                ["Plugins.Payment.PurchaseOrder.ShippableProductRequired"]      = "Shippable product required",
                ["Plugins.Payment.PurchaseOrder.ShippableProductRequired.Hint"] = "An option indicating whether shippable products are required in order to display this payment method during checkout."
            });

            await base.InstallAsync();
        }
Example #21
0
        public override async Task InstallAsync()
        {
            //background
            var sampleBackgroundPath = _fileProvider.MapPath("~/Plugins/Misc.ComingSoonPage/Content/comingsoonpage/background.jpg");

            //settings
            var settings = new ComingSoonPageSettings
            {
                BackgroundId         = (await _pictureService.InsertPictureAsync(await _fileProvider.ReadAllBytesAsync(sampleBackgroundPath), MimeTypes.ImagePJpeg, "background")).Id,
                OpeningDate          = DateTime.Now.AddDays(7),
                DisplayCountdown     = true,
                DisplayNewsletterBox = true,
                DisplayLoginButton   = true
            };
            await _settingService.SaveSettingAsync(settings);

            //locales
            await _localizationService.AddLocaleResourceAsync(new Dictionary <string, string>
            {
                ["Plugins.Misc.ComingSoonPage.PageTitle"]                 = "Coming soon!",
                ["Plugins.Misc.ComingSoonPage.ComingSoon"]                = "Our new webshop is coming soon!",
                ["Plugins.Misc.ComingSoonPage.ComingSoon.Hint"]           = "Subscribe To Get Notified",
                ["Plugins.Misc.ComingSoonPage.Background"]                = "Background",
                ["Plugins.Misc.ComingSoonPage.Background.Hint"]           = "Fullscreen background image.",
                ["Plugins.Misc.ComingSoonPage.OpeningDate"]               = "Opening date",
                ["Plugins.Misc.ComingSoonPage.OpeningDate.Hint"]          = "Date and time when shop opens [countdown is displayed based on this setting).",
                ["Plugins.Misc.ComingSoonPage.DisplayCountdown"]          = "Display countdown",
                ["Plugins.Misc.ComingSoonPage.DisplayCountdown.Hint"]     = "Check to display countdown based on the opening date.",
                ["Plugins.Misc.ComingSoonPage.DisplayNewsletterBox"]      = "Allow subscription",
                ["Plugins.Misc.ComingSoonPage.DisplayNewsletterBox.Hint"] = "Check to display input for visitors to subscribe.",
                ["Plugins.Misc.ComingSoonPage.DisplayLoginButton"]        = "Display login button",
                ["Plugins.Misc.ComingSoonPage.DisplayLoginButton.Hint"]   = "Check to display login button, so administrators can still log in.",
                ["Plugins.Misc.ComingSoonPage.Countdown.Day"]             = "Day",
                ["Plugins.Misc.ComingSoonPage.Countdown.Days"]            = "Days",
                ["Plugins.Misc.ComingSoonPage.Countdown.Week"]            = "Week",
                ["Plugins.Misc.ComingSoonPage.Countdown.Weeks"]           = "Weeks",
            });

            await base.InstallAsync();
        }
Example #22
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.AddLocaleResourceAsync(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();
        }
Example #23
0
        /// <summary>
        /// Install plugin
        /// </summary>
        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.AddLocaleResourceAsync(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();
        }
        /// <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.AddLocaleResourceAsync(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();
        }
Example #25
0
        private async System.Threading.Tasks.Task UpdateLocalesAsync()
        {
            await _localizationService.AddLocaleResourceAsync(
                new Dictionary <string, string>
            {
                [ImportPluginLocales.SkipOldMattressesImport] = "Skip Import of Old Mattresses",

                [ImportPluginLocales.SkipFillStagingAccessoriesTask]             = "FillStagingAccessoriesTask",
                [ImportPluginLocales.SkipFillStagingBrandsTask]                  = "FillStagingBrandsTask",
                [ImportPluginLocales.SkipFillStagingPricingTask]                 = "FillStagingPricingTask",
                [ImportPluginLocales.SkipFillStagingProductCategoryMappingsTask] = "FillStagingProductCategoryMappingsTask",
                [ImportPluginLocales.SkipFillStagingRebatesTask]                 = "FillStagingRebatesTask",
                [ImportPluginLocales.SkipFillStagingScandownEndDatesTask]        = "FillStagingScandownEndDatesTask",
                [ImportPluginLocales.SkipFillStagingWarrantiesTask]              = "FillStagingWarrantiesTask",

                [ImportPluginLocales.SkipImportProductsTask] = "ImportProductsTask",
                [ImportPluginLocales.SkipMapCategoriesTask]  = "MapCategoriesTask",
                [ImportPluginLocales.SkipImportProductCategoryMappingsTask] = "ImportProductCategoryMappingsTask",
                [ImportPluginLocales.SkipAddHomeDeliveryAttributesTask]     = "AddHomeDeliveryAttributesTask",
                [ImportPluginLocales.SkipImportMarkdownsTask]        = "ImportMarkdownsTask",
                [ImportPluginLocales.SkipImportRelatedProductsTask]  = "ImportRelatedProductsTask",
                [ImportPluginLocales.SkipImportWarrantiesTask]       = "ImportWarrantiesTask",
                [ImportPluginLocales.SkipUnmapNonstockClearanceTask] = "UnmapNonstockClearanceTask",
                [ImportPluginLocales.SkipCleanDuplicateImagesTask]   = "CleanDuplicateImagesTask",
                [ImportPluginLocales.SkipMapCategoryStoresTask]      = "MapCategoryStoresTask",
                [ImportPluginLocales.SkipSliExportTask] = "SliExportTask",

                [ImportPluginLocales.SkipImportDocumentsTask]        = "ImportDocumentsTask",
                [ImportPluginLocales.SkipImportColorsTask]           = "ImportColorsTask",
                [ImportPluginLocales.SkipImportFeaturedProductsTask] = "ImportFeaturedProductsTask",
                [ImportPluginLocales.SkipImportProductFlagsTask]     = "ImportProductFlagsTask",
                [ImportPluginLocales.SkipImportLocalPicturesTask]    = "ImportLocalPicturesTask",
                [ImportPluginLocales.SkipUpdateMetaTagsTask]         = "UpdateMetaTagsTask"
            }
                );
        }
Example #26
0
        /// <summary>
        /// Install the plugin
        /// </summary>
        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,
                    Seconds = SendinblueDefaults.DefaultSynchronizationPeriod * 60 * 60,
                    Name    = SendinblueDefaults.SynchronizationTaskName,
                    Type    = SendinblueDefaults.SynchronizationTask,
                });
            }

            //locales
            await _localizationService.AddLocaleResourceAsync(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();
        }
Example #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 AvalaraTaxSettings
            {
                CompanyCode               = Guid.Empty.ToString(),
                UseSandbox                = true,
                CommitTransactions        = true,
                TaxOriginAddressType      = TaxOriginAddressType.DefaultTaxAddress,
                EnableLogging             = true,
                GetTaxRateByAddressOnly   = true,
                TaxRateByAddressCacheTime = 480
            });

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

            //locales
            await _localizationService.AddLocaleResourceAsync(new Dictionary <string, string>
            {
                ["Enums.Nop.Plugin.Tax.Avalara.Domain.LogType.Create"]         = "Create request",
                ["Enums.Nop.Plugin.Tax.Avalara.Domain.LogType.CreateResponse"] = "Create response",
                ["Enums.Nop.Plugin.Tax.Avalara.Domain.LogType.Error"]          = "Error",
                ["Enums.Nop.Plugin.Tax.Avalara.Domain.LogType.Refund"]         = "Refund request",
                ["Enums.Nop.Plugin.Tax.Avalara.Domain.LogType.RefundResponse"] = "Refund response",
                ["Enums.Nop.Plugin.Tax.Avalara.Domain.LogType.Void"]           = "Void request",
                ["Enums.Nop.Plugin.Tax.Avalara.Domain.LogType.VoidResponse"]   = "Void response",
                ["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.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.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.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.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.Error"]                   = "An error has occurred on tax request",
                ["Plugins.Tax.Avalara.TestTax.Success"]                 = "The tax was successfully received",
                ["Plugins.Tax.Avalara.VerifyCredentials"]               = "Test connection",
                ["Plugins.Tax.Avalara.VerifyCredentials.Declined"]      = "Credentials declined",
                ["Plugins.Tax.Avalara.VerifyCredentials.Verified"]      = "Credentials verified"
            });

            await base.InstallAsync();
        }
        /// <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.AddLocaleResourceAsync(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();
        }