public DiscountRulesStoreController(ILocalizationService localizationService, IDiscountService discountService, IStoreService storeService) { this._localizationService = localizationService; this._discountService = discountService; this._storeService = storeService; }
public DiscountRulesCustomerRolesController(IDiscountService discountService, ICustomerService customerService, ILocalizationService localize) { this._discountService = discountService; this._customerService = customerService; this._localize = localize; }
/// <summary> /// Ctor /// </summary> /// <param name="workContext">Work context</param> /// <param name="storeContext">Store context</param> /// <param name="priceCalculationService">Price calculation service</param> /// <param name="taxService">Tax service</param> /// <param name="shippingService">Shipping service</param> /// <param name="paymentService">Payment service</param> /// <param name="checkoutAttributeParser">Checkout attribute parser</param> /// <param name="discountService">Discount service</param> /// <param name="giftCardService">Gift card service</param> /// <param name="genericAttributeService">Generic attribute service</param> /// <param name="taxSettings">Tax settings</param> /// <param name="rewardPointsSettings">Reward points settings</param> /// <param name="shippingSettings">Shipping settings</param> /// <param name="shoppingCartSettings">Shopping cart settings</param> /// <param name="catalogSettings">Catalog settings</param> public OrderTotalCalculationService(IWorkContext workContext, IStoreContext storeContext, IPriceCalculationService priceCalculationService, ITaxService taxService, IShippingService shippingService, IPaymentService paymentService, ICheckoutAttributeParser checkoutAttributeParser, IDiscountService discountService, IGiftCardService giftCardService, IGenericAttributeService genericAttributeService, TaxSettings taxSettings, RewardPointsSettings rewardPointsSettings, ShippingSettings shippingSettings, ShoppingCartSettings shoppingCartSettings, CatalogSettings catalogSettings) { this._workContext = workContext; this._storeContext = storeContext; this._priceCalculationService = priceCalculationService; this._taxService = taxService; this._shippingService = shippingService; this._paymentService = paymentService; this._checkoutAttributeParser = checkoutAttributeParser; this._discountService = discountService; this._giftCardService = giftCardService; this._genericAttributeService = genericAttributeService; this._taxSettings = taxSettings; this._rewardPointsSettings = rewardPointsSettings; this._shippingSettings = shippingSettings; this._shoppingCartSettings = shoppingCartSettings; this._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 PriceCalculationService(IWorkContext workContext, IStoreContext storeContext, IDiscountService discountService, ICategoryService categoryService, IProductAttributeParser productAttributeParser, IProductService productService, ICacheManager cacheManager, ShoppingCartSettings shoppingCartSettings, CatalogSettings catalogSettings, IPriceForSizeService priceForSizeService) : base( workContext, storeContext, discountService, categoryService, productAttributeParser, productService, cacheManager, shoppingCartSettings, catalogSettings ) { _productAttributeParser = productAttributeParser; _productService = productService; _priceForSizeService = priceForSizeService; }
public new void SetUp() { _workContext = null; _store = new Store() { Id = 1 }; _storeContext = MockRepository.GenerateMock<IStoreContext>(); _storeContext.Expect(x => x.CurrentStore).Return(_store); _discountService = MockRepository.GenerateMock<IDiscountService>(); _categoryService = MockRepository.GenerateMock<ICategoryService>(); _productService = MockRepository.GenerateMock<IProductService>(); _productAttributeParser = MockRepository.GenerateMock<IProductAttributeParser>(); _shoppingCartSettings = new ShoppingCartSettings(); _catalogSettings = new CatalogSettings(); _cacheManager = new NopNullCache(); _priceCalcService = new PriceCalculationService(_workContext, _storeContext, _discountService, _categoryService, _productAttributeParser, _productService, _cacheManager, _shoppingCartSettings, _catalogSettings); }
public DiscountRulesHasAllProductsController(IDiscountService discountService, ISettingService settingService, IPermissionService permissionService) { this._discountService = discountService; this._settingService = settingService; this._permissionService = permissionService; }
public DiscountRulesCustomerRolesController(IDiscountService discountService, ICustomerService customerService, ISettingService settingService) { this._discountService = discountService; this._customerService = customerService; this._settingService = settingService; }
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 CrowdController(ICrowdService crowdService,IPartImageService partImageService, IDiscountService discountService,IParticipationService participationService) { _discountService = discountService; _crowdService = crowdService; _partImageService = partImageService; _participationService = participationService; }
public CategoryController(ICategoryService categoryService, ICategoryTemplateService categoryTemplateService, IManufacturerService manufacturerService, IProductService productService, ICustomerService customerService, IUrlRecordService urlRecordService, IPictureService pictureService, ILanguageService languageService, ILocalizationService localizationService, ILocalizedEntityService localizedEntityService, IDiscountService discountService, IPermissionService permissionService, IAclService aclService, IStoreService storeService, IStoreMappingService storeMappingService, IExportManager exportManager, IVendorService vendorService, ICustomerActivityService customerActivityService, AdminAreaSettings adminAreaSettings, CatalogSettings catalogSettings) { this._categoryService = categoryService; this._categoryTemplateService = categoryTemplateService; this._manufacturerService = manufacturerService; this._productService = productService; this._customerService = customerService; this._urlRecordService = urlRecordService; this._pictureService = pictureService; this._languageService = languageService; this._localizationService = localizationService; this._localizedEntityService = localizedEntityService; this._discountService = discountService; this._permissionService = permissionService; this._vendorService = vendorService; this._aclService = aclService; this._storeService = storeService; this._storeMappingService = storeMappingService; this._exportManager = exportManager; this._customerActivityService = customerActivityService; this._adminAreaSettings = adminAreaSettings; this._catalogSettings = catalogSettings; }
//private readonly IStoreContext _storeContext; //private readonly IDiscountService _discountService; //private readonly ICategoryService _categoryService; //private readonly IProductAttributeParser _productAttributeParser; //private readonly IProductService _productService; //private readonly ICacheManager _cacheManager; //private readonly ShoppingCartSettings _shoppingCartSettings; //private readonly CatalogSettings _catalogSettings; #endregion #region constructor public PromosPriceCalculationService( IPromoUtilities promoUtilities, IWorkContext workContext, IStoreContext storeContext, IDiscountService discountService, ICategoryService categoryService, IManufacturerService manufacturerService, IProductAttributeParser productAttributeParser, IProductService productService, ICacheManager cacheManager, ShoppingCartSettings shoppingCartSettings, CatalogSettings catalogSettings, PromoSettings promoSettings, ICurrencyService currencyService, IPriceCalculationService priceCalculationService, ILocalizationService localizationService, ILogger logger) : base (workContext, storeContext, discountService, categoryService, manufacturerService, productAttributeParser, productService, cacheManager, shoppingCartSettings, catalogSettings) { this._promoUtilities = promoUtilities; this._promoSettings = promoSettings; this._workContext = workContext; this._currencyService = currencyService; this._priceCalculationService = priceCalculationService; this._localizationService = localizationService; this._logger = logger; }
public DiscountController(IDiscountService discountService, ILocalizationService localizationService, ICurrencyService currencyService, ICategoryService categoryService, IProductService productService, IWebHelper webHelper, IDateTimeHelper dateTimeHelper, ICustomerActivityService customerActivityService, CurrencySettings currencySettings, IPermissionService permissionService, IWorkContext workContext, IManufacturerService manufacturerService, IStoreService storeService, IVendorService vendorService, IOrderService orderService, IPriceFormatter priceFormatter) { this._discountService = discountService; this._localizationService = localizationService; this._currencyService = currencyService; this._categoryService = categoryService; this._productService = productService; this._webHelper = webHelper; this._dateTimeHelper = dateTimeHelper; this._customerActivityService = customerActivityService; this._currencySettings = currencySettings; this._permissionService = permissionService; this._workContext = workContext; this._manufacturerService = manufacturerService; this._storeService = storeService; this._vendorService = vendorService; this._orderService = orderService; this._priceFormatter = priceFormatter; }
public DiscountRulesShippingCountryController(ILocalizationService localizationService, IDiscountService discountService, ICountryService countryService) { this._localizationService = localizationService; this._discountService = discountService; this._countryService = countryService; }
public CategoryController(ICategoryService categoryService, ICategoryTemplateService categoryTemplateService, IManufacturerService manufacturerService, IProductService productService, IPictureService pictureService, ILanguageService languageService, ILocalizationService localizationService, ILocalizedEntityService localizedEntityService, IDiscountService discountService, IPermissionService permissionService, IExportManager exportManager, IWorkContext workContext, ICustomerActivityService customerActivityService, AdminAreaSettings adminAreaSettings, CatalogSettings catalogSettings) { this._categoryService = categoryService; this._categoryTemplateService = categoryTemplateService; this._manufacturerService = manufacturerService; this._productService = productService; this._pictureService = pictureService; this._languageService = languageService; this._localizationService = localizationService; this._localizedEntityService = localizedEntityService; this._discountService = discountService; this._permissionService = permissionService; this._exportManager = exportManager; this._workContext = workContext; this._customerActivityService = customerActivityService; this._adminAreaSettings = adminAreaSettings; this._catalogSettings = catalogSettings; }
public DiscountRulesFirstTimeUserController(IDiscountService discountService, ISettingService settingService, IPermissionService permissionService) { this._discountService = discountService; this._settingService = settingService; this._permissionService = permissionService; }
public DiscountRulesHadSpentAmountController(IDiscountService discountService, ISettingService settingService, IPermissionService permissionService) { this._discountService = discountService; this._settingService = settingService; this._permissionService = permissionService; }
public DiscountRulesBillingCountryController(ILocalizationService localizationService, IDiscountService discountService, ICountryService countryService, ISettingService settingService) { this._localizationService = localizationService; this._discountService = discountService; this._countryService = countryService; this._settingService = settingService; }
//private readonly ICartService _cartService; public ProductController(ICategoryService categoryService, IProductServices productServices, IMerchantService merchantService, IDiscountService discountService) { _categoryService = categoryService; _productServices = productServices; _merchantService = merchantService; _discountService = discountService; //_cartService = cartService; }
public CrowdApiController(ICrowdService crowdService, IPartImageService partImageService, IDiscountService discountService, IFollowerService followerService, IPhoneService phoneService, IParticipationService participationService) { _discountService = discountService; _crowdService = crowdService; _partImageService = partImageService; _followerService = followerService; _phoneService = phoneService; _participationService = participationService; }
public DiscountsViewModel(IDiscountService discountService, IEventAggregator eventAggregator) { DiscountService = discountService; EventAggregator = eventAggregator; EventAggregator = IoC.Get<IEventAggregator>(); DisplayName = "Discounts"; Discounts = new BindableCollection<Discount>(); }
public DiscountEditViewModel(IEventAggregator eventAggregator, IDiscountService discountService, IProductService productService, ICustomerService customerService) { EventAggregator = eventAggregator; DiscountService = discountService; ProductService = productService; CustomerService = customerService; DisplayName = "Edit Discount"; DiscountProducts = new BindableCollection<DiscountProductViewModel>(); DiscountCustomers = new BindableCollection<DiscountCustomerViewModel>(); }
public ShoppingCartController(IProductService productService, IWorkContext workContext, IShoppingCartService shoppingCartService, IPictureService pictureService, ILocalizationService localizationService, IProductAttributeFormatter productAttributeFormatter, 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, MediaSettings mediaSetting, ShoppingCartSettings shoppingCartSettings, CatalogSettings catalogSettings, OrderSettings orderSettings, ShippingSettings shippingSettings, TaxSettings taxSettings, CaptchaSettings captchaSettings) { this._productService = productService; this._workContext = workContext; this._shoppingCartService = shoppingCartService; this._pictureService = pictureService; this._localizationService = localizationService; this._productAttributeFormatter = productAttributeFormatter; 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._mediaSetting = mediaSetting; this._shoppingCartSettings = shoppingCartSettings; this._catalogSettings = catalogSettings; this._orderSettings = orderSettings; this._shippingSettings = shippingSettings; this._taxSettings = taxSettings; this._captchaSettings = captchaSettings; }
public SaleViewModel(ScreenCoordinator screenCoordinator, ICustomerService customerService, IProductService productService, IInvoiceService invoiceService, IDiscountService discountService) { ScreenCoordinator = screenCoordinator; CustomerService = customerService; ProductService = productService; InvoiceService = invoiceService; DiscountService = discountService; DisplayName = "PURCHASE"; Products = new BindableCollection<SaleItemViewModel>(); }
public CustomersImportService( ICustomerService customerService, ICurrencyService currencyService, IDiscountService discountService, ILanguageService languageService, ICountryService countryService, IGenericAttributeService genericAttributeService ) : base(discountService, currencyService, languageService, genericAttributeService, countryService) { this._customerService = customerService; }
public PriceCalculationService(IWorkContext workContext, IDiscountService discountService, ICategoryService categoryService, IProductAttributeParser productAttributeParser, ShoppingCartSettings shoppingCartSettings, CatalogSettings catalogSettings) { this._workContext = workContext; this._discountService = discountService; this._categoryService = categoryService; this._productAttributeParser = productAttributeParser; this._shoppingCartSettings = shoppingCartSettings; this._catalogSettings = catalogSettings; }
public new void SetUp() { _discountRepo = MockRepository.GenerateMock<IRepository<Discount>>(); var discount1 = new Discount { Id = 1, DiscountType = DiscountType.AssignedToCategories, Name = "Discount 1", UsePercentage = true, DiscountPercentage = 10, DiscountAmount = 0, DiscountLimitation = DiscountLimitationType.Unlimited, LimitationTimes = 0, }; var discount2 = new Discount { Id = 2, DiscountType = DiscountType.AssignedToSkus, Name = "Discount 2", UsePercentage = false, DiscountPercentage = 0, DiscountAmount = 5, RequiresCouponCode = true, CouponCode = "SecretCode", DiscountLimitation = DiscountLimitationType.NTimesPerCustomer, LimitationTimes = 3, }; _discountRepo.Expect(x => x.Table).Return(new List<Discount>() { discount1, discount2 }.AsQueryable()); _eventPublisher = MockRepository.GenerateMock<IEventPublisher>(); _eventPublisher.Expect(x => x.Publish(Arg<object>.Is.Anything)); _storeContext = MockRepository.GenerateMock<IStoreContext>(); _storeContext.Expect(x => x.CurrentStore).Return(new Store { Id = 1, Name = "MyStore" }); _settingService = MockRepository.GenerateMock<ISettingService>(); var cacheManager = new NullCache(); _discountRequirementRepo = MockRepository.GenerateMock<IRepository<DiscountRequirement>>(); _discountUsageHistoryRepo = MockRepository.GenerateMock<IRepository<DiscountUsageHistory>>(); var pluginFinder = new PluginFinder(); _genericAttributeService = MockRepository.GenerateMock<IGenericAttributeService>(); _discountService = new DiscountService(cacheManager, _discountRepo, _discountRequirementRepo, _discountUsageHistoryRepo, _storeContext, _genericAttributeService, pluginFinder, _eventPublisher, _settingService, base.ProviderManager); }
public ReceiptViewModel(ScreenCoordinator screenCoordinator, ImageService imageService, ICustomerService customerService, IProductService productService, IInvoiceService invoiceService, IDiscountService discountService, IEventAggregator eventAggregator) { ScreenCoordinator = screenCoordinator; ImageService = imageService; CustomerService = customerService; ProductService = productService; InvoiceService = invoiceService; DiscountService = discountService; EventAggregator = eventAggregator; DisplayName = "RECEIPT"; Products = new BindableCollection<SaleItemViewModel>(); }
public ProductsImportService( IProductService productService, ICategoryService categoryService, IDiscountService discountService, ICurrencyService currencyService, ILanguageService languageService, ICountryService countryService, IGenericAttributeService genericAttributeService ) : base(discountService, currencyService, languageService, genericAttributeService, countryService) { this._productService = productService; this._categoryService = categoryService; }
public ImportService( IDiscountService discountService, ICurrencyService currencyService, ILanguageService languageService, IGenericAttributeService genericAttributeService, ICountryService countryService ) { this._currencyService = currencyService; this._discountService = discountService; this._languageService = languageService; this._countryService = countryService; this._genericAttributeService = genericAttributeService; }
public new void SetUp() { _workContext = null; _services = MockRepository.GenerateMock <ICommonServices>(); _store = new Store() { Id = 1 }; _storeContext = MockRepository.GenerateMock <IStoreContext>(); _storeContext.Expect(x => x.CurrentStore).Return(_store); var pluginFinder = new PluginFinder(); _shoppingCartSettings = new ShoppingCartSettings(); _catalogSettings = new CatalogSettings(); //price calculation service _discountService = MockRepository.GenerateMock <IDiscountService>(); _categoryService = MockRepository.GenerateMock <ICategoryService>(); _manufacturerService = MockRepository.GenerateMock <IManufacturerService>(); _productAttributeParser = MockRepository.GenerateMock <IProductAttributeParser>(); _productAttributeService = MockRepository.GenerateMock <IProductAttributeService>(); _genericAttributeService = MockRepository.GenerateMock <IGenericAttributeService>(); _eventPublisher = MockRepository.GenerateMock <IEventPublisher>(); _eventPublisher.Expect(x => x.Publish(Arg <object> .Is.Anything)); _localizationService = MockRepository.GenerateMock <ILocalizationService>(); _settingService = MockRepository.GenerateMock <ISettingService>(); _typeFinder = MockRepository.GenerateMock <ITypeFinder>(); //shipping _shippingSettings = new ShippingSettings(); _shippingSettings.ActiveShippingRateComputationMethodSystemNames = new List <string>(); _shippingSettings.ActiveShippingRateComputationMethodSystemNames.Add("FixedRateTestShippingRateComputationMethod"); _shippingMethodRepository = MockRepository.GenerateMock <IRepository <ShippingMethod> >(); _storeMappingRepository = MockRepository.GenerateMock <IRepository <StoreMapping> >(); _logger = new NullLogger(); _shippingService = new ShippingService( _shippingMethodRepository, _storeMappingRepository, _productAttributeParser, _productService, _checkoutAttributeParser, _genericAttributeService, _shippingSettings, _eventPublisher, _shoppingCartSettings, _settingService, this.ProviderManager, _typeFinder, _services); _shipmentService = MockRepository.GenerateMock <IShipmentService>(); _paymentService = MockRepository.GenerateMock <IPaymentService>(); _providerManager = MockRepository.GenerateMock <IProviderManager>(); _checkoutAttributeParser = MockRepository.GenerateMock <ICheckoutAttributeParser>(); _giftCardService = MockRepository.GenerateMock <IGiftCardService>(); //tax _taxSettings = new TaxSettings(); _taxSettings.ShippingIsTaxable = true; _taxSettings.PaymentMethodAdditionalFeeIsTaxable = true; _taxSettings.DefaultTaxAddressId = 10; _addressService = MockRepository.GenerateMock <IAddressService>(); _addressService.Expect(x => x.GetAddressById(_taxSettings.DefaultTaxAddressId)).Return(new Address() { Id = _taxSettings.DefaultTaxAddressId }); _downloadService = MockRepository.GenerateMock <IDownloadService>(); _httpRequestBase = MockRepository.GenerateMock <HttpRequestBase>(); _geoCountryLookup = MockRepository.GenerateMock <IGeoCountryLookup>(); _taxService = new TaxService(_addressService, _workContext, _taxSettings, _shoppingCartSettings, pluginFinder, _geoCountryLookup, this.ProviderManager); _rewardPointsSettings = new RewardPointsSettings(); _priceCalcService = new PriceCalculationService(_discountService, _categoryService, _manufacturerService, _productAttributeParser, _productService, _shoppingCartSettings, _catalogSettings, _productAttributeService, _downloadService, _services, _httpRequestBase, _taxService, _taxSettings); _orderTotalCalcService = new OrderTotalCalculationService(_workContext, _storeContext, _priceCalcService, _taxService, _shippingService, _providerManager, _checkoutAttributeParser, _discountService, _giftCardService, _genericAttributeService, _paymentService, _currencyService, _productAttributeParser, _taxSettings, _rewardPointsSettings, _shippingSettings, _shoppingCartSettings, _catalogSettings); _orderService = MockRepository.GenerateMock <IOrderService>(); _webHelper = MockRepository.GenerateMock <IWebHelper>(); _languageService = MockRepository.GenerateMock <ILanguageService>(); _productService = MockRepository.GenerateMock <IProductService>(); _priceFormatter = MockRepository.GenerateMock <IPriceFormatter>(); _productAttributeFormatter = MockRepository.GenerateMock <IProductAttributeFormatter>(); _shoppingCartService = MockRepository.GenerateMock <IShoppingCartService>(); _checkoutAttributeFormatter = MockRepository.GenerateMock <ICheckoutAttributeFormatter>(); _customerService = MockRepository.GenerateMock <ICustomerService>(); _encryptionService = MockRepository.GenerateMock <IEncryptionService>(); _messageFactory = MockRepository.GenerateMock <IMessageFactory>(); _customerActivityService = MockRepository.GenerateMock <ICustomerActivityService>(); _currencyService = MockRepository.GenerateMock <ICurrencyService>(); _affiliateService = MockRepository.GenerateMock <IAffiliateService>(); _newsLetterSubscriptionService = MockRepository.GenerateMock <INewsLetterSubscriptionService>(); _paymentSettings = new PaymentSettings() { ActivePaymentMethodSystemNames = new List <string>() { "Payments.TestMethod" } }; _orderSettings = new OrderSettings(); _localizationSettings = new LocalizationSettings(); _eventPublisher = MockRepository.GenerateMock <IEventPublisher>(); _eventPublisher.Expect(x => x.Publish(Arg <object> .Is.Anything)); _currencySettings = new CurrencySettings(); _orderProcessingService = new OrderProcessingService(_orderService, _webHelper, _localizationService, _languageService, _productService, _paymentService, _orderTotalCalcService, _priceCalcService, _priceFormatter, _productAttributeParser, _productAttributeFormatter, _giftCardService, _shoppingCartService, _checkoutAttributeFormatter, _shippingService, _shipmentService, _taxService, _customerService, _discountService, _encryptionService, _workContext, _storeContext, _messageFactory, _customerActivityService, _currencyService, _affiliateService, _eventPublisher, _genericAttributeService, _newsLetterSubscriptionService, _paymentSettings, _rewardPointsSettings, _orderSettings, _taxSettings, _localizationSettings, _currencySettings, _shoppingCartSettings); }
public CategoryViewModelService(ICategoryService categoryService, ICategoryTemplateService categoryTemplateService, IDiscountService discountService, ILocalizationService localizationService, IStoreService storeService, ICustomerService customerService, IPictureService pictureService, IUrlRecordService urlRecordService, ICustomerActivityService customerActivityService, IProductService productService, IManufacturerService manufacturerService, IVendorService vendorService, IDateTimeHelper dateTimeHelper, ILanguageService languageService, CatalogSettings catalogSettings, SeoSettings seoSettings) { _categoryService = categoryService; _categoryTemplateService = categoryTemplateService; _discountService = discountService; _localizationService = localizationService; _storeService = storeService; _customerService = customerService; _urlRecordService = urlRecordService; _customerActivityService = customerActivityService; _productService = productService; _pictureService = pictureService; _manufacturerService = manufacturerService; _vendorService = vendorService; _languageService = languageService; _catalogSettings = catalogSettings; _dateTimeHelper = dateTimeHelper; _seoSettings = seoSettings; }
public DiscountRulesHasSomeProductsController(IDiscountService discountService, ICustomerService customerService) { this._discountService = discountService; }
public void Add(IDiscountService discount) { Console.WriteLine(discount.Name() + " adlı yeni bir kampanya eklendi."); }
public new void SetUp() { _workContext = null; var pluginFinder = new PluginFinder(new AppDomainTypeFinder()); var cacheManager = new NopNullCache(); _shoppingCartSettings = new ShoppingCartSettings(); _catalogSettings = new CatalogSettings(); //price calculation service _discountService = MockRepository.GenerateMock <IDiscountService>(); _categoryService = MockRepository.GenerateMock <ICategoryService>(); _productAttributeParser = MockRepository.GenerateMock <IProductAttributeParser>(); _priceCalcService = new PriceCalculationService(_workContext, _discountService, _categoryService, _productAttributeParser, _shoppingCartSettings, _catalogSettings); _eventPublisher = MockRepository.GenerateMock <IEventPublisher>(); _eventPublisher.Expect(x => x.Publish(Arg <object> .Is.Anything)); //shipping _shippingSettings = new ShippingSettings(); _shippingSettings.ActiveShippingRateComputationMethodSystemNames = new List <string>(); _shippingSettings.ActiveShippingRateComputationMethodSystemNames.Add("FixedRateTestShippingRateComputationMethod"); _shippingMethodRepository = MockRepository.GenerateMock <IRepository <ShippingMethod> >(); _logger = new NullLogger(); _shippingService = new ShippingService(cacheManager, _shippingMethodRepository, _logger, _productAttributeParser, _checkoutAttributeParser, _shippingSettings, pluginFinder, _eventPublisher); _paymentService = MockRepository.GenerateMock <IPaymentService>(); _checkoutAttributeParser = MockRepository.GenerateMock <ICheckoutAttributeParser>(); _giftCardService = MockRepository.GenerateMock <IGiftCardService>(); _eventPublisher = MockRepository.GenerateMock <IEventPublisher>(); _eventPublisher.Expect(x => x.Publish(Arg <object> .Is.Anything)); //tax _taxSettings = new TaxSettings(); _taxSettings.ShippingIsTaxable = true; _taxSettings.PaymentMethodAdditionalFeeIsTaxable = true; _taxSettings.DefaultTaxAddressId = 10; _addressService = MockRepository.GenerateMock <IAddressService>(); _addressService.Expect(x => x.GetAddressById(_taxSettings.DefaultTaxAddressId)).Return(new Address() { Id = _taxSettings.DefaultTaxAddressId }); _taxService = new TaxService(_addressService, _workContext, _taxSettings, pluginFinder, _eventPublisher); _rewardPointsSettings = new RewardPointsSettings(); _orderTotalCalcService = new OrderTotalCalculationService(_workContext, _priceCalcService, _taxService, _shippingService, _paymentService, _checkoutAttributeParser, _discountService, _giftCardService, _taxSettings, _rewardPointsSettings, _shippingSettings, _shoppingCartSettings, _catalogSettings); _orderService = MockRepository.GenerateMock <IOrderService>(); _webHelper = MockRepository.GenerateMock <IWebHelper>(); _localizationService = MockRepository.GenerateMock <ILocalizationService>(); _languageService = MockRepository.GenerateMock <ILanguageService>(); _productService = MockRepository.GenerateMock <IProductService>(); _priceFormatter = MockRepository.GenerateMock <IPriceFormatter>(); _productAttributeFormatter = MockRepository.GenerateMock <IProductAttributeFormatter>(); _shoppingCartService = MockRepository.GenerateMock <IShoppingCartService>(); _checkoutAttributeFormatter = MockRepository.GenerateMock <ICheckoutAttributeFormatter>(); _customerService = MockRepository.GenerateMock <ICustomerService>(); _encryptionService = MockRepository.GenerateMock <IEncryptionService>(); _workflowMessageService = MockRepository.GenerateMock <IWorkflowMessageService>(); _smsService = MockRepository.GenerateMock <ISmsService>(); _customerActivityService = MockRepository.GenerateMock <ICustomerActivityService>(); _currencyService = MockRepository.GenerateMock <ICurrencyService>(); _paymentSettings = new PaymentSettings() { ActivePaymentMethodSystemNames = new List <string>() { "Payments.TestMethod" } }; _orderSettings = new OrderSettings(); _localizationSettings = new LocalizationSettings(); _orderProcessingService = new OrderProcessingService(_orderService, _webHelper, _localizationService, _languageService, _productService, _paymentService, _logger, _orderTotalCalcService, _priceCalcService, _priceFormatter, _productAttributeParser, _productAttributeFormatter, _giftCardService, _shoppingCartService, _checkoutAttributeFormatter, _shippingService, _taxService, _customerService, _discountService, _encryptionService, _workContext, _workflowMessageService, _smsService, _customerActivityService, _currencyService, _paymentSettings, _rewardPointsSettings, _orderSettings, _taxSettings, _localizationSettings); }
public GetDiscountsCommand(IDiscountService discountService) { this.discountService = discountService; }
public void Uptade(IDiscountService discount) { Console.WriteLine(discount.Name() + " adlı kampanya güncellendi."); }
public DiscountController(IIdentityService identityService, IValidateService validateService, IDiscountService service) { //this.serviceProvider = serviceProvider; IdentityService = identityService; ValidateService = validateService; Service = service; ApiVersion = "1.0.0"; }
public Basket(IProductValidationService productValidationService, IDiscountService discountService) { this.productValidationService = productValidationService ?? throw new ArgumentNullException(nameof(productValidationService)); this.discountService = discountService ?? throw new ArgumentNullException(nameof(discountService)); }
public MmsOrderProcessingOverride( CurrencySettings currencySettings, IAddressService addressService, IAffiliateService affiliateService, ICheckoutAttributeFormatter checkoutAttributeFormatter, ICountryService countryService, ICurrencyService currencyService, ICustomerActivityService customerActivityService, ICustomerService customerService, ICustomNumberFormatter customNumberFormatter, IDiscountService discountService, IEncryptionService encryptionService, IEventPublisher eventPublisher, IGenericAttributeService genericAttributeService, IGiftCardService giftCardService, ILanguageService languageService, ILocalizationService localizationService, ILogger logger, IOrderService orderService, IOrderTotalCalculationService orderTotalCalculationService, IPaymentPluginManager paymentPluginManager, IPaymentService paymentService, IPdfService pdfService, IPriceCalculationService priceCalculationService, IPriceFormatter priceFormatter, IProductAttributeFormatter productAttributeFormatter, IProductAttributeParser productAttributeParser, IProductService productService, IRewardPointService rewardPointService, IShipmentService shipmentService, IShippingService shippingService, IShoppingCartService shoppingCartService, IStateProvinceService stateProvinceService, ITaxService taxService, IVendorService vendorService, IWebHelper webHelper, IWorkContext workContext, IWorkflowMessageService workflowMessageService, LocalizationSettings localizationSettings, OrderSettings orderSettings, PaymentSettings paymentSettings, RewardPointsSettings rewardPointsSettings, ShippingSettings shippingSettings, TaxSettings taxSettings, MmsAdminService mmsadminService) : base( currencySettings, addressService, affiliateService, checkoutAttributeFormatter, countryService, currencyService, customerActivityService, customerService, customNumberFormatter, discountService, encryptionService, eventPublisher, genericAttributeService, giftCardService, languageService, localizationService, logger, orderService, orderTotalCalculationService, paymentPluginManager, paymentService, pdfService, priceCalculationService, priceFormatter, productAttributeFormatter, productAttributeParser, productService, rewardPointService, shipmentService, shippingService, shoppingCartService, stateProvinceService, taxService, vendorService, webHelper, workContext, workflowMessageService, localizationSettings, orderSettings, paymentSettings, rewardPointsSettings, shippingSettings, taxSettings) { _currencySettings = currencySettings; _addressService = addressService; _affiliateService = affiliateService; _checkoutAttributeFormatter = checkoutAttributeFormatter; _countryService = countryService; _currencyService = currencyService; _customerActivityService = customerActivityService; _customerService = customerService; _customNumberFormatter = customNumberFormatter; _discountService = discountService; _encryptionService = encryptionService; _eventPublisher = eventPublisher; _genericAttributeService = genericAttributeService; _giftCardService = giftCardService; _languageService = languageService; _localizationService = localizationService; _logger = logger; _orderService = orderService; _orderTotalCalculationService = orderTotalCalculationService; _paymentPluginManager = paymentPluginManager; _paymentService = paymentService; _pdfService = pdfService; _priceCalculationService = priceCalculationService; _priceFormatter = priceFormatter; _productAttributeFormatter = productAttributeFormatter; _productAttributeParser = productAttributeParser; _productService = productService; _rewardPointService = rewardPointService; _shipmentService = shipmentService; _shippingService = shippingService; _shoppingCartService = shoppingCartService; _stateProvinceService = stateProvinceService; _taxService = taxService; _vendorService = vendorService; _webHelper = webHelper; _workContext = workContext; _workflowMessageService = workflowMessageService; _localizationSettings = localizationSettings; _orderSettings = orderSettings; _paymentSettings = paymentSettings; _rewardPointsSettings = rewardPointsSettings; _shippingSettings = shippingSettings; _taxSettings = taxSettings; _mmsadminService = mmsadminService; }
public VendorService(IVendorRepository vendorRepository, IPointOfSaleService pointOfSaleService, IStringLocalizer <NotificationResource> stringLocalizer, IDiscountRepository discountRepository, IDiscountService discountSevice, IMapper mapper, IImageRepository imageRepository) { _vendorRepository = vendorRepository; _pointOfSaleService = pointOfSaleService; _stringLocalizer = stringLocalizer; _discountRepository = discountRepository; _discountSevice = discountSevice; _mapper = mapper; _imageRepository = imageRepository; }
public void TestInitialize() { new Grand.Services.Tests.ServiceTest().PluginInitializator(); _workContext = new Mock <IWorkContext>().Object; _stateProvinceService = new Mock <IStateProvinceService>().Object; _store = new Store { Id = "1" }; var tempStoreContext = new Mock <IStoreContext>(); { tempStoreContext.Setup(x => x.CurrentStore).Returns(_store); _storeContext = tempStoreContext.Object; } _productService = new Mock <IProductService>().Object; var tempEventPublisher = new Mock <IMediator>(); { //tempEventPublisher.Setup(x => x.PublishAsync(It.IsAny<object>())); _eventPublisher = tempEventPublisher.Object; } var pluginFinder = new PluginFinder(_serviceProvider); var cacheManager = new TestMemoryCacheManager(new Mock <IMemoryCache>().Object, _eventPublisher); _discountService = new Mock <IDiscountService>().Object; _categoryService = new Mock <ICategoryService>().Object; _manufacturerService = new Mock <IManufacturerService>().Object; _productAttributeParser = new Mock <IProductAttributeParser>().Object; _vendorService = new Mock <IVendorService>().Object; _currencyService = new Mock <ICurrencyService>().Object; _serviceProvider = new Mock <IServiceProvider>().Object; _shoppingCartSettings = new ShoppingCartSettings(); _catalogSettings = new CatalogSettings(); _customerService = new Mock <ICustomerService>().Object; _customerProductService = new Mock <ICustomerProductService>().Object; _priceCalcService = new PriceCalculationService(_workContext, _storeContext, _discountService, _categoryService, _manufacturerService, _productAttributeParser, _productService, _customerProductService, _vendorService, _currencyService, _shoppingCartSettings, _catalogSettings); _localizationService = new Mock <ILocalizationService>().Object; //shipping _shippingSettings = new ShippingSettings(); _shippingSettings.ActiveShippingRateComputationMethodSystemNames = new List <string>(); _shippingSettings.ActiveShippingRateComputationMethodSystemNames.Add("FixedRateTestShippingRateComputationMethod"); _shippingMethodRepository = new Mock <IRepository <ShippingMethod> >().Object; _deliveryDateRepository = new Mock <IRepository <DeliveryDate> >().Object; _warehouseRepository = new Mock <IRepository <Warehouse> >().Object; _logger = new NullLogger(); _paymentService = new Mock <IPaymentService>().Object; _checkoutAttributeParser = new Mock <ICheckoutAttributeParser>().Object; _giftCardService = new Mock <IGiftCardService>().Object; _genericAttributeService = new Mock <IGenericAttributeService>().Object; _geoLookupService = new Mock <IGeoLookupService>().Object; _countryService = new Mock <ICountryService>().Object; _customerSettings = new CustomerSettings(); _addressSettings = new AddressSettings(); //tax _taxSettings = new TaxSettings(); _taxSettings.ShippingIsTaxable = true; _taxSettings.PaymentMethodAdditionalFeeIsTaxable = true; _taxSettings.DefaultTaxAddressId = "10"; _shippingService = new ShippingService(_shippingMethodRepository, _deliveryDateRepository, _warehouseRepository, null, _logger, _productService, _productAttributeParser, _checkoutAttributeParser, _localizationService, _addressService, _countryService, _stateProvinceService, pluginFinder, _storeContext, _eventPublisher, _currencyService, cacheManager, null, _shoppingCartSettings, _shippingSettings); var tempAddressService = new Mock <IAddressService>(); { tempAddressService.Setup(x => x.GetAddressByIdSettings(_taxSettings.DefaultTaxAddressId)) .ReturnsAsync(new Address { Id = _taxSettings.DefaultTaxAddressId }); _addressService = tempAddressService.Object; } _taxService = new TaxService(_addressService, _workContext, pluginFinder, _geoLookupService, _countryService, _logger, _taxSettings, _customerSettings, _addressSettings); _rewardPointsSettings = new RewardPointsSettings(); _orderTotalCalcService = new OrderTotalCalculationService(_workContext, _storeContext, _priceCalcService, _taxService, _shippingService, _paymentService, _checkoutAttributeParser, _discountService, _giftCardService, null, _productService, _currencyService, _taxSettings, _rewardPointsSettings, _shippingSettings, _shoppingCartSettings, _catalogSettings); }
public DiscountController(ILogger <DiscountController> logger, IDiscountService discountService) { _logger = logger; _discountService = discountService; }
public DiscountController(IDiscountService discountService) { _discountService = discountService; }
public OrderBuilderService(IDiscountService discountService, IPromoCodeService promoCodeService) { _discountService = discountService; _promoCodeService = promoCodeService; }
public DiscountsController(IDiscountService discountService, ISharedIdentityService sharedIdentityService) { _discountService = discountService ?? throw new ArgumentNullException(nameof(discountService)); _sharedIdentityService = sharedIdentityService ?? throw new ArgumentNullException(nameof(sharedIdentityService)); }
public void Delete(IDiscountService discount) { Console.WriteLine(discount.Name() + " adlı kampanya silindi."); }
public OverriddenProductController(AvalaraTaxManager avalaraTaxManager, IAclService aclService, IBackInStockSubscriptionService backInStockSubscriptionService, ICategoryService categoryService, ICopyProductService copyProductService, ICustomerActivityService customerActivityService, ICustomerService customerService, IDiscountService discountService, IDownloadService downloadService, IExportManager exportManager, IImportManager importManager, ILanguageService languageService, ILocalizationService localizationService, ILocalizedEntityService localizedEntityService, IManufacturerService manufacturerService, INopFileProvider fileProvider, INotificationService notificationService, IPdfService pdfService, IPermissionService permissionService, IPictureService pictureService, IProductAttributeParser productAttributeParser, IProductAttributeService productAttributeService, IProductModelFactory productModelFactory, IProductService productService, IProductTagService productTagService, ISettingService settingService, IShippingService shippingService, IShoppingCartService shoppingCartService, ISpecificationAttributeService specificationAttributeService, ITaxCategoryService taxCategoryService, ITaxPluginManager taxPluginManager, IUrlRecordService urlRecordService, IWorkContext workContext, VendorSettings vendorSettings, IWalletService walletService, IWalletDetailService walletDetailService) : base(aclService, backInStockSubscriptionService, categoryService, copyProductService, customerActivityService, customerService, discountService, downloadService, exportManager, importManager, languageService, localizationService, localizedEntityService, manufacturerService, fileProvider, notificationService, pdfService, permissionService, pictureService, productAttributeParser, productAttributeService, productModelFactory, productService, productTagService, settingService, shippingService, shoppingCartService, specificationAttributeService, urlRecordService, workContext, vendorSettings, walletService, walletDetailService) { _avalaraTaxManager = avalaraTaxManager; _localizationService = localizationService; _notificationService = notificationService; _permissionService = permissionService; _productAttributeService = productAttributeService; _productService = productService; _taxCategoryService = taxCategoryService; _taxPluginManager = taxPluginManager; }
public BasketsController(IBasketRepository basketRepository, IMapper mapper, IMessageBus messageBus, IDiscountService discountService) { this.basketRepository = basketRepository; this.mapper = mapper; this.messageBus = messageBus; this.discountService = discountService; }
public void Setup() { discountService = new DiscountService(); basketService = new Basket.Basket(discountService); }
public DiscountsController(IDiscountService discountService, ISharedIdentityService sharedIdentityService) { _discountService = discountService; _sharedIdentityService = sharedIdentityService; }
public override void SetUp() { var discount1 = new Discount { Id = 1, DiscountType = DiscountType.AssignedToCategories, Name = "Discount 1", CouponCode = "DiscoutCoupon", RequiresCouponCode = true, UsePercentage = true, DiscountPercentage = 10, DiscountAmount = 0, DiscountLimitation = DiscountLimitationType.Unlimited, LimitationTimes = 0 }; var discount2 = new Discount { Id = 2, DiscountType = DiscountType.AssignedToSkus, Name = "Discount 2", UsePercentage = false, DiscountPercentage = 0, DiscountAmount = 5, RequiresCouponCode = true, CouponCode = "SecretCode", DiscountLimitation = DiscountLimitationType.NTimesPerCustomer, LimitationTimes = 3 }; var discountList = new List <Discount> { discount1, discount2 }.AsQueryable(); var discountRequirement = new List <DiscountRequirement>().AsQueryable(); _permissionService.Setup(x => x.Authorize(StandardPermissionProvider.ManageDiscounts)).Returns(true); _discountRepo.Setup(x => x.Table).Returns(discountList); _discountRepo.Setup(c => c.GetById(It.IsAny <int>())).Returns((int i) => discountList.FirstOrDefault(c => c.Id == i)); _discountRequirementRepo.Setup(x => x.Table).Returns(discountRequirement); _discountRequirementRepo.Setup(dr => dr.Insert(It.IsAny <DiscountRequirement>())).Callback((DiscountRequirement i) => { i.Id = discountRequirement.Count() > 0 ? discountRequirement.Max(x => x.Id) + 1 : 1; discountRequirement.ToList().Add(i); }); _eventPublisher.Setup(x => x.Publish(It.IsAny <object>())); var staticCacheManager = new TestCacheManager(); var pluginService = new FakePluginService(); _discountPluginManager = new DiscountPluginManager(new Mock <ICustomerService>().Object, pluginService); _discountService = new DiscountService( new FakeCacheKeyService(), _customerService.Object, _discountPluginManager, _eventPublisher.Object, _localizationService.Object, _productService.Object, _discountRepo.Object, _discountRequirementRepo.Object, _discountUsageHistoryRepo.Object, _orderRepo.Object, staticCacheManager, _storeContext.Object); }
public BasketService(HttpClient httpClient, IDiscountService discountService) { _httpClient = httpClient; _discountService = discountService; }
public DiscountsController(IDiscountService discountService, IMapper mapper) { _discountService = discountService; _mapper = mapper; }
public DiscountMiddleware(RequestDelegate next, IDiscountService discountService) { _next = next; _discountService = discountService; }
public SaleViewModel(ScreenCoordinator screenCoordinator, ImageService imageService, ICustomerService customerService, IProductService productService, IInvoiceService invoiceService, IDiscountService discountService, IEventAggregator eventAggregator) { ScreenCoordinator = screenCoordinator; ImageService = imageService; CustomerService = customerService; ProductService = productService; InvoiceService = invoiceService; DiscountService = discountService; EventAggregator = eventAggregator; DisplayName = "PURCHASE"; Products = new BindableCollection <SaleItemViewModel>(); }
public GetShoppingCartHandler( ICacheBase cacheManager, IPaymentService paymentService, IProductService productService, IPictureService pictureService, IProductAttributeParser productAttributeParser, ILocalizationService localizationService, ICheckoutAttributeFormatter checkoutAttributeFormatter, ICurrencyService currencyService, IDiscountService discountService, IShoppingCartService shoppingCartService, ICheckoutAttributeService checkoutAttributeService, IPermissionService permissionService, ITaxService taxService, IPriceFormatter priceFormatter, ICheckoutAttributeParser checkoutAttributeParser, IDownloadService downloadService, ICountryService countryService, IWarehouseService warehouseService, IProductAttributeFormatter productAttributeFormatter, IPriceCalculationService priceCalculationService, IDateTimeHelper dateTimeHelper, IVendorService vendorService, IMediator mediator, MediaSettings mediaSettings, OrderSettings orderSettings, ShoppingCartSettings shoppingCartSettings, CatalogSettings catalogSettings, ShippingSettings shippingSettings, CommonSettings commonSettings) { _cacheBase = cacheManager; _paymentService = paymentService; _productService = productService; _pictureService = pictureService; _productAttributeParser = productAttributeParser; _localizationService = localizationService; _checkoutAttributeFormatter = checkoutAttributeFormatter; _currencyService = currencyService; _discountService = discountService; _shoppingCartService = shoppingCartService; _checkoutAttributeService = checkoutAttributeService; _permissionService = permissionService; _taxService = taxService; _priceFormatter = priceFormatter; _checkoutAttributeParser = checkoutAttributeParser; _downloadService = downloadService; _countryService = countryService; _warehouseService = warehouseService; _productAttributeFormatter = productAttributeFormatter; _priceCalculationService = priceCalculationService; _dateTimeHelper = dateTimeHelper; _vendorService = vendorService; _mediator = mediator; _mediaSettings = mediaSettings; _orderSettings = orderSettings; _shoppingCartSettings = shoppingCartSettings; _catalogSettings = catalogSettings; _shippingSettings = shippingSettings; _commonSettings = commonSettings; }
public DiscountPriceCalculator(SmartDbContext db, IDiscountService discountService, CatalogSettings catalogSettings) { _db = db; _discountService = discountService; _catalogSettings = catalogSettings; }
public DiscountSupportedModelFactory(IDiscountService discountService) { _discountService = discountService; }
public DiscountController(IDiscountService service) { _service = service; }