コード例 #1
0
        /// <summary>
        /// Install plugin
        /// </summary>
        public override void Install()
        {
            //settings
            _settingService.SaveSetting(new FixedOrByCountryStateZipTaxSettings());

            //locales
            _localizationService.AddLocaleResource(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"
            });

            base.Install();
        }
コード例 #2
0
        /// <summary>
        /// Install plugin
        /// </summary>
        public override void Install()
        {
            //settings
            var settings = new ShipStationSettings
            {
                PackingPackageVolume = 5184
            };

            _settingService.SaveSetting(settings);

            //locales
            _localizationService.AddLocaleResource(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"
            });

            base.Install();
        }
コード例 #3
0
        /// <summary>
        /// Install the plugin
        /// </summary>
        public override void Install()
        {
            //settings
            var settings = new ManualPaymentSettings
            {
                TransactMode = TransactMode.Pending
            };

            _settingService.SaveSetting(settings);

            //locales
            _localizationService.AddLocaleResource(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"
            });

            base.Install();
        }
コード例 #4
0
        /// <summary>
        /// Install the plugin
        /// </summary>
        public override void Install()
        {
            //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>"
            };

            _settingService.SaveSetting(settings);

            //locales
            _localizationService.AddLocaleResource(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."
            });

            base.Install();
        }
コード例 #5
0
        /// <summary>
        /// Install plugin
        /// </summary>
        public override void Install()
        {
            _localizationService.AddLocaleResource(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.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."
            });

            base.Install();
        }
        /// <summary>
        /// Install plugin
        /// </summary>
        public override void Install()
        {
            //settings
            _settingService.SaveSetting(new FixedByWeightByTotalSettings());

            //locales
            _localizationService.AddLocaleResource(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"
            });

            base.Install();
        }
コード例 #7
0
        /// <summary>
        /// Install the plugin
        /// </summary>
        public override void Install()
        {
            //locales
            _localizationService.AddLocaleResource(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"
            });

            base.Install();
        }
コード例 #8
0
        /// <summary>
        /// Install the plugin
        /// </summary>
        public override void Install()
        {
            //settings
            _settingService.SaveSetting(new PayPalStandardPaymentSettings
            {
                UseSandbox = true
            });

            //locales
            _localizationService.AddLocaleResource(new Dictionary <string, string>
            {
                ["Plugins.Payments.PayPalStandard.Fields.AdditionalFee"]                  = "Additional fee",
                ["Plugins.Payments.PayPalStandard.Fields.AdditionalFee.Hint"]             = "Enter additional fee to charge your customers.",
                ["Plugins.Payments.PayPalStandard.Fields.AdditionalFeePercentage"]        = "Additional fee. Use percentage",
                ["Plugins.Payments.PayPalStandard.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.PayPalStandard.Fields.BusinessEmail"]                  = "Business Email",
                ["Plugins.Payments.PayPalStandard.Fields.BusinessEmail.Hint"]             = "Specify your PayPal business email.",
                ["Plugins.Payments.PayPalStandard.Fields.PassProductNamesAndTotals"]      = "Pass product names and order totals to PayPal",
                ["Plugins.Payments.PayPalStandard.Fields.PassProductNamesAndTotals.Hint"] = "Check if product names and order totals should be passed to PayPal.",
                ["Plugins.Payments.PayPalStandard.Fields.PDTToken"]          = "PDT Identity Token",
                ["Plugins.Payments.PayPalStandard.Fields.PDTToken.Hint"]     = "Specify PDT identity token",
                ["Plugins.Payments.PayPalStandard.Fields.RedirectionTip"]    = "You will be redirected to PayPal site to complete the order.",
                ["Plugins.Payments.PayPalStandard.Fields.UseSandbox"]        = "Use Sandbox",
                ["Plugins.Payments.PayPalStandard.Fields.UseSandbox.Hint"]   = "Check to enable Sandbox (testing environment).",
                ["Plugins.Payments.PayPalStandard.Instructions"]             = @"
                    <p>
	                    <b>If you're using this gateway ensure that your primary store currency is supported by PayPal.</b>
	                    <br />
	                    <br />To use PDT, you must activate PDT and Auto Return in your PayPal account profile. You must also acquire a PDT identity token, which is used in all PDT communication you send to PayPal. Follow these steps to configure your account for PDT:<br />
	                    <br />1. Log in to your PayPal account (click <a href=""https://www.paypal.com/us/webapps/mpp/referral/paypal-business-account2?partner_id=9JJPJNNPQ7PZ8"" target=""_blank"">here</a> to create your account).
	                    <br />2. Click the Profile button.
	                    <br />3. Click the Profile and Settings button.
	                    <br />4. Select the My selling tools item on left panel.
	                    <br />5. Click Website Preferences Update in the Selling online section.
	                    <br />6. Under Auto Return for Website Payments, click the On radio button.
	                    <br />7. For the Return URL, enter the URL on your site that will receive the transaction ID posted by PayPal after a customer payment ({0}).
                        <br />8. Under Payment Data Transfer, click the On radio button and get your PDT identity token.
	                    <br />9. Click Save.
	                    <br />
                    </p>",
                ["Plugins.Payments.PayPalStandard.PaymentMethodDescription"] = "You will be redirected to PayPal site to complete the payment",
                ["Plugins.Payments.PayPalStandard.RoundingWarning"]          = "It looks like you have \"ShoppingCartSettings.RoundPricesDuringCalculation\" setting disabled. Keep in mind that this can lead to a discrepancy of the order total amount, as PayPal only rounds to two decimals.",
            });

            base.Install();
        }
コード例 #9
0
        /// <summary>
        /// Install the plugin
        /// </summary>
        public override void Install()
        {
            //settings
            _settingService.SaveSetting(new FacebookExternalAuthSettings());

            //locales
            _localizationService.AddLocaleResource(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>"
            });

            base.Install();
        }
コード例 #10
0
        public override void Install()
        {
            //Settings
            var settings = new TaskTwoSettings
            {
                Message = "50% Discount on delivery for orders before Decemder 1st"
            };

            _settingService.SaveSetting(settings);

            //Localization
            _localizationService.AddLocaleResource(new Dictionary <string, string>
            {
                ["Plugins.Widgets.TaskTwo.Message"] = "Message",
            });

            base.Install();
        }
コード例 #11
0
        /// <summary>
        /// Install the plugin
        /// </summary>
        public override void Install()
        {
            //settings
            _settingService.SaveSetting(new GoogleAuthenticatorSettings()
            {
                BusinessPrefix    = _storeContext.CurrentStore.Name,
                QRPixelsPerModule = GoogleAuthenticatorDefaults.DefaultQRPixelsPerModule
            });

            //locales
            _localizationService.AddLocaleResource(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."
            });

            base.Install();
        }
コード例 #12
0
        /// <summary>
        /// Install plugin
        /// </summary>
        public override void Install()
        {
            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
            };

            _settingService.SaveSetting(settings);

            _localizationService.AddLocaleResource(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, e-commerce 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>"
            });

            base.Install();
        }
コード例 #13
0
        /// <summary>
        /// Install plugin
        /// </summary>
        public override void Install()
        {
            //pictures
            var sampleImagesPath = _fileProvider.MapPath("~/Plugins/Widgets.NivoSlider/Content/nivoslider/sample-images/");

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

            _settingService.SaveSetting(settings);

            _localizationService.AddLocaleResource(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."
            });

            base.Install();
        }
コード例 #14
0
        public override void Install()
        {
            _settingService.SaveSetting(new DunderMifflinSettings
            {
                ManagerName                     = "Michael Scott",
                ManagerAssistantName            = "Dwight Schrute",
                AssistantOfManagerAssistantName = "Jim Halpert"
            });

            _localizationService.AddLocaleResource(new Dictionary <string, string>
            {
                ["Plugins.Widgets.DunderMifflinManagers.ManagerName"]        = "Manager Name",
                ["Plugins.Widgets.DunderMifflinManagers.ManagerAsstantName"] = "Manager Assistant Name",
                ["Plugins.Widgets.DunderMifflinManagers.AssistantOfManagerAssistantName"] = "Assistant Of Manager Assistant Name",
                ["Plugins.Widgets.DunderMifflinManagers.ManagersComposite"]       = "Our Managers",
                ["Plugins.Widgets.DunderMifflinManagers.MessageOfManager"]        = "Heloooo Wooooorlld",
                ["Plugins.Widgets.DunderMifflinManagers.MessageOfManagerAsstant"] = "Hello World, don't buy here, buy with me by phone!",
                ["Plugins.Widgets.DunderMifflinManagers.MessageOfAssistantOfManagerAssistant"] = "Heloooo!",
            });

            base.Install();
        }
コード例 #15
0
        /// <summary>
        /// Install the plugin
        /// </summary>
        public override void Install()
        {
            //settings
            _settingService.SaveSetting(new AvalaraTaxSettings
            {
                CompanyCode          = Guid.Empty.ToString(),
                UseSandbox           = true,
                CommitTransactions   = true,
                TaxOriginAddressType = TaxOriginAddressType.DefaultTaxAddress,
                EnableLogging        = true
            });

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

            //locales
            _localizationService.AddLocaleResource(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.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"
            });

            base.Install();
        }
コード例 #16
0
        /// <summary>
        /// Install the plugin
        /// </summary>
        public override void Install()
        {
            //settings
            _settingService.SaveSetting(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);
                _settingService.SaveSetting(_widgetSettings);
            }

            //install synchronization task
            if (_scheduleTaskService.GetTaskByType(SendinBlueDefaults.SynchronizationTask) == null)
            {
                _scheduleTaskService.InsertTask(new ScheduleTask
                {
                    Enabled = true,
                    Seconds = SendinBlueDefaults.DefaultSynchronizationPeriod * 60 * 60,
                    Name    = SendinBlueDefaults.SynchronizationTaskName,
                    Type    = SendinBlueDefaults.SynchronizationTask,
                });
            }

            //locales
            _localizationService.AddLocaleResource(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"
            });

            base.Install();
        }
コード例 #17
0
        /// <summary>
        /// Install plugin
        /// </summary>
        public override void Install()
        {
            //settings
            _settingService.SaveSetting(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
            _localizationService.AddLocaleResource(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"
            });

            base.Install();
        }
コード例 #18
0
        /// <summary>
        /// Install the plugin
        /// </summary>
        public override void Install()
        {
            //sample pickup point
            var country = _countryService.GetCountryByThreeLetterIsoCode("USA");
            var state   = _stateProvinceService.GetStateProvinceByAbbreviation("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
            };

            _addressService.InsertAddress(address);

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

            _storePickupPointService.InsertStorePickupPoint(pickupPoint);

            //locales
            _localizationService.AddLocaleResource(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"
            });

            base.Install();
        }