public new void SetUp()
        {
            _storeService                  = MockRepository.GenerateMock <IStoreService>();
            _categoryService               = MockRepository.GenerateMock <ICategoryService>();
            _manufacturerService           = MockRepository.GenerateMock <IManufacturerService>();
            _customerService               = MockRepository.GenerateMock <ICustomerService>();
            _productAttributeService       = MockRepository.GenerateMock <IProductAttributeService>();
            _pictureService                = MockRepository.GenerateMock <IPictureService>();
            _newsLetterSubscriptionService = MockRepository.GenerateMock <INewsLetterSubscriptionService>();
            _productEditorSettings         = new ProductEditorSettings();
            _workContext                = MockRepository.GenerateMock <IWorkContext>();
            _vendorService              = MockRepository.GenerateMock <IVendorService>();
            _productTemplateService     = MockRepository.GenerateMock <IProductTemplateService>();
            _dateRangeService           = MockRepository.GenerateMock <IDateRangeService>();
            _taxCategoryService         = MockRepository.GenerateMock <ITaxCategoryService>();
            _measureService             = MockRepository.GenerateMock <IMeasureService>();
            _catalogSettings            = new CatalogSettings();
            _genericAttributeService    = MockRepository.GenerateMock <IGenericAttributeService>();
            _customerAttributeFormatter = MockRepository.GenerateMock <ICustomerAttributeFormatter>();
            _orderSettings              = new OrderSettings();


            _exportManager = new ExportManager(_categoryService,
                                               _manufacturerService, _customerService, _productAttributeService,
                                               _pictureService, _newsLetterSubscriptionService,
                                               _storeService, _workContext, _productEditorSettings,
                                               _vendorService, _productTemplateService, _dateRangeService,
                                               _taxCategoryService, _measureService, _catalogSettings,
                                               _genericAttributeService, _customerAttributeFormatter, _orderSettings);
        }
Example #2
0
 public CopyProductService(ICategoryService categoryService,
                           IDownloadService downloadService,
                           ILanguageService languageService,
                           ILocalizationService localizationService,
                           ILocalizedEntityService localizedEntityService,
                           IManufacturerService manufacturerService,
                           IPictureService pictureService,
                           IProductAttributeParser productAttributeParser,
                           IProductAttributeService productAttributeService,
                           IProductService productService,
                           IProductTagService productTagService,
                           ISpecificationAttributeService specificationAttributeService,
                           IStoreMappingService storeMappingService,
                           IUrlRecordService urlRecordService)
 {
     _categoryService               = categoryService;
     _downloadService               = downloadService;
     _languageService               = languageService;
     _localizationService           = localizationService;
     _localizedEntityService        = localizedEntityService;
     _manufacturerService           = manufacturerService;
     _pictureService                = pictureService;
     _productAttributeParser        = productAttributeParser;
     _productAttributeService       = productAttributeService;
     _productService                = productService;
     _productTagService             = productTagService;
     _specificationAttributeService = specificationAttributeService;
     _storeMappingService           = storeMappingService;
     _urlRecordService              = urlRecordService;
 }
Example #3
0
        public ExportManager(ICategoryService categoryService,
            IManufacturerService manufacturerService,
            IProductService productService,
			IProductAttributeService productAttributeService,
            IProductTemplateService productTemplateService,
            IPictureService pictureService,
            INewsLetterSubscriptionService newsLetterSubscriptionService,
            ILanguageService languageService,
			MediaSettings mediaSettings,
			ICommonServices services,
            IStoreMappingService storeMappingService)
        {
            _categoryService = categoryService;
            _manufacturerService = manufacturerService;
            _productService = productService;
			_productAttributeService = productAttributeService;
			_productTemplateService = productTemplateService;
            _pictureService = pictureService;
            _newsLetterSubscriptionService = newsLetterSubscriptionService;
            _languageService = languageService;
			_mediaSettings = mediaSettings;
			_services = services;
            _storeMappingService = storeMappingService;

			Logger = NullLogger.Instance;
        }
        public PriceCalculationService(
            IDiscountService discountService,
			ICategoryService categoryService,
            IProductAttributeParser productAttributeParser,
			IProductService productService,
			ShoppingCartSettings shoppingCartSettings, 
            CatalogSettings catalogSettings,
			IProductAttributeService productAttributeService,
			IDownloadService downloadService,
			ICommonServices services,
			HttpRequestBase httpRequestBase,
			ITaxService taxService)
        {
            this._discountService = discountService;
            this._categoryService = categoryService;
            this._productAttributeParser = productAttributeParser;
            this._productService = productService;
            this._shoppingCartSettings = shoppingCartSettings;
            this._catalogSettings = catalogSettings;
            this._productAttributeService = productAttributeService;
            this._downloadService = downloadService;
            this._services = services;
            this._httpRequestBase = httpRequestBase;
            this._taxService = taxService;
        }
Example #5
0
 public RewardController(IOrderService orderService,
                         ICacheManager cacheManager,
                         IProductService productService,
                         ISettingService settingService,
                         ICustomerAttributeService customerAttributeService,
                         ICustomerService customerService,
                         IShopppingCartService cartService,
                         ICustomerAddressService addressService,
                         IProductAttributeService attributeService,
                         IPaymentRecordService recordService,
                         ICustomerRewardService rewardService,
                         IProductImagesService imageService,
                         IUnitOfWorkManager unitOfWorkManager)
 {
     this._orderService             = orderService;
     this._cacheManager             = cacheManager;
     this._productService           = productService;
     this._settingService           = settingService;
     this._customerAttributeService = customerAttributeService;
     this._cartService       = cartService;
     this._customerService   = customerService;
     this._addressService    = addressService;
     this._attributeService  = attributeService;
     this._recordService     = recordService;
     this._rewardService     = rewardService;
     this._imageService      = imageService;
     this._unitOfWorkManager = unitOfWorkManager;
 }
 public ProductAttributeFormatter(IWorkContext workContext,
                                  IProductAttributeService productAttributeService,
                                  IProductAttributeParser productAttributeParser,
                                  ICurrencyService currencyService,
                                  ILocalizationService localizationService,
                                  ITaxService taxService,
                                  IPriceFormatter priceFormatter,
                                  IDownloadService downloadService,
                                  IWebHelper webHelper,
                                  IPriceCalculationService priceCalculationService,
                                  ILanguageService languageService,
                                  ILocalizedEntityService localizedEntityService,
                                  ISettingService settingService)
 {
     this._workContext             = workContext;
     this._productAttributeService = productAttributeService;
     this._productAttributeParser  = productAttributeParser;
     this._currencyService         = currencyService;
     this._localizationService     = localizationService;
     this._taxService              = taxService;
     this._priceFormatter          = priceFormatter;
     this._downloadService         = downloadService;
     this._webHelper               = webHelper;
     this._priceCalculationService = priceCalculationService;
     this._languageService         = languageService;
     this._localizedEntityService  = localizedEntityService;
     this._settingService          = settingService;
     this._shoppingCartSettings    = _settingService.LoadSetting <ShoppingCartSettings>();
 }
 public CopyProductService(IProductService productService,
     IProductAttributeService productAttributeService,
     ILanguageService languageService,
     ILocalizedEntityService localizedEntityService, 
     IPictureService pictureService,
     ICategoryService categoryService, 
     IManufacturerService manufacturerService,
     ISpecificationAttributeService specificationAttributeService,
     IDownloadService downloadService,
     IProductAttributeParser productAttributeParser,
     IUrlRecordService urlRecordService, 
     IStoreMappingService storeMappingService)
 {
     this._productService = productService;
     this._productAttributeService = productAttributeService;
     this._languageService = languageService;
     this._localizedEntityService = localizedEntityService;
     this._pictureService = pictureService;
     this._categoryService = categoryService;
     this._manufacturerService = manufacturerService;
     this._specificationAttributeService = specificationAttributeService;
     this._downloadService = downloadService;
     this._productAttributeParser = productAttributeParser;
     this._urlRecordService = urlRecordService;
     this._storeMappingService = storeMappingService;
 }
Example #8
0
        public PriceCalculationService(
            IDiscountService discountService,
			ICategoryService categoryService,
            IProductAttributeParser productAttributeParser,
			IProductService productService,
			ShoppingCartSettings shoppingCartSettings, 
            CatalogSettings catalogSettings,
			IProductAttributeService productAttributeService,
			IDownloadService downloadService,
			ICommonServices services,
			HttpRequestBase httpRequestBase,
			ITaxService taxService)
        {
            this._discountService = discountService;
            this._categoryService = categoryService;
            this._productAttributeParser = productAttributeParser;
			this._productService = productService;
            this._shoppingCartSettings = shoppingCartSettings;
            this._catalogSettings = catalogSettings;
			this._productAttributeService = productAttributeService;
			this._downloadService = downloadService;
			this._services = services;
			this._httpRequestBase = httpRequestBase;
			this._taxService = taxService;
        }
        public CopyProductService(
            IRepository <Product> productRepository,
            IRepository <RelatedProduct> relatedProductRepository,
            IRepository <CrossSellProduct> crossSellProductRepository,
            ICommonServices services,
            IProductService productService,
            IProductAttributeService productAttributeService,
            ILanguageService languageService,
            ILocalizedEntityService localizedEntityService,
            IPictureService pictureService,
            IDownloadService downloadService,
            IProductAttributeParser productAttributeParser,
            IUrlRecordService urlRecordService,
            IStoreMappingService storeMappingService,
            ICatalogSearchService catalogSearchService,
            SeoSettings seoSettings)
        {
            _productRepository          = productRepository;
            _relatedProductRepository   = relatedProductRepository;
            _crossSellProductRepository = crossSellProductRepository;
            _services                = services;
            _productService          = productService;
            _productAttributeService = productAttributeService;
            _languageService         = languageService;
            _localizedEntityService  = localizedEntityService;
            _pictureService          = pictureService;
            _downloadService         = downloadService;
            _productAttributeParser  = productAttributeParser;
            _urlRecordService        = urlRecordService;
            _storeMappingService     = storeMappingService;
            _catalogSearchService    = catalogSearchService;
            _seoSettings             = seoSettings;

            T = NullLocalizer.Instance;
        }
 public CustomerActionController(
     ICustomerActionViewModelService customerActionViewModelService,
     ICustomerService customerService,
     ICustomerAttributeService customerAttributeService,
     ICustomerTagService customerTagService,
     ILocalizationService localizationService,
     ICustomerActivityService customerActivityService,
     IProductService productService,
     ICategoryService categoryService,
     IManufacturerService manufacturerService,
     IStoreService storeService,
     IVendorService vendorService,
     ICustomerActionService customerActionService,
     IProductAttributeService productAttributeService,
     ISpecificationAttributeService specificationAttributeService,
     IDateTimeHelper dateTimeHelper)
 {
     _customerActionViewModelService = customerActionViewModelService;
     _customerService               = customerService;
     _customerAttributeService      = customerAttributeService;
     _customerTagService            = customerTagService;
     _localizationService           = localizationService;
     _customerActivityService       = customerActivityService;
     _productService                = productService;
     _categoryService               = categoryService;
     _manufacturerService           = manufacturerService;
     _storeService                  = storeService;
     _vendorService                 = vendorService;
     _customerActionService         = customerActionService;
     _productAttributeService       = productAttributeService;
     _specificationAttributeService = specificationAttributeService;
     _dateTimeHelper                = dateTimeHelper;
 }
 public ProductAttributeFormatter(IWorkContext workContext,
                                  IProductAttributeService productAttributeService,
                                  IProductAttributeParser productAttributeParser,
                                  IPriceCalculationService priceCalculationService,
                                  ICurrencyService currencyService,
                                  ILocalizationService localizationService,
                                  ITaxService taxService,
                                  IPriceFormatter priceFormatter,
                                  IDownloadService downloadService,
                                  IWebHelper webHelper,
                                  ShoppingCartSettings shoppingCartSettings,
                                  CatalogSettings catalogSettings)
 {
     _workContext             = workContext;
     _productAttributeService = productAttributeService;
     _productAttributeParser  = productAttributeParser;
     _priceCalculationService = priceCalculationService;
     _currencyService         = currencyService;
     _localizationService     = localizationService;
     _taxService           = taxService;
     _priceFormatter       = priceFormatter;
     _downloadService      = downloadService;
     _webHelper            = webHelper;
     _shoppingCartSettings = shoppingCartSettings;
     _catalogSettings      = catalogSettings;
 }
        public new void SetUp()
        {
			_store = new Store() { Id = 1 };
			_storeContext = MockRepository.GenerateMock<IStoreContext>();
			_storeContext.Expect(x => x.CurrentStore).Return(_store);

            _discountService = MockRepository.GenerateMock<IDiscountService>();

            _categoryService = MockRepository.GenerateMock<ICategoryService>();

            _productAttributeParser = MockRepository.GenerateMock<IProductAttributeParser>();
			_productService = MockRepository.GenerateMock<IProductService>();
			_productAttributeService = MockRepository.GenerateMock<IProductAttributeService>();

			_downloadService = MockRepository.GenerateMock<IDownloadService>();
			_commonServices = MockRepository.GenerateMock<ICommonServices>();
			_commonServices.Expect(x => x.StoreContext).Return(_storeContext);
			_httpRequestBase = MockRepository.GenerateMock<HttpRequestBase>();
			_taxService = MockRepository.GenerateMock<ITaxService>();

            _shoppingCartSettings = new ShoppingCartSettings();
            _catalogSettings = new CatalogSettings();

			_priceCalcService = new PriceCalculationService(_discountService, _categoryService, _productAttributeParser, _productService, _shoppingCartSettings, _catalogSettings,
				_productAttributeService, _downloadService, _commonServices, _httpRequestBase, _taxService);
        }
 public FakeShoppingCartService(CatalogSettings catalogSettings = null,
                                IAclService aclService          = null,
                                IActionContextAccessor actionContextAccessor       = null,
                                ICacheKeyService cacheKeyService                   = null,
                                ICheckoutAttributeParser checkoutAttributeParser   = null,
                                ICheckoutAttributeService checkoutAttributeService = null,
                                ICurrencyService currencyService                   = null,
                                ICustomerService customerService                   = null,
                                IDateRangeService dateRangeService                 = null,
                                IDateTimeHelper dateTimeHelper = null,
                                IEventPublisher eventPublisher = null,
                                IGenericAttributeService genericAttributeService = null,
                                ILocalizationService localizationService         = null,
                                IPermissionService permissionService             = null,
                                IPriceCalculationService priceCalculationService = null,
                                IPriceFormatter priceFormatter = null,
                                IProductAttributeParser productAttributeParser   = null,
                                IProductAttributeService productAttributeService = null,
                                IProductService productService = null,
                                IRepository <ShoppingCartItem> sciRepository = null,
                                IShippingService shippingService             = null,
                                IStaticCacheManager staticCacheManager       = null,
                                IStoreContext storeContext = null,
                                IStoreMappingService storeMappingService = null,
                                IUrlHelperFactory urlHelperFactory       = null,
                                IUrlRecordService urlRecordService       = null,
                                IWorkContext workContext    = null,
                                OrderSettings orderSettings = null,
                                ShoppingCartSettings shoppingCartSettings = null) : base(
         catalogSettings ?? new CatalogSettings(),
         aclService ?? new Mock <IAclService>().Object,
         actionContextAccessor ?? new Mock <IActionContextAccessor>().Object,
         cacheKeyService ?? new FakeCacheKeyService(),
         checkoutAttributeParser ?? new Mock <ICheckoutAttributeParser>().Object,
         checkoutAttributeService ?? new Mock <ICheckoutAttributeService>().Object,
         currencyService ?? new Mock <ICurrencyService>().Object,
         customerService ?? new Mock <ICustomerService>().Object,
         dateRangeService ?? new Mock <IDateRangeService>().Object,
         dateTimeHelper ?? new Mock <IDateTimeHelper>().Object,
         eventPublisher ?? new Mock <IEventPublisher>().Object,
         genericAttributeService ?? new Mock <IGenericAttributeService>().Object,
         localizationService ?? new Mock <ILocalizationService>().Object,
         permissionService ?? new Mock <IPermissionService>().Object,
         priceCalculationService ?? new Mock <IPriceCalculationService>().Object,
         priceFormatter ?? new Mock <IPriceFormatter>().Object,
         productAttributeParser ?? new Mock <IProductAttributeParser>().Object,
         productAttributeService ?? new Mock <IProductAttributeService>().Object,
         productService ?? new Mock <IProductService>().Object,
         sciRepository.FakeRepoNullPropagation(),
         shippingService ?? new Mock <IShippingService>().Object,
         staticCacheManager ?? new TestCacheManager(),
         storeContext ?? new Mock <IStoreContext>().Object,
         storeMappingService ?? new Mock <IStoreMappingService>().Object,
         urlHelperFactory ?? new Mock <IUrlHelperFactory>().Object,
         urlRecordService ?? new Mock <IUrlRecordService>().Object,
         workContext ?? new Mock <IWorkContext>().Object,
         orderSettings ?? new OrderSettings(),
         shoppingCartSettings ?? new ShoppingCartSettings())
 {
 }
Example #14
0
 public ProductAttributeValidator(ILocalizationService localizationService, IProductAttributeService productAttributeService)
 {
     RuleFor(x => x.Name).NotEmpty().WithMessage(localizationService.GetResource("Api.Catalog.ProductAttribute.Fields.Name.Required"));
     RuleFor(x => x).MustAsync(async(x, y, context) =>
     {
         if (!string.IsNullOrEmpty(x.Id))
         {
             var pa = await productAttributeService.GetProductAttributeById(x.Id);
             if (pa == null)
             {
                 return(false);
             }
         }
         return(true);
     }).WithMessage(localizationService.GetResource("Api.Catalog.ProductAttribute.Fields.Id.NotExists"));
     RuleFor(x => x).Must((x, context) =>
     {
         foreach (var item in x.PredefinedProductAttributeValues)
         {
             if (string.IsNullOrEmpty(item.Name))
             {
                 return(false);
             }
         }
         return(true);
     }).WithMessage(localizationService.GetResource("Api.Catalog.PredefinedProductAttributeValue.Fields.Name.Required"));
 }
 public DTOHelper(IProductService productService,
                  IAclService aclService,
                  IStoreMappingService storeMappingService,
                  IPictureService pictureService,
                  IProductAttributeService productAttributeService,
                  ICustomerApiService customerApiService,
                  IProductAttributeConverter productAttributeConverter,
                  ILanguageService languageService,
                  ICurrencyService currencyService,
                  CurrencySettings currencySettings,
                  IStoreService storeService,
                  ILocalizationService localizationService,
                  IUrlRecordService urlRecordService,
                  IProductTagService productTagService)
 {
     _productService            = productService;
     _aclService                = aclService;
     _storeMappingService       = storeMappingService;
     _pictureService            = pictureService;
     _productAttributeService   = productAttributeService;
     _customerApiService        = customerApiService;
     _productAttributeConverter = productAttributeConverter;
     _languageService           = languageService;
     _currencyService           = currencyService;
     _currencySettings          = currencySettings;
     _storeService              = storeService;
     _localizationService       = localizationService;
     _urlRecordService          = urlRecordService;
     _productTagService         = productTagService;
 }
Example #16
0
        public IsamOrderService(
            ISettingService settingService,
            IEncryptionService encryptionService,
            IBaseService baseIsamService,
            IProductAttributeParser productAttributeParser,
            IAttributeUtilities attributeUtilities,
            IRepository <ShopAbc> shopAbcRepository,
            IRepository <CustomerShopMapping> customerShopMappingRepository,
            IRepository <WarrantySku> warrantySkuRepository,
            IRepository <ProductAbcDescription> productAbcDescriptionRepository,
            IRepository <GiftCardUsageHistory> giftCardUsageHistoryRepository,
            IStoreContext storeContext,
            IWorkContext workContext,
            IGiftCardService giftCardService,
            ExportOrderSettings settings,
            ILogger logger,
            IOrderService orderService,
            IPriceCalculationService priceCalculationService,
            IAddressService addressService,
            IProductService productService,
            IStateProvinceService stateProvinceService,
            ICountryService countryService,
            IUrlRecordService urlRecordService,
            IProductAttributeService productAttributeService,
            IRepository <Product> productRepository,
            ICustomShopService customShopService,
            IIsamGiftCardService isamGiftCardService,
            IYahooService yahooService
            )
        {
            _settingService                  = settingService;
            _encryptionService               = encryptionService;
            _baseIsamService                 = baseIsamService;
            _productAttributeParser          = productAttributeParser;
            _attributeUtilities              = attributeUtilities;
            _shopAbcRepository               = shopAbcRepository;
            _customerShopMappingRepository   = customerShopMappingRepository;
            _warrantySkuRepository           = warrantySkuRepository;
            _productAbcDescriptionRepository = productAbcDescriptionRepository;
            _giftCardUsageHistoryRepository  = giftCardUsageHistoryRepository;
            _storeContext            = storeContext;
            _workContext             = workContext;
            _giftCardService         = giftCardService;
            _settings                = settings;
            _logger                  = logger;
            _orderService            = orderService;
            _priceCalculationService = priceCalculationService;
            _addressService          = addressService;
            _productService          = productService;
            _stateProvinceService    = stateProvinceService;
            _countryService          = countryService;
            _urlRecordService        = urlRecordService;
            _productAttributeService = productAttributeService;
            _productRepository       = productRepository;
            _customShopService       = customShopService;
            _isamGiftCardService     = isamGiftCardService;
            _yahooService            = yahooService;

            InitializeAllColParams();
        }
 public CustomerActionViewModelService(ICustomerService customerService,
                                       ICustomerTagService customerTagService,
                                       ILocalizationService localizationService,
                                       ICustomerActivityService customerActivityService,
                                       ICategoryService categoryService,
                                       IManufacturerService manufacturerService,
                                       IStoreService storeService,
                                       IVendorService vendorService,
                                       ICustomerActionService customerActionService,
                                       IProductAttributeService productAttributeService,
                                       IBannerService bannerService,
                                       IInteractiveFormService interactiveFormService,
                                       IMessageTemplateService messageTemplateService,
                                       IDateTimeHelper dateTimeHelper,
                                       IProductService productService)
 {
     _customerService         = customerService;
     _customerTagService      = customerTagService;
     _localizationService     = localizationService;
     _customerActivityService = customerActivityService;
     _categoryService         = categoryService;
     _manufacturerService     = manufacturerService;
     _storeService            = storeService;
     _vendorService           = vendorService;
     _customerActionService   = customerActionService;
     _bannerService           = bannerService;
     _interactiveFormService  = interactiveFormService;
     _messageTemplateService  = messageTemplateService;
     _dateTimeHelper          = dateTimeHelper;
     _productService          = productService;
 }
Example #18
0
 public CustomShoppingCartService(
     HttpContextBase httpContext,
     IPluginFinder pluginFinder,
     IOrderService orderService,
     IRepository <ShoppingCartItem> sciRepository,
     IWorkContext workContext,
     IStoreContext storeContext,
     ICurrencyService currencyService,
     IProductService productService,
     ILocalizationService localizationService,
     IProductAttributeParser productAttributeParser,
     ICheckoutAttributeService checkoutAttributeService,
     ICheckoutAttributeParser checkoutAttributeParser,
     IPriceFormatter priceFormatter,
     ICustomerService customerService,
     ShoppingCartSettings shoppingCartSettings,
     IEventPublisher eventPublisher,
     IPermissionService permissionService,
     IAclService aclService,
     IStoreMappingService storeMappingService,
     IGenericAttributeService genericAttributeService,
     IProductAttributeService productAttributeService,
     IDateTimeHelper dateTimeHelper) : base(sciRepository, workContext, storeContext, currencyService, productService, localizationService,
                                            productAttributeParser, checkoutAttributeService, checkoutAttributeParser, priceFormatter, customerService, shoppingCartSettings,
                                            eventPublisher, permissionService, aclService, storeMappingService, genericAttributeService, productAttributeService, dateTimeHelper)
 {
     _httpContext    = httpContext;
     _pluginFinder   = pluginFinder;
     _productService = productService;
     _orderService   = orderService;
     _workContext    = workContext;
     _storeContext   = storeContext;
 }
            public virtual void PrepareAttributeFilters(IList <int> alreadyFilteredProductVariantAttributeIds,
                                                        IList <int> filterableProductVariantAttributeIds,
                                                        IProductAttributeService productAttributeService,
                                                        IWebHelper webHelper,
                                                        IWorkContext workContext)
            {
                //var productVariantAttributes = productAttributeService.GetProductVariantAttributesByIds(filterableProductVariantAttributeIds);
                //AttributeFilterGroup attributeFilterGroup = null;
                //foreach (var attributeGroup in productVariantAttributes.GroupBy(pva => pva.ProductAttributeId))
                //{
                //    var attribute = attributeGroup.FirstOrDefault().ProductAttribute;
                //    attributeFilterGroup = new AttributeFilterGroup() { Name = attribute.GetLocalized(x => x.Name), Id = attribute.Id };
                //    foreach (var attributeGrouped in attributeGroup)
                //    {
                //        foreach (var valueGroup in attributeGrouped.ProductVariantAttributeValues.GroupBy(x => x.ProductAttributeOptionId))
                //        {
                //            var value = valueGroup.First();

                //            attributeFilterGroup.Items.Add(new AttributeFilterItem()
                //            {
                //                Id = value.ProductAttributeOptionId,
                //                Name = value.GetLocalized(x => x.Name),
                //                State = alreadyFilteredProductVariantAttributeIds.Contains(item.Id) ? FilterItemState.Checked : FilterItemState.Unchecked
                //            });
                //        }
                //    }
                //    this.Groups.Add(attributeFilterGroup);
                //}
            }
 public ProductServiceOver(IRepository <Grand.Plugin.Misc.VPAPlugin.Domains.Product> repo,
                           ICacheManager cacheManager,
                           IRepository <Product> productRepository,
                           IRepository <ProductReview> productReviewRepository,
                           IRepository <UrlRecord> urlRecordRepository,
                           IRepository <Customer> customerRepository,
                           IRepository <CustomerRoleProduct> customerRoleProductRepository,
                           IRepository <CustomerTagProduct> customerTagProductRepository,
                           IRepository <ProductDeleted> productDeletedRepository,
                           IRepository <CustomerProduct> customerProductRepository,
                           IRepository <ProductTag> productTagRepository,
                           IProductAttributeService productAttributeService,
                           IProductAttributeParser productAttributeParser,
                           IWorkContext workContext,
                           IMediator mediator,
                           IAclService aclService,
                           IStoreMappingService storeMappingService,
                           CatalogSettings catalogSettings,
                           IRepository <Vendor> vendorService,
                           IStoreContext storeContext,
                           IForumService forumService,
                           VPAPluginSettings settings) : base(cacheManager, productRepository, productReviewRepository, urlRecordRepository, customerRepository,
                                                              customerRoleProductRepository, customerTagProductRepository, productDeletedRepository, customerProductRepository, productTagRepository,
                                                              productAttributeService, productAttributeParser, workContext, mediator, aclService, storeMappingService, catalogSettings)
 {
     _repo                = repo;
     _aclService          = aclService;
     _storeMappingService = storeMappingService;
     _vendorService       = vendorService;
     _customerService     = customerRepository;
     _storeContext        = storeContext;
     _workContext         = workContext;
     _forumService        = forumService;
     _settings            = settings;
 }
 public ProductsController(IProductApiService productApiService,
                           IJsonFieldsSerializer jsonFieldsSerializer,
                           IProductService productService,
                           IUrlRecordService urlRecordService,
                           ICustomerActivityService customerActivityService,
                           ILocalizationService localizationService,
                           IFactory <Product> factory,
                           IAclService aclService,
                           IStoreMappingService storeMappingService,
                           IStoreService storeService,
                           ICustomerService customerService,
                           IDiscountService discountService,
                           IPictureService pictureService,
                           IManufacturerService manufacturerService,
                           IProductTagService productTagService,
                           IProductAttributeService productAttributeService,
                           IDTOHelper dtoHelper) : base(jsonFieldsSerializer, aclService, customerService, storeMappingService, storeService, discountService, customerActivityService, localizationService, pictureService)
 {
     _productApiService       = productApiService;
     _factory                 = factory;
     _manufacturerService     = manufacturerService;
     _productTagService       = productTagService;
     _urlRecordService        = urlRecordService;
     _productService          = productService;
     _productAttributeService = productAttributeService;
     _dtoHelper               = dtoHelper;
 }
 public ProductAttributesPartDriver(
     IProductAttributeService attributeService,
     IEnumerable <IProductAttributeExtensionProvider> attributeExtensions)
 {
     _attributeService    = attributeService;
     _attributeExtensions = attributeExtensions;
 }
Example #23
0
 /// <summary>
 /// Ctor
 /// </summary>
 /// <param name="cacheManager">Cache manager</param>
 /// <param name="productRepository">Product repository</param>
 /// <param name="productVariantRepository">Product variant repository</param>
 /// <param name="relatedProductRepository">Related product repository</param>
 /// <param name="crossSellProductRepository">Cross-sell product repository</param>
 /// <param name="tierPriceRepository">Tier price repository</param>
 /// <param name="localizedPropertyRepository">Localized property repository</param>
 /// <param name="productPictureRepository">Product picture repository</param>
 /// <param name="productAttributeService">Product attribute service</param>
 /// <param name="productAttributeParser">Product attribute parser service</param>
 /// <param name="languageService">Language service</param>
 /// <param name="workflowMessageService">Workflow message service</param>
 /// <param name="dataProvider">Data provider</param>
 /// <param name="dbContext">Database Context</param>
 /// <param name="localizationSettings">Localization settings</param>
 /// <param name="commonSettings">Common settings</param>
 /// <param name="eventPublisher"></param>
 public ProductService(ICacheManager cacheManager,
     IRepository<Product> productRepository,
     IRepository<ProductVariant> productVariantRepository,
     IRepository<RelatedProduct> relatedProductRepository,
     IRepository<CrossSellProduct> crossSellProductRepository,
     IRepository<TierPrice> tierPriceRepository,
     IRepository<ProductPicture> productPictureRepository,
     IRepository<LocalizedProperty> localizedPropertyRepository,
     IProductAttributeService productAttributeService,
     IProductAttributeParser productAttributeParser,
     ILanguageService languageService,
     IWorkflowMessageService workflowMessageService,
     IDataProvider dataProvider, IDbContext dbContext,
     LocalizationSettings localizationSettings, CommonSettings commonSettings,
     IEventPublisher eventPublisher)
 {
     _cacheManager = cacheManager;
     _productRepository = productRepository;
     _productVariantRepository = productVariantRepository;
     _relatedProductRepository = relatedProductRepository;
     _crossSellProductRepository = crossSellProductRepository;
     _tierPriceRepository = tierPriceRepository;
     _productPictureRepository = productPictureRepository;
     _localizedPropertyRepository = localizedPropertyRepository;
     _productAttributeService = productAttributeService;
     _productAttributeParser = productAttributeParser;
     _languageService = languageService;
     _workflowMessageService = workflowMessageService;
     _dataProvider = dataProvider;
     _dbContext = dbContext;
     _localizationSettings = localizationSettings;
     _commonSettings = commonSettings;
     _eventPublisher = eventPublisher;
 }
Example #24
0
 public CopyProductService(/*IUnitOfWork unitOfWork,*/
     IProductService productService,
     IProductAttributeService productAttributeService,
     ILanguageService languageService,
     ILocalizedEntityService localizedEntityService,
     ILocalizationService localizationService,
     IPictureService pictureService,
     ICategoryService categoryService,
     IManufacturerService manufacturerService,
     ISpecificationAttributeService specificationAttributeService,
     IDownloadService downloadService,
     IProductAttributeParser productAttributeParser,
     IUrlRecordService urlRecordService,
     IStoreMappingService storeMappingService,
     ISettingService settingService
     )
 {
     //this._unitOfWork = unitOfWork;
     this._productService                = productService;
     this._productAttributeService       = productAttributeService;
     this._languageService               = languageService;
     this._localizedEntityService        = localizedEntityService;
     this._localizationService           = localizationService;
     this._pictureService                = pictureService;
     this._categoryService               = categoryService;
     this._manufacturerService           = manufacturerService;
     this._specificationAttributeService = specificationAttributeService;
     this._downloadService               = downloadService;
     this._productAttributeParser        = productAttributeParser;
     this._urlRecordService              = urlRecordService;
     this._storeMappingService           = storeMappingService;
     this._settingService                = settingService;
     this._seoSettings = _settingService.LoadSetting <SeoSettings>();
 }
Example #25
0
 public PriceCalculationService(
     IDiscountService discountService,
     ICategoryService categoryService,
     IManufacturerService manufacturerService,
     IProductAttributeParser productAttributeParser,
     IProductService productService,
     CatalogSettings catalogSettings,
     IProductAttributeService productAttributeService,
     IDownloadService downloadService,
     ICommonServices services,
     HttpRequestBase httpRequestBase,
     ITaxService taxService,
     TaxSettings taxSettings)
 {
     _discountService         = discountService;
     _categoryService         = categoryService;
     _manufacturerService     = manufacturerService;
     _productAttributeParser  = productAttributeParser;
     _productService          = productService;
     _catalogSettings         = catalogSettings;
     _productAttributeService = productAttributeService;
     _downloadService         = downloadService;
     _services        = services;
     _httpRequestBase = httpRequestBase;
     _taxService      = taxService;
     _taxSettings     = taxSettings;
 }
Example #26
0
 public ProductAttributeLocalizationServices(
     ILocalizationService localizationService,
     IProductAttributeService attributeService)
 {
     _localizationService = localizationService;
     _attributeService    = attributeService;
 }
Example #27
0
        public new void SetUp()
        {
            _store = new Store()
            {
                Id = 1
            };
            _storeContext = MockRepository.GenerateMock <IStoreContext>();
            _storeContext.Expect(x => x.CurrentStore).Return(_store);

            _discountService = MockRepository.GenerateMock <IDiscountService>();

            _categoryService = MockRepository.GenerateMock <ICategoryService>();

            _productAttributeParser  = MockRepository.GenerateMock <IProductAttributeParser>();
            _productService          = MockRepository.GenerateMock <IProductService>();
            _productAttributeService = MockRepository.GenerateMock <IProductAttributeService>();

            _downloadService = MockRepository.GenerateMock <IDownloadService>();
            _services        = MockRepository.GenerateMock <ICommonServices>();
            _services.Expect(x => x.StoreContext).Return(_storeContext);
            _httpRequestBase = MockRepository.GenerateMock <HttpRequestBase>();
            _taxService      = MockRepository.GenerateMock <ITaxService>();

            _shoppingCartSettings = new ShoppingCartSettings();
            _catalogSettings      = new CatalogSettings();

            _priceCalcService = new PriceCalculationService(_discountService, _categoryService, _productAttributeParser, _productService, _shoppingCartSettings, _catalogSettings,
                                                            _productAttributeService, _downloadService, _services, _httpRequestBase, _taxService);
        }
Example #28
0
 public StoreController(
     IPriceFormatter priceFormatter,
     ICurrencyService currencyService,
     IProductService productService,
     IProductAttributeService productAttributeService,
     ICategoryService categoryService,
     IManufacturerService manufacturerService,
     ICustomerService customerService,
     IOrderService orderService,
     IMediaService mediaService,
     IShoppingCartService shoppingCartService,
     ICatalogSearchService catalogSearchService)
 {
     _priceFormatter          = priceFormatter;
     _currencyService         = currencyService;
     _productService          = productService;
     _productAttributeService = productAttributeService;
     _categoryService         = categoryService;
     _manufacturerService     = manufacturerService;
     _customerService         = customerService;
     _categoryService         = categoryService;
     _orderService            = orderService;
     _mediaService            = mediaService;
     _shoppingCartService     = shoppingCartService;
     _catalogSearchService    = catalogSearchService;
 }
Example #29
0
 public WidgetsProductPictureModifierController(
     IPermissionService permissionService,
     IProductPictureModifierService productPictureModifierService,
     IProductAttributeService productAttributeService,
     IProductService productService,
     ILocalizationService localizationService,
     ICategoryModelFactory categoryModelFactory,
     IPictureService pictureService,
     ICustomLogoService logoService,
     IProductAttributeParser productAttributeParser,
     ISettingService settingService,
     MediaSettings mediaSettings,
     ILogoPositionService logoPositionService,
     IStaticCacheManager cacheManager)
 {
     _permissionService             = permissionService;
     _productPictureModifierService = productPictureModifierService;
     _productAttributeService       = productAttributeService;
     _productService         = productService;
     _localizationService    = localizationService;
     _categoryModelFactory   = categoryModelFactory;
     _pictureService         = pictureService;
     _logoService            = logoService;
     _productAttributeParser = productAttributeParser;
     _settingService         = settingService;
     _mediaSettings          = mediaSettings;
     _logoPositionService    = logoPositionService;
     _cacheManager           = cacheManager;
 }
Example #30
0
 public ProductService(
     IRepository <Product> productRepository,
     IRepository <RelatedProduct> relatedProductRepository,
     IRepository <CrossSellProduct> crossSellProductRepository,
     IRepository <TierPrice> tierPriceRepository,
     IRepository <ProductMediaFile> productPictureRepository,
     IRepository <ProductVariantAttributeCombination> productVariantAttributeCombinationRepository,
     IRepository <ProductBundleItem> productBundleItemRepository,
     IRepository <ShoppingCartItem> shoppingCartItemRepository,
     IProductAttributeService productAttributeService,
     IProductAttributeParser productAttributeParser,
     IDbContext dbContext,
     LocalizationSettings localizationSettings,
     ICommonServices services)
 {
     _productRepository          = productRepository;
     _relatedProductRepository   = relatedProductRepository;
     _crossSellProductRepository = crossSellProductRepository;
     _tierPriceRepository        = tierPriceRepository;
     _productFileRepository      = productPictureRepository;
     _productVariantAttributeCombinationRepository = productVariantAttributeCombinationRepository;
     _productBundleItemRepository = productBundleItemRepository;
     _shoppingCartItemRepository  = shoppingCartItemRepository;
     _productAttributeService     = productAttributeService;
     _productAttributeParser      = productAttributeParser;
     _dbContext            = dbContext;
     _localizationSettings = localizationSettings;
     _services             = services;
 }
 public ShoppingCartValidator(
     IWorkContext workContext,
     ICurrencyService currencyService,
     IProductService productService,
     ITranslationService translationService,
     IProductAttributeParser productAttributeParser,
     ICheckoutAttributeService checkoutAttributeService,
     ICheckoutAttributeParser checkoutAttributeParser,
     IPriceFormatter priceFormatter,
     IMediator mediator,
     IPermissionService permissionService,
     IAclService aclService,
     IProductAttributeService productAttributeService,
     IProductReservationService productReservationService,
     IStockQuantityService stockQuantityService,
     IWarehouseService warehouseService,
     ShoppingCartSettings shoppingCartSettings)
 {
     _workContext              = workContext;
     _currencyService          = currencyService;
     _productService           = productService;
     _translationService       = translationService;
     _productAttributeParser   = productAttributeParser;
     _checkoutAttributeService = checkoutAttributeService;
     _checkoutAttributeParser  = checkoutAttributeParser;
     _priceFormatter           = priceFormatter;
     _mediator                  = mediator;
     _permissionService         = permissionService;
     _aclService                = aclService;
     _productAttributeService   = productAttributeService;
     _productReservationService = productReservationService;
     _stockQuantityService      = stockQuantityService;
     _warehouseService          = warehouseService;
     _shoppingCartSettings      = shoppingCartSettings;
 }
 public CopyProductService(IProductService productService,
                           IProductAttributeService productAttributeService,
                           ILanguageService languageService,
                           ILocalizedEntityService localizedEntityService,
                           ILocalizationService localizationService,
                           IPictureService pictureService,
                           ICategoryService categoryService,
                           IDestinationService destinationService,
                           ISpecificationAttributeService specificationAttributeService,
                           IDownloadService downloadService,
                           IProductAttributeParser productAttributeParser,
                           IUrlRecordService urlRecordService,
                           IStoreMappingService storeMappingService)
 {
     this._productService                = productService;
     this._productAttributeService       = productAttributeService;
     this._languageService               = languageService;
     this._localizedEntityService        = localizedEntityService;
     this._localizationService           = localizationService;
     this._pictureService                = pictureService;
     this._categoryService               = categoryService;
     this._destinationService            = destinationService;
     this._specificationAttributeService = specificationAttributeService;
     this._downloadService               = downloadService;
     this._productAttributeParser        = productAttributeParser;
     this._urlRecordService              = urlRecordService;
     this._storeMappingService           = storeMappingService;
 }
Example #33
0
 public new void SetUp()
 {
     _storeService                  = MockRepository.GenerateMock <IStoreService>();
     _categoryService               = MockRepository.GenerateMock <ICategoryService>();
     _manufacturerService           = MockRepository.GenerateMock <IManufacturerService>();
     _productAttributeService       = MockRepository.GenerateMock <IProductAttributeService>();
     _pictureService                = MockRepository.GenerateMock <IPictureService>();
     _newsLetterSubscriptionService = MockRepository.GenerateMock <INewsLetterSubscriptionService>();
     _productEditorSettings         = new ProductEditorSettings();
     _workContext            = MockRepository.GenerateMock <IWorkContext>();
     _vendorService          = MockRepository.GenerateMock <IVendorService>();
     _productTemplateService = MockRepository.GenerateMock <IProductTemplateService>();
     _shippingService        = MockRepository.GenerateMock <IShippingService>();
     _taxCategoryService     = MockRepository.GenerateMock <ITaxCategoryService>();
     _measureService         = MockRepository.GenerateMock <IMeasureService>();
     _catalogSettings        = new CatalogSettings();
     _discountService        = MockRepository.GenerateMock <IDiscountService>(); //NOP 3.826
     _giftCardService        = MockRepository.GenerateMock <IGiftCardService>(); //NOP 3.830
     _exportManager          = new ExportManager(_categoryService,
                                                 _manufacturerService, _productAttributeService,
                                                 _pictureService, _newsLetterSubscriptionService,
                                                 _storeService, _workContext, _productEditorSettings,
                                                 _vendorService, _productTemplateService, _shippingService,
                                                 _taxCategoryService, _measureService, _catalogSettings,
                                                 _discountService,  //NOP 3.826
                                                 _giftCardService); //NOP 3.830
 }
 public CustomerActionController(
     ICustomerActionViewModelService customerActionViewModelService,
     ICustomerService customerService,
     ICustomerAttributeService customerAttributeService,
     ICustomerTagService customerTagService,
     ILocalizationService localizationService,
     ICustomerActivityService customerActivityService,
     IProductService productService,
     ICategoryService categoryService,
     IManufacturerService manufacturerService,
     IStoreService storeService,
     IVendorService vendorService,
     ICustomerActionService customerActionService,
     IProductAttributeService productAttributeService,
     ISpecificationAttributeService specificationAttributeService)
 {
     this._customerActionViewModelService = customerActionViewModelService;
     this._customerService               = customerService;
     this._customerAttributeService      = customerAttributeService;
     this._customerTagService            = customerTagService;
     this._localizationService           = localizationService;
     this._customerActivityService       = customerActivityService;
     this._productService                = productService;
     this._categoryService               = categoryService;
     this._manufacturerService           = manufacturerService;
     this._storeService                  = storeService;
     this._vendorService                 = vendorService;
     this._customerActionService         = customerActionService;
     this._productAttributeService       = productAttributeService;
     this._specificationAttributeService = specificationAttributeService;
 }
 public DTOHelper(IStoreContext storeContext,
                  IProductService productService,
                  IAclService aclService,
                  IStoreMappingService storeMappingService,
                  IPictureService pictureService,
                  IProductAttributeService productAttributeService,
                  ICustomerApiService customerApiService,
                  IProductAttributeConverter productAttributeConverter,
                  ILanguageService languageService,
                  ICurrencyService currencyService,
                  CurrencySettings currencySettings,
                  IStoreService storeService)
 {
     _productService            = productService;
     _aclService                = aclService;
     _storeMappingService       = storeMappingService;
     _pictureService            = pictureService;
     _productAttributeService   = productAttributeService;
     _customerApiService        = customerApiService;
     _productAttributeConverter = productAttributeConverter;
     _languageService           = languageService;
     _currencyService           = currencyService;
     _currencySettings          = currencySettings;
     _storeService              = storeService;
     _storeContext              = storeContext;
 }
Example #36
0
        public CatalogController(ICategoryService categoryService, 
            IManufacturerService manufacturerService, IProductService productService, 
            IProductTemplateService productTemplateService,
            ICategoryTemplateService categoryTemplateService,
            IManufacturerTemplateService manufacturerTemplateService,
            IProductAttributeService productAttributeService, IProductAttributeParser productAttributeParser, 
            IWorkContext workContext, ITaxService taxService, ICurrencyService currencyService,
            IPictureService pictureService, ILocalizationService localizationService,
            IPriceCalculationService priceCalculationService, IPriceFormatter priceFormatter,
            IWebHelper webHelper, ISpecificationAttributeService specificationAttributeService,
            ICustomerContentService customerContentService, IDateTimeHelper dateTimeHelper,
            IShoppingCartService shoppingCartService,
            IRecentlyViewedProductsService recentlyViewedProductsService, ICompareProductsService compareProductsService,
            IWorkflowMessageService workflowMessageService, IProductTagService productTagService,
            IOrderReportService orderReportService, ICustomerService customerService,
            IBackInStockSubscriptionService backInStockSubscriptionService,
            IPermissionService permissionService,
            MediaSettings mediaSetting, CatalogSettings catalogSettings,
            ShoppingCartSettings shoppingCartSettings, StoreInformationSettings storeInformationSettings,
            LocalizationSettings localizationSettings, CustomerSettings customerSettings, ICacheManager cacheManager)
        {
            this._categoryService = categoryService;
            this._manufacturerService = manufacturerService;
            this._productService = productService;
            this._productTemplateService = productTemplateService;
            this._categoryTemplateService = categoryTemplateService;
            this._manufacturerTemplateService = manufacturerTemplateService;
            this._productAttributeService = productAttributeService;
            this._productAttributeParser = productAttributeParser;
            this._workContext = workContext;
            this._taxService = taxService;
            this._currencyService = currencyService;
            this._pictureService = pictureService;
            this._localizationService = localizationService;
            this._priceCalculationService = priceCalculationService;
            this._priceFormatter = priceFormatter;
            this._webHelper = webHelper;
            this._specificationAttributeService = specificationAttributeService;
            this._customerContentService = customerContentService;
            this._dateTimeHelper = dateTimeHelper;
            this._shoppingCartService = shoppingCartService;
            this._recentlyViewedProductsService = recentlyViewedProductsService;
            this._compareProductsService = compareProductsService;
            this._workflowMessageService = workflowMessageService;
            this._productTagService = productTagService;
            this._orderReportService = orderReportService;
            this._customerService = customerService;
            this._backInStockSubscriptionService = backInStockSubscriptionService;
            this._permissionService = permissionService;

            this._mediaSetting = mediaSetting;
            this._catalogSettings = catalogSettings;
            this._shoppingCartSettings = shoppingCartSettings;
            this._storeInformationSettings = storeInformationSettings;
            this._localizationSettings = localizationSettings;
            this._customerSettings = customerSettings;

            this._cacheManager = cacheManager;
        }
Example #37
0
        public ProductController(
			ICommonServices services,
			IManufacturerService manufacturerService,
			IProductService productService,
			IProductAttributeService productAttributeService,
			IProductAttributeParser productAttributeParser,
			ITaxService taxService,
			ICurrencyService currencyService,
			IPictureService pictureService,
			IPriceCalculationService priceCalculationService, 
			IPriceFormatter priceFormatter,
			ICustomerContentService customerContentService, 
			ICustomerService customerService,
			IShoppingCartService shoppingCartService,
			IRecentlyViewedProductsService recentlyViewedProductsService, 
			IWorkflowMessageService workflowMessageService, 
			IProductTagService productTagService,
			IOrderReportService orderReportService,
			IBackInStockSubscriptionService backInStockSubscriptionService, 
			IAclService aclService,
			IStoreMappingService storeMappingService,
			MediaSettings mediaSettings, 
			CatalogSettings catalogSettings,
			ShoppingCartSettings shoppingCartSettings,
			LocalizationSettings localizationSettings, 
			CaptchaSettings captchaSettings,
			CatalogHelper helper,
            IDownloadService downloadService,
            ILocalizationService localizationService)
        {
            this._services = services;
            this._manufacturerService = manufacturerService;
            this._productService = productService;
            this._productAttributeService = productAttributeService;
            this._productAttributeParser = productAttributeParser;
            this._taxService = taxService;
            this._currencyService = currencyService;
            this._pictureService = pictureService;
            this._priceCalculationService = priceCalculationService;
            this._priceFormatter = priceFormatter;
            this._customerContentService = customerContentService;
            this._customerService = customerService;
            this._shoppingCartService = shoppingCartService;
            this._recentlyViewedProductsService = recentlyViewedProductsService;
            this._workflowMessageService = workflowMessageService;
            this._productTagService = productTagService;
            this._orderReportService = orderReportService;
            this._backInStockSubscriptionService = backInStockSubscriptionService;
            this._aclService = aclService;
            this._storeMappingService = storeMappingService;
            this._mediaSettings = mediaSettings;
            this._catalogSettings = catalogSettings;
            this._shoppingCartSettings = shoppingCartSettings;
            this._localizationSettings = localizationSettings;
            this._captchaSettings = captchaSettings;
            this._helper = helper;
            this._downloadService = downloadService;
            this._localizationService = localizationService;
        }
 public PriceForSizeService(IRepository<Product_PriceForSize> productRepository, 
   IRepository<ProductAttributeValue_PriceForSize> productAttributeValueRepository_ps,
   IProductAttributeService productAttributeService)
 {
   _productRepository = productRepository;
   _productAttributeValueRepository_ps = productAttributeValueRepository_ps;
   _productAttributeService = productAttributeService;
 }
        public ProductAttributeParser(
			IProductAttributeService productAttributeService,
			IRepository<ProductVariantAttributeCombination> pvacRepository,
			ICacheManager cacheManager)
        {
            _productAttributeService = productAttributeService;
            _pvacRepository = pvacRepository;
            _cacheManager = cacheManager;
        }
 public promoService(
     IProductService productService,
     ICategoryService categoryService,
     IManufacturerService manufacturerService,
     IPictureService pictureService,
     ICurrencyService currencyService,
     ISettingService settingService,
     IWorkContext workContext,
     IMeasureService measureService,
     MeasureSettings measureSettings,
     CurrencySettings currencySettings,
     IProductAttributeService productAttributeService,
     IPriceCalculationService priceCalculationService,
     ITaxService taxService,
     ILogger logger,
     IStoreService storeService,
     IPromoUtilities promoUtilities,
     PromoSettings promoSettings,
     IShippingService shippingService,
     IGenericAttributeService genericAttributeService,
     IStoreContext storeContext,
     IProductMappingService productMappingService,
     IShoppingCartService shoppingCartService,
     ICouponService qixolPromosCouponService,
     IAttributeValueService attributeValueService,
     IOrderService orderService,
     ICustomerService customerService,
     ILocalizationService localizationService)
 {
     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._currencySettings = currencySettings;
     this._productAttributeService = productAttributeService;
     this._priceCalculationService = priceCalculationService;
     this._taxService = taxService;
     this._logger = logger;
     this._promoUtilities = promoUtilities;
     this._storeService = storeService;
     this._shippingService = shippingService;
     this._genericAttributeService = genericAttributeService;
     this._storeContext = storeContext;
     this._productMappingService = productMappingService;
     this._shoppingCartService = shoppingCartService;
     this._couponService = qixolPromosCouponService;
     this._attributeValueService = attributeValueService;
     this._orderService = orderService;
     this._promoSettings = promoSettings;
     this._customerService = customerService;
     this._localizationService = localizationService;
 }
 public WidgetsPriceForSizeController(
   IStoreContext storeContext, 
   IPriceForSizeService priceForSizeService,
   IProductAttributeService productAttributeService)
 {
   _storeContext = storeContext;
   _priceForSizeService = priceForSizeService;
   _productAttributeService = productAttributeService;
 }
 public ShoppingCartService(IRepository<ShoppingCartItem> sciRepository,
     IWorkContext workContext, IStoreContext storeContext,
     ICurrencyService currencyService,
     IProductService productService, ILocalizationService localizationService,
     IProductAttributeParser productAttributeParser,
     global::Nop.Services.Orders.ICheckoutAttributeService checkoutAttributeService,
     global::Nop.Services.Orders.ICheckoutAttributeParser checkoutAttributeParser,
     IPriceFormatter priceFormatter,
     ICustomerService customerService,
     ShoppingCartSettings shoppingCartSettings,
     IEventPublisher eventPublisher,
     IPermissionService permissionService,
     IAclService aclService,
     IStoreMappingService storeMappingService,
     IGenericAttributeService genericAttributeService,
     IProductAttributeService productAttributeService,
     PromoSettings promoSettings) :
     base( sciRepository,
         workContext,
         storeContext,
         currencyService,
         productService,
         localizationService,
         productAttributeParser,
         checkoutAttributeService,
         checkoutAttributeParser,
         priceFormatter,
         customerService,
         shoppingCartSettings,
         eventPublisher,
         permissionService,
         aclService,
         storeMappingService,
         genericAttributeService,
         productAttributeService)
 {
     this._sciRepository = sciRepository;
     this._workContext = workContext;
     this._storeContext = storeContext;
     this._currencyService = currencyService;
     this._productService = productService;
     this._localizationService = localizationService;
     this._productAttributeParser = productAttributeParser;
     this._checkoutAttributeService = checkoutAttributeService;
     this._checkoutAttributeParser = checkoutAttributeParser;
     this._priceFormatter = priceFormatter;
     this._customerService = customerService;
     this._shoppingCartSettings = shoppingCartSettings;
     this._eventPublisher = eventPublisher;
     this._permissionService = permissionService;
     this._aclService = aclService;
     this._storeMappingService = storeMappingService;
     this._genericAttributeService = genericAttributeService;
     this._productAttributeService = productAttributeService;
     this._promoSettings = promoSettings;
 }
        public new void SetUp()
        {
            _categoryService = MockRepository.GenerateMock<ICategoryService>();
            _manufacturerService = MockRepository.GenerateMock<IManufacturerService>();
            _productAttributeService = MockRepository.GenerateMock<IProductAttributeService>();
            _pictureService = MockRepository.GenerateMock<IPictureService>();
            _newsLetterSubscriptionService = MockRepository.GenerateMock<INewsLetterSubscriptionService>();

            _exportManager = new ExportManager(_categoryService,
                _manufacturerService, _productAttributeService, _pictureService, _newsLetterSubscriptionService);
        }
 public MtProductService(ICacheManager cacheManager,
     IRepository<Product> productRepository,
     IRepository<RelatedProduct> relatedProductRepository,
     IRepository<CrossSellProduct> crossSellProductRepository,
     IRepository<TierPrice> tierPriceRepository,
     IRepository<ProductPicture> productPictureRepository,
     IRepository<LocalizedProperty> localizedPropertyRepository,
     IRepository<AclRecord> aclRepository,
     IRepository<StoreMapping> storeMappingRepository,
     IRepository<ProductSpecificationAttribute> productSpecificationAttributeRepository,
     IRepository<ProductReview> productReviewRepository,
     IRepository<ProductWarehouseInventory> productWarehouseInventoryRepository,
     IProductAttributeService productAttributeService,
     IProductAttributeParser productAttributeParser,
     ILanguageService languageService,
     IWorkflowMessageService workflowMessageService,
     IDataProvider dataProvider,
     IDbContext dbContext,
     IWorkContext workContext,
     IStoreContext storeContext,
     LocalizationSettings localizationSettings,
     CommonSettings commonSettings,
     CatalogSettings catalogSettings,
     IEventPublisher eventPublisher,
     IAclService aclService,
     IStoreMappingService storeMappingService)
 {
     this._cacheManager = cacheManager;
     this._productRepository = productRepository;
     this._relatedProductRepository = relatedProductRepository;
     this._crossSellProductRepository = crossSellProductRepository;
     this._tierPriceRepository = tierPriceRepository;
     this._productPictureRepository = productPictureRepository;
     this._localizedPropertyRepository = localizedPropertyRepository;
     this._aclRepository = aclRepository;
     this._storeMappingRepository = storeMappingRepository;
     this._productSpecificationAttributeRepository = productSpecificationAttributeRepository;
     this._productReviewRepository = productReviewRepository;
     this._productWarehouseInventoryRepository = productWarehouseInventoryRepository;
     this._productAttributeService = productAttributeService;
     this._productAttributeParser = productAttributeParser;
     this._languageService = languageService;
     this._workflowMessageService = workflowMessageService;
     this._dataProvider = dataProvider;
     this._dbContext = dbContext;
     this._workContext = workContext;
     this._storeContext = storeContext;
     this._localizationSettings = localizationSettings;
     this._commonSettings = commonSettings;
     this._catalogSettings = catalogSettings;
     this._eventPublisher = eventPublisher;
     this._aclService = aclService;
     this._storeMappingService = storeMappingService;
 }
 public ProductAttributeController(IProductAttributeService productAttributeService,
     ILanguageService languageService, ILocalizedEntityService localizedEntityService,
     ILocalizationService localizationService, ICustomerActivityService customerActivityService,
     IPermissionService permissionService)
 {
     this._productAttributeService = productAttributeService;
     this._languageService = languageService;
     this._localizedEntityService = localizedEntityService;
     this._localizationService = localizationService;
     this._customerActivityService = customerActivityService;
     this._permissionService = permissionService;
 }
Example #46
0
 public ExportManager(ICategoryService categoryService,
     IManufacturerService manufacturerService,
     IProductAttributeService productAttributeService,
     IPictureService pictureService,
     INewsLetterSubscriptionService newsLetterSubscriptionService)
 {
     this._categoryService = categoryService;
     this._manufacturerService = manufacturerService;
     this._productAttributeService = productAttributeService;
     this._pictureService = pictureService;
     this._newsLetterSubscriptionService = newsLetterSubscriptionService;
 }
 public ProductAttributeFormatter(IWorkContext workContext,
     IProductAttributeService productAttributeService,
     IProductAttributeParser productAttributeParser,
     ICurrencyService currencyService,
     ILocalizationService localizationService,
     ITaxService taxService,
     IPriceFormatter priceFormatter)
 {
     this._workContext = workContext;
     this._productAttributeService = productAttributeService;
     this._productAttributeParser = productAttributeParser;
     this._currencyService = currencyService;
     this._localizationService = localizationService;
     this._taxService = taxService;
     this._priceFormatter = priceFormatter;
 }
 public PromoPlugin(
     IProductService productService,
     ICategoryService categoryService,
     IManufacturerService manufacturerService,
     IPictureService pictureService,
     ICurrencyService currencyService,
     ISettingService settingService,
     IWorkContext workContext,
     IMeasureService measureService,
     MeasureSettings measureSettings,
     PromoSettings promosFeedSettings,
     CurrencySettings currencySettings,
     IProductAttributeService productAttributeService,
     IPriceCalculationService priceCalculationService,
     ITaxService taxService,
     ILogger logger,
     IPromoService promosFeedService,
     IScheduleTaskService scheduleTaskService,
     NopPromoContext nopPromoContext,
     IProductAttributeConfigService productAttributeConfigService,
     WidgetSettings widgetSettings,
     IPluginFinder pluginFinder,
     ILocalizationService localizationService)
 {
     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._promoSettings = promosFeedSettings;
     this._currencySettings = currencySettings;
     this._productAttributeService = productAttributeService;
     this._priceCalculationService = priceCalculationService;
     this._taxService = taxService;
     this._logger = logger;
     this._promosFeedService = promosFeedService;
     this._scheduleTaskService = scheduleTaskService;
     this._nopPromoContext = nopPromoContext;
     this._productAttributeConfigService = productAttributeConfigService;
     this._widgetSettings = widgetSettings;
     this._pluginFinder = pluginFinder;
     this._localizationService = localizationService;
 }
        /// <summary>
        /// Ctor
        /// </summary>
        /// <param name="sciRepository">Shopping cart repository</param>
        /// <param name="workContext">Work context</param>
        /// <param name="storeContext">Store context</param>
        /// <param name="currencyService">Currency service</param>
        /// <param name="productService">Product settings</param>
        /// <param name="localizationService">Localization service</param>
        /// <param name="productAttributeParser">Product attribute parser</param>
        /// <param name="checkoutAttributeService">Checkout attribute service</param>
        /// <param name="checkoutAttributeParser">Checkout attribute parser</param>
        /// <param name="priceFormatter">Price formatter</param>
        /// <param name="customerService">Customer service</param>
        /// <param name="shoppingCartSettings">Shopping cart settings</param>
        /// <param name="eventPublisher">Event publisher</param>
        /// <param name="permissionService">Permission service</param>
        /// <param name="aclService">ACL service</param>
        /// <param name="storeMappingService">Store mapping service</param>
        /// <param name="genericAttributeService">Generic attribute service</param>
        public ShoppingCartService(
			IRepository<ShoppingCartItem> sciRepository,
			IWorkContext workContext, 
			IStoreContext storeContext, 
			ICurrencyService currencyService,
            IProductService productService, ILocalizationService localizationService,
            IProductAttributeParser productAttributeParser,
			IProductAttributeService productAttributeService,
            ICheckoutAttributeService checkoutAttributeService,
            ICheckoutAttributeParser checkoutAttributeParser,
            IPriceFormatter priceFormatter,
            ICustomerService customerService,
            ShoppingCartSettings shoppingCartSettings,
            IEventPublisher eventPublisher,
            IPermissionService permissionService, 
            IAclService aclService,
			IStoreMappingService storeMappingService,
			IGenericAttributeService genericAttributeService,
			IDownloadService downloadService,
			CatalogSettings catalogSettings)
        {
            this._sciRepository = sciRepository;
            this._workContext = workContext;
            this._storeContext = storeContext;
            this._currencyService = currencyService;
            this._productService = productService;
            this._localizationService = localizationService;
            this._productAttributeParser = productAttributeParser;
            this._productAttributeService = productAttributeService;
            this._checkoutAttributeService = checkoutAttributeService;
            this._checkoutAttributeParser = checkoutAttributeParser;
            this._priceFormatter = priceFormatter;
            this._customerService = customerService;
            this._shoppingCartSettings = shoppingCartSettings;
            this._eventPublisher = eventPublisher;
            this._permissionService = permissionService;
            this._aclService = aclService;
            this._storeMappingService = storeMappingService;
            this._genericAttributeService = genericAttributeService;
            this._downloadService = downloadService;
            this._catalogSettings = catalogSettings;
        }
Example #50
0
 public ImportManager(IProductService productService, 
     ICategoryService categoryService,
     IManufacturerService manufacturerService,
     IPictureService pictureService,
     IUrlRecordService urlRecordService,
     IStoreContext storeContext,
     INewsLetterSubscriptionService newsLetterSubscriptionService,
     ICountryService countryService,
     IStateProvinceService stateProvinceService, IProductAttributeService productAttributeService)
 {
     this._productService = productService;
     this._categoryService = categoryService;
     this._manufacturerService = manufacturerService;
     this._pictureService = pictureService;
     this._urlRecordService = urlRecordService;
     this._storeContext = storeContext;
     this._newsLetterSubscriptionService = newsLetterSubscriptionService;
     this._countryService = countryService;
     this._stateProvinceService = stateProvinceService;
     this._productAttributeService = productAttributeService;
 }
Example #51
0
 public ImportManager(IProductService productService,
     ICategoryService categoryService,
     IManufacturerService manufacturerService,
     IPictureService pictureService,
     IUrlRecordService urlRecordService,
     IStoreContext storeContext,
     INewsLetterSubscriptionService newsLetterSubscriptionService,
     ICountryService countryService,
     IStateProvinceService stateProvinceService,
     IEncryptionService encryptionService,
     IDataProvider dataProvider,
     MediaSettings mediaSettings,
     IVendorService vendorService,
     IProductTemplateService productTemplateService,
     IShippingService shippingService,
     ITaxCategoryService taxCategoryService,
     IMeasureService measureService,
     IProductAttributeService productAttributeService,
     CatalogSettings catalogSettings)
 {
     this._productService = productService;
     this._categoryService = categoryService;
     this._manufacturerService = manufacturerService;
     this._pictureService = pictureService;
     this._urlRecordService = urlRecordService;
     this._storeContext = storeContext;
     this._newsLetterSubscriptionService = newsLetterSubscriptionService;
     this._countryService = countryService;
     this._stateProvinceService = stateProvinceService;
     this._encryptionService = encryptionService;
     this._dataProvider = dataProvider;
     this._mediaSettings = mediaSettings;
     this._vendorService = vendorService;
     this._productTemplateService = productTemplateService;
     this._shippingService = shippingService;
     this._taxCategoryService = taxCategoryService;
     this._measureService = measureService;
     this._productAttributeService = productAttributeService;
     this._catalogSettings = catalogSettings;
 }
 public ProductAttributeFormatter(IWorkContext workContext,
     IProductAttributeService productAttributeService,
     IProductAttributeParser productAttributeParser,
     ICurrencyService currencyService,
     ILocalizationService localizationService,
     ITaxService taxService,
     IPriceFormatter priceFormatter,
     IDownloadService downloadService,
     IWebHelper webHelper,
     IPriceCalculationService priceCalculationService)
 {
     this._workContext = workContext;
     this._productAttributeService = productAttributeService;
     this._productAttributeParser = productAttributeParser;
     this._currencyService = currencyService;
     this._localizationService = localizationService;
     this._taxService = taxService;
     this._priceFormatter = priceFormatter;
     this._downloadService = downloadService;
     this._webHelper = webHelper;
     this._priceCalculationService = priceCalculationService;
 }
 public PromoUtilities(
     PromoSettings promoSettings,
     IProductService productService,
     IPictureService pictureService,
     ILogger logger,
     IProductAttributeService productAttributeService,
     IWorkContext workContext,
     IGenericAttributeService genericAttributeService,
     IStoreContext storeContext,
     IShoppingCartService shoppingCartService,
     IProductMappingService productMappingService)
 {
     this._promoSettings = promoSettings;
     this._productService = productService;
     this._pictureService = pictureService;
     this._logger = logger;
     this._productAttributeService = productAttributeService;
     this._workContext = workContext;
     this._genericAttributeService = genericAttributeService;
     this._storeContext = storeContext;
     this._shoppingCartService = shoppingCartService;
     this._productMappingService = productMappingService;
 }
Example #54
0
        public new void SetUp()
        {
            _storeService = MockRepository.GenerateMock<IStoreService>();
            _categoryService = MockRepository.GenerateMock<ICategoryService>();
            _manufacturerService = MockRepository.GenerateMock<IManufacturerService>();
            _productAttributeService = MockRepository.GenerateMock<IProductAttributeService>();
            _pictureService = MockRepository.GenerateMock<IPictureService>();
            _newsLetterSubscriptionService = MockRepository.GenerateMock<INewsLetterSubscriptionService>();
            _productEditorSettings = new ProductEditorSettings();
            _workContext = MockRepository.GenerateMock<IWorkContext>();
            _vendorService = MockRepository.GenerateMock<IVendorService>();
            _productTemplateService = MockRepository.GenerateMock<IProductTemplateService>();
            _shippingService = MockRepository.GenerateMock<IShippingService>();
            _taxCategoryService = MockRepository.GenerateMock<ITaxCategoryService>();
            _measureService = MockRepository.GenerateMock<IMeasureService>();
            _catalogSettings=new CatalogSettings();

            _exportManager = new ExportManager(_categoryService,
                _manufacturerService, _productAttributeService, 
                _pictureService, _newsLetterSubscriptionService,
                _storeService, _workContext, _productEditorSettings, 
                _vendorService, _productTemplateService, _shippingService,
                _taxCategoryService, _measureService, _catalogSettings);
        }
        public OrderController(IOrderService orderService, 
            IOrderReportService orderReportService, IOrderProcessingService orderProcessingService,
            IDateTimeHelper dateTimeHelper, IPriceFormatter priceFormatter, ILocalizationService localizationService,
            IWorkContext workContext, ICurrencyService currencyService,
            IEncryptionService encryptionService, IPaymentService paymentService,
            IMeasureService measureService, IPdfService pdfService,
            IAddressService addressService, ICountryService countryService,
            IStateProvinceService stateProvinceService, IProductService productService,
            IExportManager exportManager, IPermissionService permissionService,
            IWorkflowMessageService workflowMessageService,
            ICategoryService categoryService, IManufacturerService manufacturerService,
            IProductAttributeService productAttributeService, IProductAttributeParser productAttributeParser,
            IProductAttributeFormatter productAttributeFormatter, IShoppingCartService shoppingCartService,
            IGiftCardService giftCardService, IDownloadService downloadService,
            IShipmentService shipmentService,
            CatalogSettings catalogSettings, CurrencySettings currencySettings, TaxSettings taxSettings,
            MeasureSettings measureSettings, PdfSettings pdfSettings, AddressSettings addressSettings)
        {
            this._orderService = orderService;
            this._orderReportService = orderReportService;
            this._orderProcessingService = orderProcessingService;
            this._dateTimeHelper = dateTimeHelper;
            this._priceFormatter = priceFormatter;
            this._localizationService = localizationService;
            this._workContext = workContext;
            this._currencyService = currencyService;
            this._encryptionService = encryptionService;
            this._paymentService = paymentService;
            this._measureService = measureService;
            this._pdfService = pdfService;
            this._addressService = addressService;
            this._countryService = countryService;
            this._stateProvinceService = stateProvinceService;
            this._productService = productService;
            this._exportManager = exportManager;
            this._permissionService = permissionService;
            this._workflowMessageService = workflowMessageService;
            this._categoryService = categoryService;
            this._manufacturerService = manufacturerService;
            this._productAttributeService = productAttributeService;
            this._productAttributeParser = productAttributeParser;
            this._productAttributeFormatter = productAttributeFormatter;
            this._shoppingCartService = shoppingCartService;
            this._giftCardService = giftCardService;
            this._downloadService = downloadService;
            this._shipmentService = shipmentService;

            this._catalogSettings = catalogSettings;
            this._currencySettings = currencySettings;
            this._taxSettings = taxSettings;
            this._measureSettings = measureSettings;
            this._pdfSettings = pdfSettings;
            this._addressSettings = addressSettings;
        }
        public new void SetUp()
        {
            #region Test data

            //color (dropdownlist)
            pa1 = new ProductAttribute
            {
                Id = 1,
                Name = "Color",
            };
            pva1_1 = new ProductVariantAttribute
            {
                Id = 11,
                ProductVariantId = 1,
                TextPrompt = "Select color:",
                IsRequired = true,
                AttributeControlType = AttributeControlType.DropdownList,
                DisplayOrder = 1,
                ProductAttribute = pa1,
                ProductAttributeId = pa1.Id
            };
            pvav1_1 = new ProductVariantAttributeValue
            {
                Id = 11,
                Name = "Green",
                DisplayOrder = 1,
                ProductVariantAttribute = pva1_1,
                ProductVariantAttributeId = pva1_1.Id
            };
            pvav1_2 = new ProductVariantAttributeValue
            {
                Id = 12,
                Name = "Red",
                DisplayOrder = 2,
                ProductVariantAttribute = pva1_1,
                ProductVariantAttributeId = pva1_1.Id
            };
            pva1_1.ProductVariantAttributeValues.Add(pvav1_1);
            pva1_1.ProductVariantAttributeValues.Add(pvav1_2);

            //custom option (checkboxes)
            pa2 = new ProductAttribute
            {
                Id = 2,
                Name = "Some custom option",
            };
            pva2_1 = new ProductVariantAttribute
            {
                Id = 21,
                ProductVariantId = 1,
                TextPrompt = "Select at least one option:",
                IsRequired = true,
                AttributeControlType = AttributeControlType.Checkboxes,
                DisplayOrder = 2,
                ProductAttribute = pa2,
                ProductAttributeId = pa2.Id
            };
            pvav2_1 = new ProductVariantAttributeValue
            {
                Id = 21,
                Name = "Option 1",
                DisplayOrder = 1,
                ProductVariantAttribute = pva2_1,
                ProductVariantAttributeId = pva2_1.Id
            };
            pvav2_2 = new ProductVariantAttributeValue
            {
                Id = 22,
                Name = "Option 2",
                DisplayOrder = 2,
                ProductVariantAttribute = pva2_1,
                ProductVariantAttributeId = pva2_1.Id
            };
            pva2_1.ProductVariantAttributeValues.Add(pvav2_1);
            pva2_1.ProductVariantAttributeValues.Add(pvav2_2);

            //custom text
            pa3 = new ProductAttribute
            {
                Id = 3,
                Name = "Custom text",
            };
            pva3_1 = new ProductVariantAttribute
            {
                Id = 31,
                ProductVariantId = 1,
                TextPrompt = "Enter custom text:",
                IsRequired = true,
                AttributeControlType = AttributeControlType.TextBox,
                DisplayOrder = 1,
                ProductAttribute = pa1,
                ProductAttributeId = pa3.Id
            };

            #endregion

            _productAttributeRepo = MockRepository.GenerateMock<IRepository<ProductAttribute>>();
            _productAttributeRepo.Expect(x => x.Table).Return(new List<ProductAttribute>() { pa1, pa2, pa3 }.AsQueryable());
            _productAttributeRepo.Expect(x => x.GetById(pa1.Id)).Return(pa1);
            _productAttributeRepo.Expect(x => x.GetById(pa2.Id)).Return(pa2);
            _productAttributeRepo.Expect(x => x.GetById(pa3.Id)).Return(pa3);

            _productVariantAttributeRepo = MockRepository.GenerateMock<IRepository<ProductVariantAttribute>>();
            _productVariantAttributeRepo.Expect(x => x.Table).Return(new List<ProductVariantAttribute>() { pva1_1, pva2_1, pva3_1 }.AsQueryable());
            _productVariantAttributeRepo.Expect(x => x.GetById(pva1_1.Id)).Return(pva1_1);
            _productVariantAttributeRepo.Expect(x => x.GetById(pva2_1.Id)).Return(pva2_1);
            _productVariantAttributeRepo.Expect(x => x.GetById(pva3_1.Id)).Return(pva3_1);

            _productVariantAttributeCombinationRepo = MockRepository.GenerateMock<IRepository<ProductVariantAttributeCombination>>();
            _productVariantAttributeCombinationRepo.Expect(x => x.Table).Return(new List<ProductVariantAttributeCombination>().AsQueryable());

            _productVariantAttributeValueRepo = MockRepository.GenerateMock<IRepository<ProductVariantAttributeValue>>();
            _productVariantAttributeValueRepo.Expect(x => x.Table).Return(new List<ProductVariantAttributeValue>() { pvav1_1, pvav1_2, pvav2_1, pvav2_2 }.AsQueryable());
            _productVariantAttributeValueRepo.Expect(x => x.GetById(pvav1_1.Id)).Return(pvav1_1);
            _productVariantAttributeValueRepo.Expect(x => x.GetById(pvav1_2.Id)).Return(pvav1_2);
            _productVariantAttributeValueRepo.Expect(x => x.GetById(pvav2_1.Id)).Return(pvav2_1);
            _productVariantAttributeValueRepo.Expect(x => x.GetById(pvav2_2.Id)).Return(pvav2_2);

            _eventPublisher = MockRepository.GenerateMock<IEventPublisher>();
            _eventPublisher.Expect(x => x.Publish(Arg<object>.Is.Anything));

            var cacheManager = new NasNullCache();

            _productAttributeService = new ProductAttributeService(cacheManager,
                _productAttributeRepo,
                _productVariantAttributeRepo,
                _productVariantAttributeCombinationRepo,
                _productVariantAttributeValueRepo,
                _eventPublisher);

            _productAttributeParser = new ProductAttributeParser(_productAttributeService);

            var workingLanguage = new Language();
            _workContext = MockRepository.GenerateMock<IWorkContext>();
            _workContext.Expect(x => x.WorkingLanguage).Return(workingLanguage);
            _currencyService = MockRepository.GenerateMock<ICurrencyService>();
            _localizationService = MockRepository.GenerateMock<ILocalizationService>();
            _localizationService.Expect(x => x.GetResource("GiftCardAttribute.For.Virtual")).Return("For: {0} <{1}>");
            _localizationService.Expect(x => x.GetResource("GiftCardAttribute.From.Virtual")).Return("From: {0} <{1}>");
            _localizationService.Expect(x => x.GetResource("GiftCardAttribute.For.Physical")).Return("For: {0}");
            _localizationService.Expect(x => x.GetResource("GiftCardAttribute.From.Physical")).Return("From: {0}");
            _taxService = MockRepository.GenerateMock<ITaxService>();
            _priceFormatter = MockRepository.GenerateMock<IPriceFormatter>();
            _downloadService = MockRepository.GenerateMock<IDownloadService>();
            _webHelper = MockRepository.GenerateMock<IWebHelper>();

            _productAttributeFormatter = new ProductAttributeFormatter(_workContext,
                _productAttributeService,
                _productAttributeParser,
                _currencyService,
                _localizationService,
                _taxService,
                _priceFormatter,
                _downloadService,
                _webHelper);
        }
        public ShoppingCartController(IProductService productService, 
            IStoreContext storeContext,
            IWorkContext workContext,
            IShoppingCartService shoppingCartService,
            IPictureService pictureService,
            ILocalizationService localizationService,
            IProductAttributeService productAttributeService,
            IProductAttributeFormatter productAttributeFormatter,
            IProductAttributeParser productAttributeParser,
            ITaxService taxService, ICurrencyService currencyService,
            IPriceCalculationService priceCalculationService,
            IPriceFormatter priceFormatter,
            ICheckoutAttributeParser checkoutAttributeParser,
            ICheckoutAttributeFormatter checkoutAttributeFormatter,
            IOrderProcessingService orderProcessingService,
            IDiscountService discountService,
            ICustomerService customerService,
            IGiftCardService giftCardService,
            ICountryService countryService,
            IStateProvinceService stateProvinceService,
            IShippingService shippingService,
            IOrderTotalCalculationService orderTotalCalculationService,
            ICheckoutAttributeService checkoutAttributeService,
            IPaymentService paymentService,
            IWorkflowMessageService workflowMessageService,
            IPermissionService permissionService,
            IDownloadService downloadService,
            ICacheManager cacheManager,
            IWebHelper webHelper,
            ICustomerActivityService customerActivityService,
            IGenericAttributeService genericAttributeService,
            MediaSettings mediaSettings,
            ShoppingCartSettings shoppingCartSettings,
            CatalogSettings catalogSettings,
            OrderSettings orderSettings,
            ShippingSettings shippingSettings,
            TaxSettings taxSettings,
            CaptchaSettings captchaSettings,
            AddressSettings addressSettings)
        {
            this._productService = productService;
            this._workContext = workContext;
            this._storeContext = storeContext;
            this._shoppingCartService = shoppingCartService;
            this._pictureService = pictureService;
            this._localizationService = localizationService;
            this._productAttributeService = productAttributeService;
            this._productAttributeFormatter = productAttributeFormatter;
            this._productAttributeParser = productAttributeParser;
            this._taxService = taxService;
            this._currencyService = currencyService;
            this._priceCalculationService = priceCalculationService;
            this._priceFormatter = priceFormatter;
            this._checkoutAttributeParser = checkoutAttributeParser;
            this._checkoutAttributeFormatter = checkoutAttributeFormatter;
            this._orderProcessingService = orderProcessingService;
            this._discountService = discountService;
            this._customerService = customerService;
            this._giftCardService = giftCardService;
            this._countryService = countryService;
            this._stateProvinceService = stateProvinceService;
            this._shippingService = shippingService;
            this._orderTotalCalculationService = orderTotalCalculationService;
            this._checkoutAttributeService = checkoutAttributeService;
            this._paymentService = paymentService;
            this._workflowMessageService = workflowMessageService;
            this._permissionService = permissionService;
            this._downloadService = downloadService;
            this._cacheManager = cacheManager;
            this._webHelper = webHelper;
            this._customerActivityService = customerActivityService;
            this._genericAttributeService = genericAttributeService;

            this._mediaSettings = mediaSettings;
            this._shoppingCartSettings = shoppingCartSettings;
            this._catalogSettings = catalogSettings;
            this._orderSettings = orderSettings;
            this._shippingSettings = shippingSettings;
            this._taxSettings = taxSettings;
            this._captchaSettings = captchaSettings;
            this._addressSettings = addressSettings;
        }
        public InvoicesController(IOrderService orderService,
            IOrderReportService orderReportService,
            IOrderProcessingService orderProcessingService,
            IPriceCalculationService priceCalculationService,
            IDateTimeHelper dateTimeHelper,
            IPriceFormatter priceFormatter,
            IDiscountService discountService,
            ILocalizationService localizationService,
            IWorkContext workContext,
            ICurrencyService currencyService,
            IEncryptionService encryptionService,
            IPaymentService paymentService,
            IMeasureService measureService,
            IPdfService pdfService,
            IAddressService addressService,
            ICountryService countryService,
            IStateProvinceService stateProvinceService,
            Nop.Services.Catalog.IProductService productService,
            IExportManager exportManager,
            IPermissionService permissionService,
            IWorkflowMessageService workflowMessageService,
            ICategoryService categoryService,
            IManufacturerService manufacturerService,
            IProductAttributeService productAttributeService,
            IProductAttributeParser productAttributeParser,
            IProductAttributeFormatter productAttributeFormatter,
            IShoppingCartService shoppingCartService,
            IGiftCardService giftCardService,
            IDownloadService downloadService,
            IShipmentService shipmentService,
            IShippingService shippingService,
            IStoreService storeService,
            IVendorService vendorService,
            IAddressAttributeParser addressAttributeParser,
            IAddressAttributeService addressAttributeService,
            IAddressAttributeFormatter addressAttributeFormatter,
            IAffiliateService affiliateService,
            IPictureService pictureService,
            CurrencySettings currencySettings,
            TaxSettings taxSettings,
            MeasureSettings measureSettings,
            AddressSettings addressSettings,
            ShippingSettings shippingSettings,
            IInvoiceService invoiceService,
            IGenericAttributeService genericAttributeService,
            IProductTemplateService productTemplateService,
            IStoreContext storeContext,
            ISettingService settingService,
            IGroupDealService groupDealService)
        {
            this._orderService = orderService;
            this._orderReportService = orderReportService;
            this._orderProcessingService = orderProcessingService;
            this._priceCalculationService = priceCalculationService;
            this._dateTimeHelper = dateTimeHelper;
            this._priceFormatter = priceFormatter;
            this._discountService = discountService;
            this._localizationService = localizationService;
            this._workContext = workContext;
            this._currencyService = currencyService;
            this._encryptionService = encryptionService;
            this._paymentService = paymentService;
            this._measureService = measureService;
            this._pdfService = pdfService;
            this._addressService = addressService;
            this._countryService = countryService;
            this._stateProvinceService = stateProvinceService;
            this._productService = productService;
            this._exportManager = exportManager;
            this._permissionService = permissionService;
            this._workflowMessageService = workflowMessageService;
            this._categoryService = categoryService;
            this._manufacturerService = manufacturerService;
            this._productAttributeService = productAttributeService;
            this._productAttributeParser = productAttributeParser;
            this._productAttributeFormatter = productAttributeFormatter;
            this._shoppingCartService = shoppingCartService;
            this._giftCardService = giftCardService;
            this._downloadService = downloadService;
            this._shipmentService = shipmentService;
            this._shippingService = shippingService;
            this._storeService = storeService;
            this._vendorService = vendorService;
            this._addressAttributeParser = addressAttributeParser;
            this._addressAttributeService = addressAttributeService;
            this._addressAttributeFormatter = addressAttributeFormatter;
            this._affiliateService = affiliateService;
            this._pictureService = pictureService;

            this._currencySettings = currencySettings;
            this._taxSettings = taxSettings;
            this._measureSettings = measureSettings;
            this._addressSettings = addressSettings;
            this._shippingSettings = shippingSettings;
            this._invoiceService = invoiceService;
            this._genericAttributeService = genericAttributeService;
            this._productTemplateService = productTemplateService;
            this._storeContext = storeContext;
            this._settingService = settingService;
            this._groupDealService = groupDealService;
        }
 public ProductController(IProductService productService, 
     IProductTemplateService productTemplateService,
     ICategoryService categoryService, 
     IManufacturerService manufacturerService,
     ICustomerService customerService,
     IUrlRecordService urlRecordService, 
     IWorkContext workContext, 
     ILanguageService languageService, 
     ILocalizationService localizationService, 
     ILocalizedEntityService localizedEntityService,
     ISpecificationAttributeService specificationAttributeService, 
     IPictureService pictureService,
     ITaxCategoryService taxCategoryService, 
     IProductTagService productTagService,
     ICopyProductService copyProductService, 
     IPdfService pdfService,
     IExportManager exportManager, 
     IImportManager importManager,
     ICustomerActivityService customerActivityService,
     IPermissionService permissionService, 
     IAclService aclService,
     IStoreService storeService,
     IOrderService orderService,
     IStoreMappingService storeMappingService,
      IVendorService vendorService,
     IShippingService shippingService,
     IShipmentService shipmentService,
     ICurrencyService currencyService, 
     CurrencySettings currencySettings,
     IMeasureService measureService,
     MeasureSettings measureSettings,
     AdminAreaSettings adminAreaSettings,
     IDateTimeHelper dateTimeHelper,
     IDiscountService discountService,
     IProductAttributeService productAttributeService,
     IBackInStockSubscriptionService backInStockSubscriptionService,
     IShoppingCartService shoppingCartService,
     IProductAttributeFormatter productAttributeFormatter,
     IProductAttributeParser productAttributeParser,
     IDownloadService downloadService)
 {
     this._productService = productService;
     this._productTemplateService = productTemplateService;
     this._categoryService = categoryService;
     this._manufacturerService = manufacturerService;
     this._customerService = customerService;
     this._urlRecordService = urlRecordService;
     this._workContext = workContext;
     this._languageService = languageService;
     this._localizationService = localizationService;
     this._localizedEntityService = localizedEntityService;
     this._specificationAttributeService = specificationAttributeService;
     this._pictureService = pictureService;
     this._taxCategoryService = taxCategoryService;
     this._productTagService = productTagService;
     this._copyProductService = copyProductService;
     this._pdfService = pdfService;
     this._exportManager = exportManager;
     this._importManager = importManager;
     this._customerActivityService = customerActivityService;
     this._permissionService = permissionService;
     this._aclService = aclService;
     this._storeService = storeService;
     this._orderService = orderService;
     this._storeMappingService = storeMappingService;
     this._vendorService = vendorService;
     this._shippingService = shippingService;
     this._shipmentService = shipmentService;
     this._currencyService = currencyService;
     this._currencySettings = currencySettings;
     this._measureService = measureService;
     this._measureSettings = measureSettings;
     this._adminAreaSettings = adminAreaSettings;
     this._dateTimeHelper = dateTimeHelper;
     this._discountService = discountService;
     this._productAttributeService = productAttributeService;
     this._backInStockSubscriptionService = backInStockSubscriptionService;
     this._shoppingCartService = shoppingCartService;
     this._productAttributeFormatter = productAttributeFormatter;
     this._productAttributeParser = productAttributeParser;
     this._downloadService = downloadService;
 }
 public ProductAttributeParser(IProductAttributeService productAttributeService)
 {
     this._productAttributeService = productAttributeService;
 }