Ejemplo n.º 1
0
 public GlsComputationMethod(IMeasureService measureService,
                             IShippingService shippingService, ISettingService settingService, GlsSettings glsSettings)
 {
     this._measureService  = measureService;
     this._shippingService = shippingService;
     this._settingService  = settingService;
     this._glsSettings     = glsSettings;
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Install plugin
        /// </summary>
        public override void Install()
        {
            //settings
            var settings = new GlsSettings
            {
                GatewayUrl            = "http://www.gls.dk/webservices_v3/wsShopFinder.asmx",
                Rate                  = 65,
                NumberOfSearchResults = 4
            };

            _settingService.SaveSetting(settings);

            //locales
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Gls.Fields.GatewayUrl", "Gateway URL");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Gls.Fields.GatewayUrl.Hint", "Specify gateway URL");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Gls.Fields.Rate", "Shipping cost");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Gls.Fields.Rate.Hint", "Enter the cost of shipping.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Gls.Fields.NumberOfSearchResults", "Number of search results");
            this.AddOrUpdatePluginLocaleResource("Plugins.Shipping.Gls.Fields.NumberOfSearchResults.Hint", "Number of search results.");

            base.Install();
        }