Exemplo n.º 1
0
 public FroogleService(IGoogleService googleService,
                       IProductService productService,
                       ICategoryService categoryService,
                       IManufacturerService manufacturerService,
                       IPictureService pictureService,
                       ICurrencyService currencyService,
                       ISettingService settingService,
                       IWorkContext workContext,
                       IMeasureService measureService,
                       MeasureSettings measureSettings,
                       FroogleSettings froogleSettings,
                       CurrencySettings currencySettings,
                       GoogleProductObjectContext objectContext)
 {
     this._googleService       = googleService;
     this._productService      = productService;
     this._categoryService     = categoryService;
     this._manufacturerService = manufacturerService;
     this._pictureService      = pictureService;
     this._currencyService     = currencyService;
     this._settingService      = settingService;
     this._workContext         = workContext;
     this._measureService      = measureService;
     this._measureSettings     = measureSettings;
     this._froogleSettings     = froogleSettings;
     this._currencySettings    = currencySettings;
     this._objectContext       = objectContext;
 }
Exemplo n.º 2
0
        /// <summary>
        /// Install plugin
        /// </summary>
        public override void Install()
        {
            //settings
            var settings = new FroogleSettings()
            {
                ProductPictureSize = 125,
                PassShippingInfo   = false,
                StaticFileName     = string.Format("froogle_{0}.xml", CommonHelper.GenerateRandomDigitCode(10)),
            };

            _settingService.SaveSetting(settings);

            //data
            _objectContext.Install();

            //locales
            this.AddOrUpdatePluginLocaleResource("Plugins.Feed.Froogle.Store", "Store");
            this.AddOrUpdatePluginLocaleResource("Plugins.Feed.Froogle.Store.Hint", "Select the store that will be used to generate the feed.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Feed.Froogle.Currency", "Currency");
            this.AddOrUpdatePluginLocaleResource("Plugins.Feed.Froogle.Currency.Hint", "Select the default currency that will be used to generate the feed.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Feed.Froogle.DefaultGoogleCategory", "Default Google category");
            this.AddOrUpdatePluginLocaleResource("Plugins.Feed.Froogle.DefaultGoogleCategory.Hint", "The default Google category to use if one is not specified.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Feed.Froogle.General", "General");
            this.AddOrUpdatePluginLocaleResource("Plugins.Feed.Froogle.Generate", "Generate feed");
            this.AddOrUpdatePluginLocaleResource("Plugins.Feed.Froogle.Override", "Override product settings");
            this.AddOrUpdatePluginLocaleResource("Plugins.Feed.Froogle.ProductPictureSize", "Product thumbnail image size");
            this.AddOrUpdatePluginLocaleResource("Plugins.Feed.Froogle.ProductPictureSize.Hint", "The default size (pixels) for product thumbnail images.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Feed.Froogle.Products.ProductName", "Product");
            this.AddOrUpdatePluginLocaleResource("Plugins.Feed.Froogle.Products.GoogleCategory", "Google Category");
            this.AddOrUpdatePluginLocaleResource("Plugins.Feed.Froogle.Products.Gender", "Gender");
            this.AddOrUpdatePluginLocaleResource("Plugins.Feed.Froogle.Products.AgeGroup", "Age group");
            this.AddOrUpdatePluginLocaleResource("Plugins.Feed.Froogle.Products.Color", "Color");
            this.AddOrUpdatePluginLocaleResource("Plugins.Feed.Froogle.Products.Size", "Size");
            this.AddOrUpdatePluginLocaleResource("Plugins.Feed.Froogle.SuccessResult", "Froogle feed has been successfully generated.");
            this.AddOrUpdatePluginLocaleResource("Plugins.Feed.Froogle.StaticFilePath", "Generated file path (static)");
            this.AddOrUpdatePluginLocaleResource("Plugins.Feed.Froogle.StaticFilePath.Hint", "A file path of the generated Froogle file. It's static for your store and can be shared with the Froogle service.");

            base.Install();
        }