//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 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 ProductAttributeFormatter(ICurrencyService currencyService,
                                  IDownloadService downloadService,
                                  ILocalizationService localizationService,
                                  IPriceCalculationService priceCalculationService,
                                  IPriceFormatter priceFormatter,
                                  IProductAttributeParser productAttributeParser,
                                  ITaxService taxService,
                                  IWebHelper webHelper,
                                  IWorkContext workContext,
                                  ShoppingCartSettings shoppingCartSettings)
 {
     this._currencyService         = currencyService;
     this._downloadService         = downloadService;
     this._localizationService     = localizationService;
     this._priceCalculationService = priceCalculationService;
     this._priceFormatter          = priceFormatter;
     this._productAttributeParser  = productAttributeParser;
     this._taxService           = taxService;
     this._webHelper            = webHelper;
     this._workContext          = workContext;
     this._shoppingCartSettings = shoppingCartSettings;
 }
 public GBSProductAttributeFormatter(IWorkContext workContext,
                                     IProductAttributeService productAttributeService,
                                     IProductAttributeParser productAttributeParser,
                                     ICurrencyService currencyService,
                                     ILocalizationService localizationService,
                                     ITaxService taxService,
                                     IPriceFormatter priceFormatter,
                                     IDownloadService downloadService,
                                     IWebHelper webHelper,
                                     IPriceCalculationService priceCalculationService,
                                     ShoppingCartSettings shoppingCartSettings,
                                     IPluginFinder pluginFinder,
                                     IStoreContext storeContext)
     : base(workContext,
            productAttributeService,
            productAttributeParser,
            currencyService,
            localizationService,
            taxService,
            priceFormatter,
            downloadService,
            webHelper,
            priceCalculationService,
            shoppingCartSettings)
 {
     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._shoppingCartSettings    = shoppingCartSettings;
     this._pluginFinder            = pluginFinder;
     this._storeContext            = storeContext;
 }
示例#5
0
 /// <summary>
 /// Ctor
 /// </summary>
 public ShippingService(
     IRepository <ShippingMethod> shippingMethodRepository,
     IRepository <DeliveryDate> deliveryDateRepository,
     IRepository <Warehouse> warehouseRepository,
     IRepository <PickupPoint> pickupPointsRepository,
     ILogger logger,
     IProductService productService,
     IProductAttributeParser productAttributeParser,
     ICheckoutAttributeParser checkoutAttributeParser,
     ILocalizationService localizationService,
     IAddressService addressService,
     ICountryService countryService,
     IStateProvinceService stateProvinceService,
     IPluginFinder pluginFinder,
     IMediator mediator,
     ICurrencyService currencyService,
     ICacheManager cacheManager,
     ShoppingCartSettings shoppingCartSettings,
     ShippingSettings shippingSettings)
 {
     _shippingMethodRepository = shippingMethodRepository;
     _deliveryDateRepository   = deliveryDateRepository;
     _warehouseRepository      = warehouseRepository;
     _pickupPointsRepository   = pickupPointsRepository;
     _logger                  = logger;
     _productService          = productService;
     _productAttributeParser  = productAttributeParser;
     _checkoutAttributeParser = checkoutAttributeParser;
     _localizationService     = localizationService;
     _addressService          = addressService;
     _countryService          = countryService;
     _stateProvinceService    = stateProvinceService;
     _pluginFinder            = pluginFinder;
     _currencyService         = currencyService;
     _mediator                = mediator;
     _cacheManager            = cacheManager;
     _shoppingCartSettings    = shoppingCartSettings;
     _shippingSettings        = shippingSettings;
 }
示例#6
0
 public AddToCartController(IProductService productService,
                            IProductReservationService productReservationService,
                            IShoppingCartService shoppingCartService,
                            IShoppingCartViewModelService shoppingCartViewModelService,
                            IWorkContext workContext,
                            IStoreContext storeContext,
                            ILocalizationService localizationService,
                            ICurrencyService currencyService,
                            ICustomerActivityService customerActivityService,
                            ShoppingCartSettings shoppingCartSettings)
 {
     _productService               = productService;
     _productReservationService    = productReservationService;
     _shoppingCartService          = shoppingCartService;
     _shoppingCartViewModelService = shoppingCartViewModelService;
     _workContext             = workContext;
     _storeContext            = storeContext;
     _localizationService     = localizationService;
     _currencyService         = currencyService;
     _customerActivityService = customerActivityService;
     _shoppingCartSettings    = shoppingCartSettings;
 }
 public ShoppingCartModelMapper(
     SmartDbContext db,
     ITaxService taxService,
     ICommonServices services,
     IMediaService mediaService,
     IPaymentService paymentService,
     IDiscountService discountService,
     ICurrencyService currencyService,
     IHttpContextAccessor httpContextAccessor,
     IShoppingCartValidator shoppingCartValidator,
     IOrderCalculationService orderCalculationService,
     ICheckoutAttributeFormatter checkoutAttributeFormatter,
     ICheckoutAttributeMaterializer checkoutAttributeMaterializer,
     ShoppingCartSettings shoppingCartSettings,
     CatalogSettings catalogSettings,
     MediaSettings mediaSettings,
     OrderSettings orderSettings,
     MeasureSettings measureSettings,
     ShippingSettings shippingSettings,
     RewardPointsSettings rewardPointsSettings,
     Localizer T)
     : base(services, shoppingCartSettings, catalogSettings, mediaSettings, T)
 {
     _db                            = db;
     _taxService                    = taxService;
     _mediaService                  = mediaService;
     _paymentService                = paymentService;
     _discountService               = discountService;
     _currencyService               = currencyService;
     _httpContextAccessor           = httpContextAccessor;
     _shoppingCartValidator         = shoppingCartValidator;
     _orderCalculationService       = orderCalculationService;
     _checkoutAttributeFormatter    = checkoutAttributeFormatter;
     _checkoutAttributeMaterializer = checkoutAttributeMaterializer;
     _shippingSettings              = shippingSettings;
     _orderSettings                 = orderSettings;
     _measureSettings               = measureSettings;
     _rewardPointsSettings          = rewardPointsSettings;
 }
 public GetMiniShoppingCartHandler(
     IShoppingCartService shoppingCartService,
     IOrderTotalCalculationService orderTotalCalculationService,
     ICurrencyService currencyService,
     IPriceFormatter priceFormatter,
     ITaxService taxService,
     ICacheManager cacheManager,
     ICheckoutAttributeService checkoutAttributeService,
     IOrderProcessingService orderProcessingService,
     IProductService productService,
     IProductAttributeFormatter productAttributeFormatter,
     IProductAttributeParser productAttributeParser,
     ILocalizationService localizationService,
     IPriceCalculationService priceCalculationService,
     IPictureService pictureService,
     ShoppingCartSettings shoppingCartSettings,
     OrderSettings orderSettings,
     TaxSettings taxSettings,
     MediaSettings mediaSettings)
 {
     _shoppingCartService          = shoppingCartService;
     _orderTotalCalculationService = orderTotalCalculationService;
     _currencyService           = currencyService;
     _priceFormatter            = priceFormatter;
     _taxService                = taxService;
     _cacheManager              = cacheManager;
     _checkoutAttributeService  = checkoutAttributeService;
     _orderProcessingService    = orderProcessingService;
     _productService            = productService;
     _productAttributeFormatter = productAttributeFormatter;
     _productAttributeParser    = productAttributeParser;
     _localizationService       = localizationService;
     _priceCalculationService   = priceCalculationService;
     _pictureService            = pictureService;
     _shoppingCartSettings      = shoppingCartSettings;
     _orderSettings             = orderSettings;
     _taxSettings               = taxSettings;
     _mediaSettings             = mediaSettings;
 }
示例#9
0
 /// <summary>
 /// Ctor
 /// </summary>
 /// <param name="cacheManager">Cache manager</param>
 /// <param name="shippingMethodRepository">Shipping method repository</param>
 /// <param name="logger">Logger</param>
 /// <param name="productAttributeParser">Product attribute parser</param>
 /// <param name="checkoutAttributeParser">Checkout attribute parser</param>
 /// <param name="localizationService">Localization service</param>
 /// <param name="shippingSettings">Shipping settings</param>
 /// <param name="pluginFinder">Plugin finder</param>
 /// <param name="eventPublisher">Event published</param>
 /// <param name="shoppingCartSettings">Shopping cart settings</param>
 public ShippingService(ICacheManager cacheManager,
                        IRepository <ShippingMethod> shippingMethodRepository,
                        ILogger logger,
                        IProductAttributeParser productAttributeParser,
                        ICheckoutAttributeParser checkoutAttributeParser,
                        ILocalizationService localizationService,
                        ShippingSettings shippingSettings,
                        IPluginFinder pluginFinder,
                        IEventPublisher eventPublisher,
                        ShoppingCartSettings shoppingCartSettings)
 {
     this._cacheManager             = cacheManager;
     this._shippingMethodRepository = shippingMethodRepository;
     this._logger = logger;
     this._productAttributeParser  = productAttributeParser;
     this._checkoutAttributeParser = checkoutAttributeParser;
     this._localizationService     = localizationService;
     this._shippingSettings        = shippingSettings;
     this._pluginFinder            = pluginFinder;
     this._eventPublisher          = eventPublisher;
     this._shoppingCartSettings    = shoppingCartSettings;
 }
 public PriceCalculationService(IWorkContext workContext,
                                IStoreContext storeContext,
                                IDiscountService discountService,
                                ICategoryService categoryService,
                                IManufacturerService manufacturerService,
                                IProductAttributeParser productAttributeParser,
                                IProductService productService,
                                ICacheManager cacheManager,
                                ShoppingCartSettings shoppingCartSettings,
                                CatalogSettings catalogSettings)
 {
     this._workContext            = workContext;
     this._storeContext           = storeContext;
     this._discountService        = discountService;
     this._categoryService        = categoryService;
     this._manufacturerService    = manufacturerService;
     this._productAttributeParser = productAttributeParser;
     this._productService         = productService;
     this._cacheManager           = cacheManager;
     this._shoppingCartSettings   = shoppingCartSettings;
     this._catalogSettings        = catalogSettings;
 }
示例#11
0
 public BackInStockSubscriptionController(IProductService productService,
                                          IWorkContext workContext,
                                          IStoreContext storeContext,
                                          ILocalizationService localizationService,
                                          IBackInStockSubscriptionService backInStockSubscriptionService,
                                          IProductAttributeFormatter productAttributeFormatter,
                                          IMediator mediator,
                                          CatalogSettings catalogSettings,
                                          CustomerSettings customerSettings,
                                          ShoppingCartSettings shoppingCartSettings)
 {
     _productService                 = productService;
     _workContext                    = workContext;
     _storeContext                   = storeContext;
     _localizationService            = localizationService;
     _backInStockSubscriptionService = backInStockSubscriptionService;
     _productAttributeFormatter      = productAttributeFormatter;
     _mediator             = mediator;
     _catalogSettings      = catalogSettings;
     _customerSettings     = customerSettings;
     _shoppingCartSettings = shoppingCartSettings;
 }
示例#12
0
        public new void SetUp()
        {
            _paymentSettings = new PaymentSettings();
            _paymentSettings.ActivePaymentMethodSystemNames = new List <string>();
            _paymentSettings.ActivePaymentMethodSystemNames.Add("Payments.TestMethod");

            _shoppingCartSettings    = new ShoppingCartSettings();
            _paymentMethodRepository = MockRepository.GenerateMock <IRepository <PaymentMethod> >();
            _storeMappingRepository  = MockRepository.GenerateMock <IRepository <StoreMapping> >();
            _storeMappingService     = MockRepository.GenerateMock <IStoreMappingService>();
            _services = MockRepository.GenerateMock <ICommonServices>();

            _typeFinder = MockRepository.GenerateMock <ITypeFinder>();
            _typeFinder.Expect(x => x.FindClassesOfType((Type)null, null, true)).IgnoreArguments().Return(Enumerable.Empty <Type>()).Repeat.Any();

            var localizationService = MockRepository.GenerateMock <ILocalizationService>();

            localizationService.Expect(ls => ls.GetResource(null)).IgnoreArguments().Return("NotSupported").Repeat.Any();

            _paymentService = new PaymentService(_paymentMethodRepository, _storeMappingRepository, _storeMappingService, _paymentSettings, _shoppingCartSettings,
                                                 this.ProviderManager, _services, _typeFinder);
        }
示例#13
0
 public OutOfStockSubscriptionController(IProductService productService,
                                         IWorkContext workContext,
                                         IGroupService groupService,
                                         ITranslationService translationService,
                                         IOutOfStockSubscriptionService outOfStockSubscriptionService,
                                         IProductAttributeFormatter productAttributeFormatter,
                                         IStockQuantityService stockQuantityService,
                                         IMediator mediator,
                                         CustomerSettings customerSettings,
                                         ShoppingCartSettings shoppingCartSettings)
 {
     _productService                = productService;
     _workContext                   = workContext;
     _groupService                  = groupService;
     _translationService            = translationService;
     _outOfStockSubscriptionService = outOfStockSubscriptionService;
     _productAttributeFormatter     = productAttributeFormatter;
     _stockQuantityService          = stockQuantityService;
     _mediator             = mediator;
     _customerSettings     = customerSettings;
     _shoppingCartSettings = shoppingCartSettings;
 }
 public PaymentAliPayController(IWorkContext workContext,
                                IStoreService storeService, ISettingService settingService,
                                IPaymentService paymentService, IOrderService orderService,
                                IOrderProcessingService orderProcessingService,
                                ILocalizationService localizationService,
                                ILogger logger, IWebHelper webHelper,
                                AliPayPaymentSettings aliPayPaymentSettings,
                                PaymentSettings paymentSettings, ShoppingCartSettings shoppingCartSettings)
 {
     this._workContext            = workContext;
     this._storeService           = storeService;
     this._settingService         = settingService;
     this._paymentService         = paymentService;
     this._orderService           = orderService;
     this._orderProcessingService = orderProcessingService;
     this._localizationService    = localizationService;
     this._logger                = logger;
     this._webHelper             = webHelper;
     this._aliPayPaymentSettings = aliPayPaymentSettings;
     this._paymentSettings       = paymentSettings;
     this._shoppingCartSettings  = shoppingCartSettings;
 }
示例#15
0
 /// <summary>
 /// Ctor
 /// </summary>
 /// <param name="addressService">Address service</param>
 /// <param name="workContext">Work context</param>
 /// <param name="taxSettings">Tax settings</param>
 /// <param name="pluginFinder">Plugin finder</param>
 public TaxService(
     IAddressService addressService,
     IWorkContext workContext,
     TaxSettings taxSettings,
     ShoppingCartSettings cartSettings,
     IPluginFinder pluginFinder,
     ISettingService settingService,
     IGeoCountryLookup geoCountryLookup,
     IProviderManager providerManager
     )
 {
     this._addressService     = addressService;
     this._workContext        = workContext;
     this._taxSettings        = taxSettings;
     this._cartSettings       = cartSettings;
     this._pluginFinder       = pluginFinder;
     this._cachedTaxRates     = new Dictionary <TaxRateCacheKey, decimal>();
     this._cachedTaxAddresses = new Dictionary <TaxAddressKey, Address>();
     this._settingService     = settingService;
     this._providerManager    = providerManager;
     this._geoCountryLookup   = geoCountryLookup;
 }
示例#16
0
        /// <summary>
        /// Ctor
        /// </summary>
        /// <param name="paymentSettings">Payment settings</param>
        /// <param name="pluginFinder">Plugin finder</param>
        /// <param name="shoppingCartSettings">Shopping cart settings</param>
        /// <param name="pluginService">Plugin service</param>
        public PaymentService(
            IRepository <PaymentMethod> paymentMethodRepository,
            IRepository <StoreMapping> storeMappingRepository,
            IStoreMappingService storeMappingService,
            PaymentSettings paymentSettings,
            ShoppingCartSettings shoppingCartSettings,
            IProviderManager providerManager,
            ICommonServices services,
            ITypeFinder typeFinder)
        {
            _paymentMethodRepository = paymentMethodRepository;
            _storeMappingRepository  = storeMappingRepository;
            _storeMappingService     = storeMappingService;
            _paymentSettings         = paymentSettings;
            _shoppingCartSettings    = shoppingCartSettings;
            _providerManager         = providerManager;
            _services   = services;
            _typeFinder = typeFinder;

            T             = NullLocalizer.Instance;
            QuerySettings = DbQuerySettings.Default;
        }
示例#17
0
        /// <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="rewardPointsService">Reward points 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,
            IRewardPointsService rewardPointsService,

            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._rewardPointsService     = rewardPointsService;

            this._taxSettings          = taxSettings;
            this._rewardPointsSettings = rewardPointsSettings;
            this._shippingSettings     = shippingSettings;
            this._shoppingCartSettings = shoppingCartSettings;
            this._catalogSettings      = catalogSettings;
        }
 public PaymentPayPalStandardController(IWorkContext workContext,
                                        IStoreService storeService,
                                        ISettingService settingService,
                                        IPaymentService paymentService,
                                        IOrderService orderService,
                                        IOrderProcessingService orderProcessingService,
                                        IGenericAttributeService genericAttributeService,
                                        ILocalizationService localizationService,
                                        IStoreContext storeContext,
                                        ILogger logger,
                                        IWebHelper webHelper,
                                        PaymentSettings paymentSettings,
                                        PayPalStandardPaymentSettings payPalStandardPaymentSettings,
                                        ShoppingCartSettings shoppingCartSettings,
                                        IEncryptionService encryptionService,
                                        ICustomerService customerService,
                                        HttpContextBase httpContext, IShoppingCartService shoppingCartService, IProductService productService)
 {
     this._workContext             = workContext;
     this._storeService            = storeService;
     this._settingService          = settingService;
     this._paymentService          = paymentService;
     this._orderService            = orderService;
     this._orderProcessingService  = orderProcessingService;
     this._genericAttributeService = genericAttributeService;
     this._localizationService     = localizationService;
     this._storeContext            = storeContext;
     this._logger          = logger;
     this._webHelper       = webHelper;
     this._paymentSettings = paymentSettings;
     this._payPalStandardPaymentSettings = payPalStandardPaymentSettings;
     this._shoppingCartSettings          = shoppingCartSettings;
     this._encryptionService             = encryptionService;
     this._customerService     = customerService;
     this._httpContext         = httpContext;
     this._shoppingCartService = shoppingCartService;
     this._productService      = productService;
 }
        public ShoppingCartViewComponent(
            IProductService productService,
            IStoreContext storeContext,
            IWorkContext workContext,
            IShoppingCartService shoppingCartService,
            IPermissionService permissionService,
            IShoppingCartWebService shoppingCartWebService,
            IHttpContextAccessor httpContextAccessor,

            MediaSettings mediaSettings,
            ShoppingCartSettings shoppingCartSettings,
            CatalogSettings catalogSettings,
            OrderSettings orderSettings,
            ShippingSettings shippingSettings,
            TaxSettings taxSettings,
            CaptchaSettings captchaSettings,
            AddressSettings addressSettings,
            RewardPointsSettings rewardPointsSettings
            )
        {
            this._productService      = productService;
            this._workContext         = workContext;
            this._storeContext        = storeContext;
            this._shoppingCartService = shoppingCartService;
            this._permissionService   = permissionService;

            this._shoppingCartWebService = shoppingCartWebService;

            this._mediaSettings        = mediaSettings;
            this._shoppingCartSettings = shoppingCartSettings;
            this._catalogSettings      = catalogSettings;
            this._orderSettings        = orderSettings;
            this._shippingSettings     = shippingSettings;
            this._taxSettings          = taxSettings;
            this._captchaSettings      = captchaSettings;
            this._addressSettings      = addressSettings;
            this._rewardPointsSettings = rewardPointsSettings;
        }
 public PaymentPayPalPlusController(IWorkContext workContext,
                                    IStoreService storeService,
                                    ISettingService settingService,
                                    IPaymentService paymentService,
                                    IOrderService orderService,
                                    IOrderProcessingService orderProcessingService,
                                    IPermissionService permissionService,
                                    IGenericAttributeService genericAttributeService,
                                    ILocalizationService localizationService,
                                    IStoreContext storeContext,
                                    ILogger logger,
                                    IWebHelper webHelper,
                                    PaymentSettings paymentSettings,
                                    PayPalPlusPaymentSettings payPalPlusPaymentSettings,
                                    ShoppingCartSettings shoppingCartSettings,
                                    IOrderTotalCalculationService orderTotalCalculationService,
                                    IPayPalIPNService payPalIPNService,
                                    INotificationService notificationService)
 {
     this._workContext             = workContext;
     this._storeService            = storeService;
     this._settingService          = settingService;
     this._paymentService          = paymentService;
     this._orderService            = orderService;
     this._orderProcessingService  = orderProcessingService;
     this._permissionService       = permissionService;
     this._genericAttributeService = genericAttributeService;
     this._localizationService     = localizationService;
     this._storeContext            = storeContext;
     this._logger                       = logger;
     this._webHelper                    = webHelper;
     this._paymentSettings              = paymentSettings;
     this._payPalPlusPaymentSettings    = payPalPlusPaymentSettings;
     this._shoppingCartSettings         = shoppingCartSettings;
     this._orderTotalCalculationService = orderTotalCalculationService;
     this._payPalIPNService             = payPalIPNService;
     this._notificationService          = notificationService;
 }
示例#21
0
        public new void SetUp()
        {
            var serviceProvider = new TestServiceProvider();

            _store = new Store {
                Id = 1
            };
            _storeContext = new Mock <IStoreContext>();
            _storeContext.Setup(x => x.CurrentStore).Returns(_store);

            _discountService     = new Mock <IDiscountService>();
            _categoryService     = new Mock <ICategoryService>();
            _manufacturerService = new Mock <IManufacturerService>();
            _productService      = new Mock <IProductService>();

            _productAttributeParser = new Mock <IProductAttributeParser>();

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

            _cacheManager = new NopNullCache();

            _priceCalcService = new PriceCalculationService(serviceProvider.WorkContext.Object,
                                                            _storeContext.Object,
                                                            _discountService.Object,
                                                            _categoryService.Object,
                                                            _manufacturerService.Object,
                                                            _productAttributeParser.Object,
                                                            _productService.Object,
                                                            _cacheManager,
                                                            _shoppingCartSettings,
                                                            _catalogSettings);

            var nopEngine = new Mock <NopEngine>();

            nopEngine.Setup(x => x.ServiceProvider).Returns(serviceProvider);
            EngineContext.Replace(nopEngine.Object);
        }
示例#22
0
        public new void SetUp()
        {
            _store = new Store {
                Id = 1
            };
            _storeContext = MockRepository.GenerateMock <IStoreContext>();
            _storeContext.Expect(x => x.CurrentStore).Return(_store);

            _currency = new Currency {
                Id = 1
            };
            _workContext = MockRepository.GenerateMock <IWorkContext>();
            _workContext.Expect(x => x.WorkingCurrency).Return(_currency);

            _services = MockRepository.GenerateMock <ICommonServices>();
            _services.Expect(x => x.StoreContext).Return(_storeContext);
            _services.Expect(x => x.WorkContext).Return(_workContext);

            _discountService = MockRepository.GenerateMock <IDiscountService>();

            _categoryService     = MockRepository.GenerateMock <ICategoryService>();
            _manufacturerService = MockRepository.GenerateMock <IManufacturerService>();

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

            _downloadService = MockRepository.GenerateMock <IDownloadService>();
            _httpRequestBase = MockRepository.GenerateMock <HttpRequestBase>();
            _taxService      = MockRepository.GenerateMock <ITaxService>();

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

            _priceCalcService = new PriceCalculationService(_discountService, _categoryService, _manufacturerService, _productAttributeParser, _productService,
                                                            _shoppingCartSettings, _catalogSettings, _productAttributeService, _downloadService, _services, _httpRequestBase, _taxService, _taxSettings);
        }
示例#23
0
 /// <summary>
 /// Ctor
 /// </summary>
 /// <param name="shippingMethodRepository">Shipping method repository</param>
 /// <param name="deliveryDateRepository">Delivery date repository</param>
 /// <param name="warehouseRepository">Warehouse repository</param>
 /// <param name="pickupPointsRepository">Pickup points repository</param>
 /// <param name="logger">Logger</param>
 /// <param name="productService">Product service</param>
 /// <param name="productAttributeParser">Product attribute parser</param>
 /// <param name="checkoutAttributeParser">Checkout attribute parser</param>
 /// <param name="genericAttributeService">Generic attribute service</param>
 /// <param name="localizationService">Localization service</param>
 /// <param name="addressService">Address service</param>
 /// <param name="shippingSettings">Shipping settings</param>
 /// <param name="pluginFinder">Plugin finder</param>
 /// <param name="storeContext">Store context</param>
 /// <param name="eventPublisher">Event published</param>
 /// <param name="shoppingCartSettings">Shopping cart settings</param>
 /// <param name="cacheManager">Cache manager</param>
 public ShippingService(IRepository <ShippingMethod> shippingMethodRepository,
                        IRepository <DeliveryDate> deliveryDateRepository,
                        IRepository <Warehouse> warehouseRepository,
                        IRepository <PickupPoint> pickupPointsRepository,
                        ILogger logger,
                        IProductService productService,
                        IProductAttributeParser productAttributeParser,
                        ICheckoutAttributeParser checkoutAttributeParser,
                        IGenericAttributeService genericAttributeService,
                        ILocalizationService localizationService,
                        IAddressService addressService,
                        ShippingSettings shippingSettings,
                        IPluginFinder pluginFinder,
                        IStoreContext storeContext,
                        IEventPublisher eventPublisher,
                        ShoppingCartSettings shoppingCartSettings,
                        ICacheManager cacheManager,
                        IRepository <Product> productRepository)
 {
     this._shippingMethodRepository = shippingMethodRepository;
     this._deliveryDateRepository   = deliveryDateRepository;
     this._warehouseRepository      = warehouseRepository;
     this._pickupPointsRepository   = pickupPointsRepository;
     this._logger                  = logger;
     this._productService          = productService;
     this._productAttributeParser  = productAttributeParser;
     this._checkoutAttributeParser = checkoutAttributeParser;
     this._genericAttributeService = genericAttributeService;
     this._localizationService     = localizationService;
     this._addressService          = addressService;
     this._shippingSettings        = shippingSettings;
     this._pluginFinder            = pluginFinder;
     this._storeContext            = storeContext;
     this._eventPublisher          = eventPublisher;
     this._shoppingCartSettings    = shoppingCartSettings;
     this._cacheManager            = cacheManager;
     this._productRepository       = productRepository;
 }
示例#24
0
 public ShoppingCartService(
     IWorkContext workContext,
     IProductService productService,
     IProductAttributeParser productAttributeParser,
     ICheckoutAttributeParser checkoutAttributeParser,
     ICustomerService customerService,
     IMediator mediator,
     IUserFieldService userFieldService,
     IProductReservationService productReservationService,
     IShoppingCartValidator shoppingCartValidator,
     ShoppingCartSettings shoppingCartSettings)
 {
     _workContext             = workContext;
     _productService          = productService;
     _productAttributeParser  = productAttributeParser;
     _checkoutAttributeParser = checkoutAttributeParser;
     _customerService         = customerService;
     _mediator                  = mediator;
     _userFieldService          = userFieldService;
     _productReservationService = productReservationService;
     _shoppingCartValidator     = shoppingCartValidator;
     _shoppingCartSettings      = shoppingCartSettings;
 }
示例#25
0
 /// <summary>
 /// Ctor
 /// </summary>
 public DiscountService(ICacheManager cacheManager,
                        IRepository <Discount> discountRepository,
                        IRepository <DiscountCoupon> discountCouponRepository,
                        IRepository <DiscountUsageHistory> discountUsageHistoryRepository,
                        ILocalizationService localizationService,
                        IStoreContext storeContext,
                        IPluginFinder pluginFinder,
                        IMediator mediator,
                        ShoppingCartSettings shoppingCartSettings,
                        CatalogSettings catalogSettings
                        )
 {
     _cacheManager                   = cacheManager;
     _discountRepository             = discountRepository;
     _discountCouponRepository       = discountCouponRepository;
     _discountUsageHistoryRepository = discountUsageHistoryRepository;
     _localizationService            = localizationService;
     _storeContext                   = storeContext;
     _pluginFinder                   = pluginFinder;
     _mediator             = mediator;
     _shoppingCartSettings = shoppingCartSettings;
     _catalogSettings      = catalogSettings;
 }
示例#26
0
        public new void SetUp()
        {
            _paymentSettings = new PaymentSettings
            {
                ActivePaymentMethodSystemNames = new List <string>()
            };
            _paymentSettings.ActivePaymentMethodSystemNames.Add("Payments.TestMethod");

            _eventPublisher = new Mock <IEventPublisher>();
            _eventPublisher.Setup(x => x.Publish(It.IsAny <object>()));

            var customerService = new Mock <ICustomerService>();
            var loger           = new Mock <ILogger>();
            var webHelper       = new Mock <IWebHelper>();

            _catalogSettings = new CatalogSettings();
            var pluginService = new PluginService(_catalogSettings, customerService.Object, loger.Object, CommonHelper.DefaultFileProvider, webHelper.Object);

            _shoppingCartSettings = new ShoppingCartSettings();
            _settingService       = new Mock <ISettingService>();
            _paymentPluginManager = new PaymentPluginManager(pluginService, _settingService.Object, _paymentSettings);
            _paymentService       = new PaymentService(_paymentPluginManager, _paymentSettings, _shoppingCartSettings);
        }
示例#27
0
 public ProductAttributeFormatter(
     SmartDbContext db,
     IWorkContext workContext,
     IWebHelper webHelper,
     IProductAttributeMaterializer productAttributeMaterializer,
     ITaxService taxService,
     ICurrencyService currencyService,
     ILocalizationService localizationService,
     IPriceCalculationService priceCalculationService,
     ShoppingCartSettings shoppingCartSettings,
     CatalogSettings catalogSettings)
 {
     _db          = db;
     _workContext = workContext;
     _webHelper   = webHelper;
     _productAttributeMaterializer = productAttributeMaterializer;
     _taxService              = taxService;
     _currencyService         = currencyService;
     _localizationService     = localizationService;
     _priceCalculationService = priceCalculationService;
     _shoppingCartSettings    = shoppingCartSettings;
     _catalogSettings         = catalogSettings;
 }
示例#28
0
 public PaymentGTPayController(
     IGenericAttributeService genericAttributeService,
     IOrderProcessingService orderProcessingService,
     IOrderService orderService,
     IPaymentService paymentService,
     IPermissionService permissionService,
     ILocalizationService localizationService,
     ILogger logger,
     INotificationService notificationService,
     ISettingService settingService,
     IStoreContext storeContext,
     IWebHelper webHelper,
     IWorkContext workContext,
     ShoppingCartSettings shoppingCartSettings,
     GTPayPaymentSettings GTPayPaymentSettings,
     CurrencySettings currencySettings,
     ICurrencyService currencyService,
     IEncryptionService encryptionService)
 {
     this._genericAttributeService = genericAttributeService;
     this._orderService            = orderService;
     this._orderProcessingService  = orderProcessingService;
     this._paymentService          = paymentService;
     this._permissionService       = permissionService;
     this._localizationService     = localizationService;
     this._logger = logger;
     this._notificationService  = notificationService;
     this._settingService       = settingService;
     this._shoppingCartSettings = shoppingCartSettings;
     this._storeContext         = storeContext;
     this._webHelper            = webHelper;
     this._workContext          = workContext;
     this._GTPayPaymentSettings = GTPayPaymentSettings;
     this._currencySettings     = currencySettings;
     this._currencyService      = currencyService;
     this._encryptionService    = encryptionService;
 }
        public async Task SetUp()
        {
            _settingService = GetService <ISettingService>();

            var shippingSettings = GetService <ShippingSettings>();

            shippingSettings.ActiveShippingRateComputationMethodSystemNames.Add("FixedRateTestShippingRateComputationMethod");
            _taxSettings = GetService <TaxSettings>();
            _taxSettings.ActiveTaxProviderSystemName = "FixedTaxRateTest";
            _taxSettings.ShippingIsTaxable           = true;
            await _settingService.SaveSettingAsync(shippingSettings);

            await _settingService.SaveSettingAsync(_taxSettings);

            _orderTotalCalcService = GetService <IOrderTotalCalculationService>();
            _productService        = GetService <IProductService>();
            _customerService       = GetService <ICustomerService>();
            _discountService       = GetService <IDiscountService>();
            _shoppingCartService   = GetService <IShoppingCartService>();

            _shoppingCartSettings = GetService <ShoppingCartSettings>();

            _rewardPointsSettings = GetService <RewardPointsSettings>();

            _discount = new Discount
            {
                Name               = "Discount 1",
                DiscountType       = DiscountType.AssignedToOrderSubTotal,
                DiscountAmount     = 3,
                DiscountLimitation = DiscountLimitationType.Unlimited
            };

            _customer = await _customerService.GetCustomerByEmailAsync(NopTestsDefaults.AdminEmail);

            await GetService <IGenericAttributeService>().SaveAttributeAsync(_customer,
                                                                             NopCustomerDefaults.SelectedPaymentMethodAttribute, "Payments.TestMethod", 1);
        }
        public new void SetUp()
        {
            _shippingSettings = new ShippingSettings();
            _shippingSettings.ActiveShippingRateComputationMethodSystemNames = new List <string>();
            _shippingSettings.ActiveShippingRateComputationMethodSystemNames.Add("FixedRateTestShippingRateComputationMethod");

            _shippingMethodRepository = MockRepository.GenerateMock <IRepository <ShippingMethod> >();
            _logger = new NullLogger();
            _productAttributeParser  = MockRepository.GenerateMock <IProductAttributeParser>();
            _productService          = MockRepository.GenerateMock <IProductService>();
            _checkoutAttributeParser = MockRepository.GenerateMock <ICheckoutAttributeParser>();

            var cacheManager = new NullCache();

            var pluginFinder = new PluginFinder();

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

            _localizationService     = MockRepository.GenerateMock <ILocalizationService>();
            _genericAttributeService = MockRepository.GenerateMock <IGenericAttributeService>();
            _settingService          = MockRepository.GenerateMock <ISettingService>();

            _shoppingCartSettings = new ShoppingCartSettings();
            _shippingService      = new ShippingService(cacheManager,
                                                        _shippingMethodRepository,
                                                        _logger,
                                                        _productAttributeParser,
                                                        _productService,
                                                        _checkoutAttributeParser,
                                                        _genericAttributeService,
                                                        _localizationService,
                                                        _shippingSettings, pluginFinder, _eventPublisher,
                                                        _shoppingCartSettings,
                                                        _settingService,
                                                        this.ProviderManager);
        }
示例#31
0
 public GetWishlistHandler(
     IPermissionService permissionService,
     IShoppingCartService shoppingCartService,
     IProductService productService,
     IProductAttributeParser productAttributeParser,
     IProductAttributeFormatter productAttributeFormatter,
     ITranslationService translationService,
     ITaxService taxService,
     IPricingService priceCalculationService,
     IAclService aclService,
     IPriceFormatter priceFormatter,
     IPictureService pictureService,
     IShoppingCartValidator shoppingCartValidator,
     IHttpContextAccessor httpContextAccessor,
     LinkGenerator linkGenerator,
     ShoppingCartSettings shoppingCartSettings,
     CatalogSettings catalogSettings,
     MediaSettings mediaSettings)
 {
     _permissionService         = permissionService;
     _shoppingCartService       = shoppingCartService;
     _productService            = productService;
     _productAttributeParser    = productAttributeParser;
     _productAttributeFormatter = productAttributeFormatter;
     _translationService        = translationService;
     _taxService            = taxService;
     _pricingService        = priceCalculationService;
     _aclService            = aclService;
     _priceFormatter        = priceFormatter;
     _pictureService        = pictureService;
     _shoppingCartValidator = shoppingCartValidator;
     _httpContextAccessor   = httpContextAccessor;
     _linkGenerator         = linkGenerator;
     _shoppingCartSettings  = shoppingCartSettings;
     _catalogSettings       = catalogSettings;
     _mediaSettings         = mediaSettings;
 }
示例#32
0
 public ProductController(
     IProductService productService,
     IWorkContext workContext,
     IStoreContext storeContext,
     ILocalizationService localizationService,
     IRecentlyViewedProductsService recentlyViewedProductsService,
     IShoppingCartService shoppingCartService,
     ICompareProductsService compareProductsService,
     IAclService aclService,
     IStoreMappingService storeMappingService,
     IPermissionService permissionService,
     ICustomerActivityService customerActivityService,
     ICustomerActionEventService customerActionEventService,
     IMediator mediator,
     CatalogSettings catalogSettings,
     ShoppingCartSettings shoppingCartSettings,
     CaptchaSettings captchaSettings, IImportService importService, IRepository <Product> productRepository)
 {
     _productService                = productService;
     _workContext                   = workContext;
     _storeContext                  = storeContext;
     _localizationService           = localizationService;
     _recentlyViewedProductsService = recentlyViewedProductsService;
     _shoppingCartService           = shoppingCartService;
     _compareProductsService        = compareProductsService;
     _aclService                 = aclService;
     _storeMappingService        = storeMappingService;
     _permissionService          = permissionService;
     _customerActivityService    = customerActivityService;
     _customerActionEventService = customerActionEventService;
     _mediator             = mediator;
     _catalogSettings      = catalogSettings;
     _shoppingCartSettings = shoppingCartSettings;
     _captchaSettings      = captchaSettings;
     _importService        = importService;
     _productRepository    = productRepository;
 }
 public OrderTotalCalculationService(IWorkContext workContext,
     IStoreContext storeContext,
     IPromosPriceCalculationService promosPriceCalculationService,
     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,
     IPromoUtilities promoUtilities,
     PromoSettings promoSettings,
     IPromoService promoService,
     IAttributeValueService attributeValueService,
     ITaxServiceExtensions taxServiceExtensions,
     ICurrencyService currencyService)
     : base(workContext,
         storeContext,
         priceCalculationService,
         taxService,
         shippingService,
         paymentService,
         checkoutAttributeParser,
         discountService,
         giftCardService,
         genericAttributeService,
         taxSettings,
         rewardPointsSettings,
         shippingSettings,
         shoppingCartSettings,
         catalogSettings)
 {
     this._workContext = workContext;
     this._storeContext = storeContext;
     this._promosPriceCalculationService = promosPriceCalculationService;
     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;
     this._promoUtilities = promoUtilities;
     this._promoSettings = promoSettings;
     this._promoService = promoService;
     this._priceCalculationService = priceCalculationService;
     this._attributeValueService = attributeValueService;
     this._taxServiceExtensions = taxServiceExtensions;
     this._currencyService = currencyService;
 }