Пример #1
0
        public CheckoutController(IWorkContext workContext,
            IShoppingCartService shoppingCartService, ILocalizationService localizationService,
            ITaxService taxService, ICurrencyService currencyService,
            IPriceFormatter priceFormatter, IOrderProcessingService orderProcessingService,
            ICustomerService customerService,  ICountryService countryService,
            IStateProvinceService stateProvinceService, IShippingService shippingService,
            IPaymentService paymentService, IOrderTotalCalculationService orderTotalCalculationService,
            ILogger logger, IOrderService orderService, IWebHelper webHelper,
            OrderSettings orderSettings, RewardPointsSettings rewardPointsSettings,
            PaymentSettings paymentSettings)
        {
            this._workContext = workContext;
            this._shoppingCartService = shoppingCartService;
            this._localizationService = localizationService;
            this._taxService = taxService;
            this._currencyService = currencyService;
            this._priceFormatter = priceFormatter;
            this._orderProcessingService = orderProcessingService;
            this._customerService = customerService;
            this._countryService = countryService;
            this._stateProvinceService = stateProvinceService;
            this._shippingService = shippingService;
            this._paymentService = paymentService;
            this._orderTotalCalculationService = orderTotalCalculationService;
            this._logger = logger;
            this._orderService = orderService;
            this._webHelper = webHelper;

            this._orderSettings = orderSettings;
            this._rewardPointsSettings = rewardPointsSettings;
            this._paymentSettings = paymentSettings;
        }
 public CommonController(IPaymentService paymentService, 
     IShippingService shippingService,
     IShoppingCartService shoppingCartService,
     ICurrencyService currencyService,
     IMeasureService measureService,
     ICustomerService customerService,
     IUrlRecordService urlRecordService,
     IWebHelper webHelper,
     CurrencySettings currencySettings,
     MeasureSettings measureSettings,
     IDateTimeHelper dateTimeHelper,
     ILanguageService languageService,
     IWorkContext workContext,
     IStoreContext storeContext,
     IPermissionService permissionService,
     ILocalizationService localizationService)
 {
     this._paymentService = paymentService;
     this._shippingService = shippingService;
     this._shoppingCartService = shoppingCartService;
     this._currencyService = currencyService;
     this._measureService = measureService;
     this._customerService = customerService;
     this._urlRecordService = urlRecordService;
     this._webHelper = webHelper;
     this._currencySettings = currencySettings;
     this._measureSettings = measureSettings;
     this._dateTimeHelper = dateTimeHelper;
     this._languageService = languageService;
     this._workContext = workContext;
     this._storeContext = storeContext;
     this._permissionService = permissionService;
     this._localizationService = localizationService;
 }
Пример #3
0
 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;
 }
Пример #4
0
        public OrderController(IOrderService orderService, IWorkContext workContext,
            ICurrencyService currencyService, IPriceFormatter priceFormatter,
            IOrderProcessingService orderProcessingService,
            IDateTimeHelper dateTimeHelper, IMeasureService measureService,
            IPaymentService paymentService, ILocalizationService localizationService,
            IPdfService pdfService, ICustomerService customerService,
            IWorkflowMessageService workflowMessageService, 
            LocalizationSettings localizationSettings,
            MeasureSettings measureSettings, CatalogSettings catalogSettings,
            OrderSettings orderSettings, TaxSettings taxSettings, PdfSettings pdfSettings)
        {
            this._orderService = orderService;
            this._workContext = workContext;
            this._currencyService = currencyService;
            this._priceFormatter = priceFormatter;
            this._orderProcessingService = orderProcessingService;
            this._dateTimeHelper = dateTimeHelper;
            this._measureService = measureService;
            this._paymentService = paymentService;
            this._localizationService = localizationService;
            this._pdfService = pdfService;
            this._customerService = customerService;
            this._workflowMessageService = workflowMessageService;

            this._localizationSettings = localizationSettings;
            this._measureSettings = measureSettings;
            this._catalogSettings = catalogSettings;
            this._orderSettings = orderSettings;
            this._taxSettings = taxSettings;
            this._pdfSettings = pdfSettings;
        }
        public MessageTokenProvider(ILanguageService languageService,
            ILocalizationService localizationService, IDateTimeHelper dateTimeHelper,
            IEmailAccountService emailAccountService,
            IPriceFormatter priceFormatter, ICurrencyService currencyService,IWebHelper webHelper,
            IWorkContext workContext, IDownloadService downloadService,
            IOrderService orderService,
            StoreInformationSettings storeSettings, MessageTemplatesSettings templatesSettings,
            EmailAccountSettings emailAccountSettings, CatalogSettings catalogSettings,
            TaxSettings taxSettings)
        {
            this._languageService = languageService;
            this._localizationService = localizationService;
            this._dateTimeHelper = dateTimeHelper;
            this._emailAccountService = emailAccountService;
            this._priceFormatter = priceFormatter;
            this._currencyService = currencyService;
            this._webHelper = webHelper;
            this._workContext = workContext;
            this._downloadService = downloadService;
            this._orderService = orderService;

            this._storeSettings = storeSettings;
            this._templatesSettings = templatesSettings;
            this._emailAccountSettings = emailAccountSettings;
            this._catalogSettings = catalogSettings;
            this._taxSettings = taxSettings;
        }
 public SettingController(ISettingService settingService,
     ICountryService countryService, IStateProvinceService stateProvinceService,
     IAddressService addressService, ITaxCategoryService taxCategoryService,
     ICurrencyService currencyService, IPictureService pictureService, 
     ILocalizationService localizationService, IDateTimeHelper dateTimeHelper,
     IOrderService orderService, IEncryptionService encryptionService,
     IThemeProvider themeProvider, ICustomerService customerService, 
     ICustomerActivityService customerActivityService, IPermissionService permissionService,
     IWebHelper webHelper, IFulltextService fulltextService, 
     IMaintenanceService maintenanceService, IStoreService storeService,
     IWorkContext workContext, IGenericAttributeService genericAttributeService)
 {
     this._settingService = settingService;
     this._countryService = countryService;
     this._stateProvinceService = stateProvinceService;
     this._addressService = addressService;
     this._taxCategoryService = taxCategoryService;
     this._currencyService = currencyService;
     this._pictureService = pictureService;
     this._localizationService = localizationService;
     this._dateTimeHelper = dateTimeHelper;
     this._orderService = orderService;
     this._encryptionService = encryptionService;
     this._themeProvider = themeProvider;
     this._customerService = customerService;
     this._customerActivityService = customerActivityService;
     this._permissionService = permissionService;
     this._webHelper = webHelper;
     this._fulltextService = fulltextService;
     this._maintenanceService = maintenanceService;
     this._storeService = storeService;
     this._workContext = workContext;
     this._genericAttributeService = genericAttributeService;
 }
Пример #7
0
 public PdfService(ILocalizationService localizationService, IOrderService orderService,
     IPaymentService paymentService,
     IDateTimeHelper dateTimeHelper, IPriceFormatter priceFormatter,
     ICurrencyService currencyService, IMeasureService measureService,
     IPictureService pictureService, IProductService productService, 
     IProductAttributeParser productAttributeParser, IWebHelper webHelper, 
     CatalogSettings catalogSettings, CurrencySettings currencySettings,
     MeasureSettings measureSettings, PdfSettings pdfSettings, TaxSettings taxSettings,
     StoreInformationSettings storeInformationSettings, AddressSettings addressSettings)
 {
     this._localizationService = localizationService;
     this._orderService = orderService;
     this._paymentService = paymentService;
     this._dateTimeHelper = dateTimeHelper;
     this._priceFormatter = priceFormatter;
     this._currencyService = currencyService;
     this._measureService = measureService;
     this._pictureService = pictureService;
     this._productService = productService;
     this._productAttributeParser = productAttributeParser;
     this._webHelper = webHelper;
     this._currencySettings = currencySettings;
     this._catalogSettings = catalogSettings;
     this._measureSettings = measureSettings;
     this._pdfSettings = pdfSettings;
     this._taxSettings = taxSettings;
     this._storeInformationSettings = storeInformationSettings;
     this._addressSettings = addressSettings;
 }
        public MessageTokenProvider(ILanguageService languageService,
            ILocalizationService localizationService, IDateTimeHelper dateTimeHelper,
            IEmailAccountService emailAccountService,
            IPriceFormatter priceFormatter, ICurrencyService currencyService,IWebHelper webHelper,
            IWorkContext workContext, IDownloadService downloadService,
            IOrderService orderService, IPaymentService paymentService,
            IProductAttributeParser productAttributeParser,
            MessageTemplatesSettings templatesSettings,
            EmailAccountSettings emailAccountSettings, CatalogSettings catalogSettings,
            TaxSettings taxSettings, IEventPublisher eventPublisher)
        {
            this._languageService = languageService;
            this._localizationService = localizationService;
            this._dateTimeHelper = dateTimeHelper;
            this._emailAccountService = emailAccountService;
            this._priceFormatter = priceFormatter;
            this._currencyService = currencyService;
            this._webHelper = webHelper;
            this._workContext = workContext;
            this._downloadService = downloadService;
            this._orderService = orderService;
            this._paymentService = paymentService;
            this._productAttributeParser = productAttributeParser;

            this._templatesSettings = templatesSettings;
            this._emailAccountSettings = emailAccountSettings;
            this._catalogSettings = catalogSettings;
            this._taxSettings = taxSettings;
            this._eventPublisher = eventPublisher;
        }
 public ShippingByWeightController(IShippingService shippingService,
     IStoreService storeService,
     ICountryService countryService,
     IStateProvinceService stateProvinceService,
     ShippingByWeightSettings shippingByWeightSettings,
     IShippingByWeightService shippingByWeightService,
     ISettingService settingService,
     ILocalizationService localizationService,
     IPermissionService permissionService,
     ICurrencyService currencyService,
     CurrencySettings currencySettings,
     IMeasureService measureService,
     MeasureSettings measureSettings)
 {
     this._shippingService = shippingService;
     this._storeService = storeService;
     this._countryService = countryService;
     this._stateProvinceService = stateProvinceService;
     this._shippingByWeightSettings = shippingByWeightSettings;
     this._shippingByWeightService = shippingByWeightService;
     this._settingService = settingService;
     this._localizationService = localizationService;
     this._permissionService = permissionService;
     this._currencyService = currencyService;
     this._currencySettings = currencySettings;
     this._measureService = measureService;
     this._measureSettings = measureSettings;
 }
Пример #10
0
 public TestController(ILanguageService languageService,
     ICurrencyService currencyService, ILocalizationService localizationService,
     IWorkContext workContext, IInstallationService installationService,
     IQueuedEmailService queuedEmailService, IEmailAccountService emailAccountService,            
     IUserService userService, IWebHelper webHelper, ICacheManager cacheManager,
     IPermissionService permissionService, IMobileDeviceHelper mobileDeviceHelper,
     HttpContextBase httpContext, UserSettings userSettings, MediaSettings mediaSettings,
     SiteInformationSettings siteInformationSettings, EmailAccountSettings emailAccountSettings,
     CommonSettings commonSettings, LocalizationSettings localizationSettings)
 {
     this.languageService         = languageService;
     this.currencyService         = currencyService;
     this.localizationService     = localizationService;
     this.workContext             = workContext;
     this.queuedEmailService      = queuedEmailService;
     this.emailAccountService     = emailAccountService;
     this.installationService     = installationService;
     this.userService             = userService;
     this.webHelper               = webHelper;
     this.permissionService       = permissionService;
     this.mobileDeviceHelper      = mobileDeviceHelper;
     this.mediaSettings           = mediaSettings;
     this.httpContext             = httpContext;
     this.userSettings            = userSettings;
     this.siteInformationSettings = siteInformationSettings;
     this.emailAccountSettings    = emailAccountSettings;
     this.cacheManager            = cacheManager;
     this.commonSettings          = commonSettings;
     this.localizationSettings    = localizationSettings;
 }
        public static ShippingOption ParseShippingOption(this JObject obj, ICurrencyService currencyService)
        {
            var audCurrency = currencyService.GetCurrencyByCode("AUD");
            if (obj.HasValues)
            {
                var shippingOption = new ShippingOption();
                foreach (var property in obj.Properties())
                {
                    switch (property.Name.ToLower())
                    {
                        case "name":
                            shippingOption.Name = string.Format("Australia Post. {0}", property.Value);
                            break;
                        case "price":
                            decimal rate;
                            if (decimal.TryParse(property.Value.ToString(), out rate))
                            {
                                var convertedRate = currencyService.ConvertToPrimaryStoreCurrency(rate, audCurrency);
                                shippingOption.Rate = convertedRate;
                            }
                            break;
                    }
                }
                return shippingOption;
            }

            return null;
        }
        //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 CartItemViewModelFactory(
     IContentLoader contentLoader,
     IPricingService pricingService,
     UrlResolver urlResolver,
     ICurrentMarket currentMarket,
     ICurrencyService currencyService,
     IPromotionService promotionService,
     AppContextFacade appContext,
     ILineItemCalculator lineItemCalculator,
     IProductService productService, 
     IRelationRepository relationRepository, 
     ICartService cartService)
 {
     _contentLoader = contentLoader;
     _pricingService = pricingService;
     _urlResolver = urlResolver;
     _currentMarket = currentMarket;
     _currencyService = currencyService;
     _promotionService = promotionService;
     _appContext = appContext;
     _lineItemCalculator = lineItemCalculator;
     _productService = productService;
     _relationRepository = relationRepository;
     _cartService = cartService;
 }
Пример #14
0
 public CartService(
     IProductService productService,
     IPricingService pricingService,
     IOrderFactory orderFactory,
     CustomerContextFacade customerContext,
     IPlacedPriceProcessor placedPriceProcessor,
     IInventoryProcessor inventoryProcessor,
     ILineItemValidator lineItemValidator,
     IOrderRepository orderRepository,
     IPromotionEngine promotionEngine,
     IAddressBookService addressBookService,
     ICurrentMarket currentMarket,
     ICurrencyService currencyService)
 {
     _productService = productService;
     _pricingService = pricingService;
     _orderFactory = orderFactory;
     _customerContext = customerContext;
     _placedPriceProcessor = placedPriceProcessor;
     _inventoryProcessor = inventoryProcessor;
     _lineItemValidator = lineItemValidator;
     _promotionEngine = promotionEngine;
     _orderRepository = orderRepository;
     _addressBookService = addressBookService;
     _currentMarket = currentMarket;
     _currencyService = currencyService;
 }
Пример #15
0
        public GoogleFeedService(
			IRepository<GoogleProductRecord> gpRepository,
			IProductService productService,
			IManufacturerService manufacturerService,
			FroogleSettings settings,
			IMeasureService measureService,
			MeasureSettings measureSettings,
			IDbContext dbContext,
			AdminAreaSettings adminAreaSettings,
			ICurrencyService currencyService,
			ICommonServices services,
			IComponentContext ctx)
        {
            _gpRepository = gpRepository;
            _productService = productService;
            _manufacturerService = manufacturerService;
            Settings = settings;
            _measureService = measureService;
            _measureSettings = measureSettings;
            _dbContext = dbContext;
            _adminAreaSettings = adminAreaSettings;
            _currencyService = currencyService;
            _services = services;

            _helper = new FeedPluginHelper(ctx, "SmartStore.GoogleMerchantCenter", "SmartStore.GoogleMerchantCenter", () =>
            {
                return Settings as PromotionFeedSettings;
            });
        }
 public FroogleService(IGoogleService googleService,
     IProductService productService,
     ICategoryService categoryService,
     IManufacturerService manufacturerService,
     IPictureService pictureService,
     ICurrencyService currencyService,
     ISettingService settingService,
     IWorkContext workContext,
     IMeasureService measureService,
     MeasureSettings measureSettings,
     FroogleSettings froogleSettings,
     CurrencySettings currencySettings,
     GoogleProductObjectContext objectContext)
 {
     this._googleService = googleService;
     this._productService = productService;
     this._categoryService = categoryService;
     this._manufacturerService = manufacturerService;
     this._pictureService = pictureService;
     this._currencyService = currencyService;
     this._settingService = settingService;
     this._workContext = workContext;
     this._measureService = measureService;
     this._measureSettings = measureSettings;
     this._froogleSettings = froogleSettings;
     this._currencySettings = currencySettings;
     this._objectContext = objectContext;
 }
 public PromoController(
     IPromoUtilities promoUtilities,
     IPriceFormatter priceFormatter,
     IWorkContext workContext,
     PromoSettings promoSettings,
     IProductMappingService productMappingService,
     IProductPromoMappingService productPromoMappingService,
     IPromoDetailService promoDetailService,
     IStoreService storeService,
     IStoreContext storeContext,
     IAttributeValueService attributeValueService,
     ICurrencyService currencyService,
     IPromoPictureService promoPictureService,
     IPictureService pictureService,
     IProductService productService,
     ILocalizationService localizationService)
 {
     this._promoUtilities = promoUtilities;
     this._priceFormatter = priceFormatter;
     this._workContext = workContext;
     this._productMappingService = productMappingService;
     this._productPromoMappingService = productPromoMappingService;
     this._promoDetailService = promoDetailService;
     this._promoSettings = promoSettings;
     this._storeService = storeService;
     this._storeContext = storeContext;
     this._attributeValueService = attributeValueService;
     this._currencyService = currencyService;
     this._promoPictureService = promoPictureService;
     this._pictureService = pictureService;
     this._productService = productService;
     this._localizationService = localizationService;
 }
Пример #18
0
 public UpdateExchangeRateTask(ICurrencyService currencyService, 
     ISettingService settingService, CurrencySettings currencySettings)
 {
     this._currencyService = currencyService;
     this._settingService = settingService;
     this._currencySettings = currencySettings;
 }
 public KlarnaCheckoutController(
     IWorkContext workContext,
     ISettingService settingService,
     KlarnaCheckoutSettings settings,
     OrderSettings orderSettings,
     IRepository<KlarnaCheckoutEntity> repository,
     IOrderService orderService,
     IOrderProcessingService orderProcessingService,
     IStoreContext storeContext,
     ILogger logger,
     ICustomerService customerService,
     ICurrencyService currencyService,
     IKlarnaCheckoutHelper klarnaCheckoutHelper,
     IKlarnaCheckoutPaymentService klarnaHelper)
 {
     _workContext = workContext;
     _settingService = settingService;
     _settings = settings;
     _orderSettings = orderSettings;
     _repository = repository;
     _orderService = orderService;
     _orderProcessingService = orderProcessingService;
     _storeContext = storeContext;
     _logger = logger;
     _customerService = customerService;
     _currencyService = currencyService;
     _klarnaCheckoutHelper = klarnaCheckoutHelper;
     _klarnaCheckoutPaymentService = klarnaHelper;
 }
Пример #20
0
 public FroogleService(IScheduleTaskService scheduleTaskService,
     IGoogleService googleService,
     IProductService productService,
     ICategoryService categoryService,
     IManufacturerService manufacturerService,
     IPictureService pictureService,
     ICurrencyService currencyService,
     IWebHelper webHelper,
     ISettingService settingService,
     IWorkContext workContext,
     IMeasureService measureService,
     MeasureSettings measureSettings,
     StoreInformationSettings storeInformationSettings,
     FroogleSettings froogleSettings,
     CurrencySettings currencySettings,
     GoogleProductObjectContext objectContext)
 {
     this._scheduleTaskService = scheduleTaskService;
     this._googleService = googleService;
     this._productService = productService;
     this._categoryService = categoryService;
     this._manufacturerService = manufacturerService;
     this._pictureService = pictureService;
     this._currencyService = currencyService;
     this._webHelper = webHelper;
     this._settingService = settingService;
     this._workContext = workContext;
     this._measureService = measureService;
     this._measureSettings = measureSettings;
     this._storeInformationSettings = storeInformationSettings;
     this._froogleSettings = froogleSettings;
     this._currencySettings = currencySettings;
     this._objectContext = objectContext;
 }
Пример #21
0
 public WebWorkContext(HttpContextBase httpContext,
     ICustomerService customerService,
     IVendorService vendorService,
     IStoreContext storeContext,
     IAuthenticationService authenticationService,
     ILanguageService languageService,
     ICurrencyService currencyService,
     IGenericAttributeService genericAttributeService,
     TaxSettings taxSettings, 
     CurrencySettings currencySettings,
     LocalizationSettings localizationSettings,
     IUserAgentHelper userAgentHelper,
     IStoreMappingService storeMappingService)
 {
     this._httpContext = httpContext;
     this._customerService = customerService;
     this._vendorService = vendorService;
     this._storeContext = storeContext;
     this._authenticationService = authenticationService;
     this._languageService = languageService;
     this._currencyService = currencyService;
     this._genericAttributeService = genericAttributeService;
     this._taxSettings = taxSettings;
     this._currencySettings = currencySettings;
     this._localizationSettings = localizationSettings;
     this._userAgentHelper = userAgentHelper;
     this._storeMappingService = storeMappingService;
 }
Пример #22
0
 /// <summary>
 /// Ctor
 /// </summary>
 /// <param name="sciRepository">Shopping cart repository</param>
 /// <param name="workContext">Work context</param>
 /// <param name="currencyService">Currency service</param>
 /// <param name="productService">Product settings</param>
 /// <param name="localizationService">Localization service</param>
 /// <param name="productAttributeParser">Product attribute parser</param>
 /// <param name="checkoutAttributeService">Checkout attribute service</param>
 /// <param name="checkoutAttributeParser">Checkout attribute parser</param>
 /// <param name="priceFormatter">Price formatter</param>
 /// <param name="customerService">Customer service</param>
 /// <param name="shoppingCartSettings">Shopping cart settings</param>
 /// <param name="eventPublisher">Event publisher</param>
 /// <param name="permissionService">Permission service</param>
 /// <param name="aclService">ACL service</param>
 public ShoppingCartService(IRepository<ShoppingCartItem> sciRepository,
     IWorkContext workContext, ICurrencyService currencyService,
     IProductService productService, ILocalizationService localizationService,
     IProductAttributeParser productAttributeParser,
     ICheckoutAttributeService checkoutAttributeService,
     ICheckoutAttributeParser checkoutAttributeParser,
     IPriceFormatter priceFormatter,
     ICustomerService customerService,
     ShoppingCartSettings shoppingCartSettings,
     IEventPublisher eventPublisher,
     IPermissionService permissionService, 
     IAclService aclService)
 {
     this._sciRepository = sciRepository;
     this._workContext = workContext;
     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;
 }
 public CheckoutAttributeController(ICheckoutAttributeService checkoutAttributeService,
     ILanguageService languageService, 
     ILocalizedEntityService localizedEntityService,
     ILocalizationService localizationService,
     ITaxCategoryService taxCategoryService,
     IWorkContext workContext, 
     ICurrencyService currencyService, 
     ICustomerActivityService customerActivityService, 
     CurrencySettings currencySettings,
     IMeasureService measureService, 
     MeasureSettings measureSettings,
     IPermissionService permissionService,
     IStoreService storeService,
     IStoreMappingService storeMappingService)
 {
     this._checkoutAttributeService = checkoutAttributeService;
     this._languageService = languageService;
     this._localizedEntityService = localizedEntityService;
     this._localizationService = localizationService;
     this._taxCategoryService = taxCategoryService;
     this._workContext = workContext;
     this._currencyService = currencyService;
     this._customerActivityService = customerActivityService;
     this._currencySettings = currencySettings;
     this._measureService = measureService;
     this._measureSettings = measureSettings;
     this._permissionService = permissionService;
     this._storeService = storeService;
     this._storeMappingService = storeMappingService;
 }
        public OrderController(IOrderService orderService, 
            IShipmentService shipmentService, IWorkContext workContext,
            ICurrencyService currencyService, IPriceFormatter priceFormatter,
            IOrderProcessingService orderProcessingService, IDateTimeHelper dateTimeHelper,
            IPaymentService paymentService, ILocalizationService localizationService,
            IPdfService pdfService, IShippingService shippingService,
            ICountryService countryService, IProductAttributeParser productAttributeParser,
            IWebHelper webHelper,
            CatalogSettings catalogSettings, OrderSettings orderSettings,
            TaxSettings taxSettings, PdfSettings pdfSettings,
            ShippingSettings shippingSettings, AddressSettings addressSettings)
        {
            this._orderService = orderService;
            this._shipmentService = shipmentService;
            this._workContext = workContext;
            this._currencyService = currencyService;
            this._priceFormatter = priceFormatter;
            this._orderProcessingService = orderProcessingService;
            this._dateTimeHelper = dateTimeHelper;
            this._paymentService = paymentService;
            this._localizationService = localizationService;
            this._pdfService = pdfService;
            this._shippingService = shippingService;
            this._countryService = countryService;
            this._productAttributeParser = productAttributeParser;
            this._webHelper = webHelper;

            this._catalogSettings = catalogSettings;
            this._orderSettings = orderSettings;
            this._taxSettings = taxSettings;
            this._pdfSettings = pdfSettings;
            this._shippingSettings = shippingSettings;
            this._addressSettings = addressSettings;
        }
        public PayPalExpressController(
			IPaymentService paymentService, IOrderService orderService,
			IOrderProcessingService orderProcessingService,
			ILogger logger, 
			PaymentSettings paymentSettings, ILocalizationService localizationService,
			OrderSettings orderSettings,
			ICurrencyService currencyService, CurrencySettings currencySettings,
			IOrderTotalCalculationService orderTotalCalculationService, ICustomerService customerService,
			IGenericAttributeService genericAttributeService,
            IComponentContext ctx, ICommonServices services,
            IStoreService storeService)
        {
            _paymentService = paymentService;
            _orderService = orderService;
            _orderProcessingService = orderProcessingService;
            _logger = logger;
            _paymentSettings = paymentSettings;
            _localizationService = localizationService;
            _orderSettings = orderSettings;
            _currencyService = currencyService;
            _currencySettings = currencySettings;
            _orderTotalCalculationService = orderTotalCalculationService;
            _customerService = customerService;
            _genericAttributeService = genericAttributeService;
            _services = services;
            _storeService = storeService;

            _helper = new PluginHelper(ctx, "SmartStore.PayPal", "Plugins.Payments.PayPalExpress");

            T = NullLocalizer.Instance;
        }
 public MiscFacebookShopController(IAclService aclService,
     ICacheManager cacheManager,
     CatalogSettings catalogSettings,
     ICategoryService categoryService,
     ICurrencyService currencyService,
     ILocalizationService localizationService,
     IPermissionService permissionService,
     IPictureService pictureService,
     IPriceCalculationService priceCalculationService,
     IPriceFormatter priceFormatter,
     IProductService productService,
     IStoreContext storeContext,
     IStoreMappingService storeMappingService,
     ITaxService taxService,
     IWorkContext workContext)
 {
     this._aclService = aclService;
     this._cacheManager = cacheManager;
     this._catalogSettings = catalogSettings;
     this._categoryService = categoryService;
     this._currencyService = currencyService;
     this._localizationService = localizationService;
     this._permissionService = permissionService;
     this._pictureService = pictureService;
     this._priceCalculationService = priceCalculationService;
     this._priceFormatter = priceFormatter;
     this._productService = productService;
     this._storeContext = storeContext;
     this._storeMappingService = storeMappingService;
     this._taxService = taxService;
     this._workContext = workContext;
 }
        public ReturnRequestController(IOrderService orderService, 
            IWorkContext workContext, 
            IStoreContext storeContext,
            ICurrencyService currencyService, 
            IPriceFormatter priceFormatter,
            IOrderProcessingService orderProcessingService,
            ILocalizationService localizationService,
            ICustomerService customerService,
            IWorkflowMessageService workflowMessageService,
            IDateTimeHelper dateTimeHelper,
            LocalizationSettings localizationSettings,
            OrderSettings orderSettings)
        {
            this._orderService = orderService;
            this._workContext = workContext;
            this._storeContext = storeContext;
            this._currencyService = currencyService;
            this._priceFormatter = priceFormatter;
            this._orderProcessingService = orderProcessingService;
            this._localizationService = localizationService;
            this._customerService = customerService;
            this._workflowMessageService = workflowMessageService;
            this._dateTimeHelper = dateTimeHelper;

            this._localizationSettings = localizationSettings;
            this._orderSettings = orderSettings;
        }
        public PaymentSagePayServerController(ISettingService settingService, 
            IPaymentService paymentService, IOrderService orderService, 
            IOrderProcessingService orderProcessingService,
            ILogger logger, SagePayServerPaymentSettings sagePayServerPaymentSettings,
            PaymentSettings paymentSettings, ILocalizationService localizationService,
            IWorkContext workContext, ISagePayServerTransactionService sagePayServerTransactionService,
            IOrderTotalCalculationService orderTotalCalculationService, ICurrencyService currencyService, CurrencySettings currencySettings,
            IMobileDeviceHelper mobileDeviceHelper, OrderSettings orderSettings, HttpContextBase httpContext)
        {
            this._settingService = settingService;
            this._paymentService = paymentService;
            this._orderService = orderService;
            this._orderProcessingService = orderProcessingService;
            this._localizationService = localizationService;
            this._sagePayServerTransactionService = sagePayServerTransactionService;
            this._orderTotalCalculationService = orderTotalCalculationService;
            this._currencyService = currencyService;

            this._sagePayServerPaymentSettings = sagePayServerPaymentSettings;
            this._paymentSettings = paymentSettings;
            this._currencySettings = currencySettings;
            this._orderSettings = orderSettings;

            this._logger = logger;

            this._workContext = workContext;

            this._httpContext = httpContext;

            this._mobileDeviceHelper = mobileDeviceHelper;
        }
        public WebWorkContext(Func<string, ICacheManager> cacheManager,
            HttpContextBase httpContext,
            ICustomerService customerService,
			IStoreContext storeContext,
            IAuthenticationService authenticationService,
            ILanguageService languageService,
            ICurrencyService currencyService,
			IGenericAttributeService attrService,
            TaxSettings taxSettings, CurrencySettings currencySettings,
            LocalizationSettings localizationSettings, Lazy<ITaxService> taxService,
            IStoreService storeService, ISettingService settingService,
			IUserAgent userAgent)
        {
            this._cacheManager = cacheManager("static");
            this._httpContext = httpContext;
            this._customerService = customerService;
            this._storeContext = storeContext;
            this._authenticationService = authenticationService;
            this._languageService = languageService;
            this._attrService = attrService;
            this._currencyService = currencyService;
            this._taxSettings = taxSettings;
            this._taxService = taxService;
            this._currencySettings = currencySettings;
            this._localizationSettings = localizationSettings;
            this._storeService = storeService;
            this._settingService = settingService;
            this._userAgent = userAgent;
        }
        public CheckoutAttributeFormatter(IWorkContext workContext,
            ICheckoutAttributeService checkoutAttributeService,
            ICheckoutAttributeParser checkoutAttributeParser,
            ICurrencyService currencyService,
            ITaxService taxService,
            IPriceFormatter priceFormatter,
            IDownloadService downloadService,
            IWebHelper webHelper,
            PromoSettings promoSettings,
            IPromoUtilities qixolPromoUtilities,
            IAttributeValueService attributeValueService)
            : base(workContext, checkoutAttributeService, checkoutAttributeParser,
                    currencyService, taxService, priceFormatter,
                    downloadService, webHelper)
        {
            this._workContext = workContext;
            this._checkoutAttributeService = checkoutAttributeService;
            this._checkoutAttributeParser = checkoutAttributeParser;
            this._currencyService = currencyService;
            this._taxService = taxService;
            this._priceFormatter = priceFormatter;
            this._downloadService = downloadService;
            this._webHelper = webHelper;

            this._promoSettings = promoSettings;
            this._qixolPromoUtilities = qixolPromoUtilities;
            this._attributeValueService = attributeValueService;
        }
Пример #31
0
 public CurrencyController(ICurrencyService service)
 {
     this.currencyService = service;
 }
Пример #32
0
 public UpdateExchangeRateScheduleTask(ICurrencyService currencyService, CurrencySettings currencySettings)
 {
     this._currencyService  = currencyService;
     this._currencySettings = currencySettings;
 }
Пример #33
0
 public MemberAddressController(ICurrencyService currencyService, IMemberService memberService, IShippingAreaService shippingAreaService)
 {
     _currencyService     = currencyService;
     _memberService       = memberService;
     _shippingAreaService = shippingAreaService;
 }
Пример #34
0
 public FlowerShopCommands(DbService db, ICurrencyService cs, DiscordSocketClient client)
 {
     _db     = db;
     _cs     = cs;
     _client = client;
 }
 public CurrencyController(ICurrencyService currencyService)
 {
     _currencyService = currencyService;
 }
Пример #36
0
 public RootDialog(ICurrencyService service)
 {
     _service = service;
     _service.OnPortfolioGrowth += PortfolioGrowthHandler;
 }
Пример #37
0
 public CartVm(ICurrencyService currencyService)
 {
     _currencyService = currencyService;
 }
Пример #38
0
 public CurrenciesController(ICurrencyService currenciesService, IExchangeRateService exchangeRateService)
 {
     this.currenciesService   = currenciesService;
     this.exchangeRateService = exchangeRateService;
 }
Пример #39
0
        public static stripe.Refund CreateRefund(this RefundPaymentRequest refundPaymentRequest, StripePaymentSettings stripePaymentSettings, CurrencySettings currencySettings, ICurrencyService currencyService)
        {
            var currency = currencyService.GetCurrencyById(currencySettings.PrimaryStoreCurrencyId);

            if (currency == null)
            {
                throw new NopException("Primary store currency cannot be loaded");
            }

            if (!Enum.TryParse(currency.CurrencyCode, out StripeCurrency stripeCurrency))
            {
                throw new NopException($"The {currency.CurrencyCode} currency is not supported by Stripe");
            }

            var refundService = new stripe.RefundService(stripePaymentSettings.GetStripeClient());

            stripe.Refund refund = refundService.Create(new stripe.RefundCreateOptions()
            {
                Amount = (int)(refundPaymentRequest.AmountToRefund * 100),
                Charge = refundPaymentRequest.Order.CaptureTransactionId
            });

            return(refund);
        }
 public CountryCurrenciesController(ICountryCurrencyService countryCurrencyService, ICurrencyService currencyService, IMapper mapper)
 {
     _countryCurrencyService = countryCurrencyService;
     _currencyService        = currencyService;
     _mapper = mapper;
 }
 public OverriddenShoppingCartModelFactory(AddressSettings addressSettings,
                                           CaptchaSettings captchaSettings,
                                           CatalogSettings catalogSettings,
                                           CommonSettings commonSettings,
                                           CustomerSettings customerSettings,
                                           IAddressModelFactory addressModelFactory,
                                           ICheckoutAttributeFormatter checkoutAttributeFormatter,
                                           ICheckoutAttributeParser checkoutAttributeParser,
                                           ICheckoutAttributeService checkoutAttributeService,
                                           ICountryService countryService,
                                           ICurrencyService currencyService,
                                           ICustomerService customerService,
                                           IDiscountService discountService,
                                           IDownloadService downloadService,
                                           IGenericAttributeService genericAttributeService,
                                           IGiftCardService giftCardService,
                                           IHttpContextAccessor httpContextAccessor,
                                           ILocalizationService localizationService,
                                           IOrderProcessingService orderProcessingService,
                                           IOrderTotalCalculationService orderTotalCalculationService,
                                           IPaymentPluginManager paymentPluginManager,
                                           IPaymentService paymentService,
                                           IPermissionService permissionService,
                                           IPictureService pictureService,
                                           IPriceCalculationService priceCalculationService,
                                           IPriceFormatter priceFormatter,
                                           IProductAttributeFormatter productAttributeFormatter,
                                           IProductService productService,
                                           IShippingPluginManager shippingPluginManager,
                                           IShippingService shippingService,
                                           IShoppingCartService shoppingCartService,
                                           IStateProvinceService stateProvinceService,
                                           IStaticCacheManager cacheManager,
                                           IStoreContext storeContext,
                                           ITaxPluginManager taxPluginManager,
                                           ITaxService taxService,
                                           IUrlRecordService urlRecordService,
                                           IVendorService vendorService,
                                           IWebHelper webHelper,
                                           IWorkContext workContext,
                                           MediaSettings mediaSettings,
                                           OrderSettings orderSettings,
                                           RewardPointsSettings rewardPointsSettings,
                                           ShippingSettings shippingSettings,
                                           ShoppingCartSettings shoppingCartSettings,
                                           TaxSettings taxSettings,
                                           VendorSettings vendorSettings) : base(addressSettings,
                                                                                 captchaSettings,
                                                                                 catalogSettings,
                                                                                 commonSettings,
                                                                                 customerSettings,
                                                                                 addressModelFactory,
                                                                                 checkoutAttributeFormatter,
                                                                                 checkoutAttributeParser,
                                                                                 checkoutAttributeService,
                                                                                 countryService,
                                                                                 currencyService,
                                                                                 customerService,
                                                                                 discountService,
                                                                                 downloadService,
                                                                                 genericAttributeService,
                                                                                 giftCardService,
                                                                                 httpContextAccessor,
                                                                                 localizationService,
                                                                                 orderProcessingService,
                                                                                 orderTotalCalculationService,
                                                                                 paymentPluginManager,
                                                                                 paymentService,
                                                                                 permissionService,
                                                                                 pictureService,
                                                                                 priceCalculationService,
                                                                                 priceFormatter,
                                                                                 productAttributeFormatter,
                                                                                 productService,
                                                                                 shippingPluginManager,
                                                                                 shippingService,
                                                                                 shoppingCartService,
                                                                                 stateProvinceService,
                                                                                 cacheManager,
                                                                                 storeContext,
                                                                                 taxService,
                                                                                 urlRecordService,
                                                                                 vendorService,
                                                                                 webHelper,
                                                                                 workContext,
                                                                                 mediaSettings,
                                                                                 orderSettings,
                                                                                 rewardPointsSettings,
                                                                                 shippingSettings,
                                                                                 shoppingCartSettings,
                                                                                 taxSettings,
                                                                                 vendorSettings)
 {
     _countryService               = countryService;
     _currencyService              = currencyService;
     _genericAttributeService      = genericAttributeService;
     _giftCardService              = giftCardService;
     _httpContextAccessor          = httpContextAccessor;
     _orderTotalCalculationService = orderTotalCalculationService;
     _paymentService               = paymentService;
     _priceCalculationService      = priceCalculationService;
     _priceFormatter               = priceFormatter;
     _shippingPluginManager        = shippingPluginManager;
     _shoppingCartService          = shoppingCartService;
     _stateProvinceService         = stateProvinceService;
     _storeContext         = storeContext;
     _taxPluginManager     = taxPluginManager;
     _taxService           = taxService;
     _workContext          = workContext;
     _rewardPointsSettings = rewardPointsSettings;
     _shippingSettings     = shippingSettings;
     _taxSettings          = taxSettings;
 }
Пример #42
0
 public GiftCardService(SmartDbContext db, ICurrencyService currencyService)
 {
     _db = db;
     _primaryCurrency = currencyService.PrimaryCurrency;
 }
Пример #43
0
        public CommonController(ICategoryService categoryService,
                                IProductService productService,
                                IManufacturerService manufacturerService,
                                ITopicService topicService,
                                ILanguageService languageService,
                                ICurrencyService currencyService,
                                ILocalizationService localizationService,
                                IWorkContext workContext,
                                IStoreContext storeContext,
                                IQueuedEmailService queuedEmailService,
                                IEmailAccountService emailAccountService,
                                ISitemapGenerator sitemapGenerator,
                                IThemeContext themeContext,
                                IThemeProvider themeProvider,
                                IForumService forumService,
                                IGenericAttributeService genericAttributeService,
                                IWebHelper webHelper,
                                IPermissionService permissionService,
                                IMobileDeviceHelper mobileDeviceHelper,
                                HttpContextBase httpContext,
                                ICacheManager cacheManager,
                                ICustomerActivityService customerActivityService,
                                CustomerSettings customerSettings,
                                TaxSettings taxSettings,
                                CatalogSettings catalogSettings,
                                StoreInformationSettings storeInformationSettings,
                                EmailAccountSettings emailAccountSettings,
                                CommonSettings commonSettings,
                                BlogSettings blogSettings,
                                NewsSettings newsSettings,
                                ForumSettings forumSettings,
                                LocalizationSettings localizationSettings,
                                CaptchaSettings captchaSettings)
        {
            this._categoryService         = categoryService;
            this._productService          = productService;
            this._manufacturerService     = manufacturerService;
            this._topicService            = topicService;
            this._languageService         = languageService;
            this._currencyService         = currencyService;
            this._localizationService     = localizationService;
            this._workContext             = workContext;
            this._storeContext            = storeContext;
            this._queuedEmailService      = queuedEmailService;
            this._emailAccountService     = emailAccountService;
            this._sitemapGenerator        = sitemapGenerator;
            this._themeContext            = themeContext;
            this._themeProvider           = themeProvider;
            this._forumservice            = forumService;
            this._genericAttributeService = genericAttributeService;
            this._webHelper               = webHelper;
            this._permissionService       = permissionService;
            this._mobileDeviceHelper      = mobileDeviceHelper;
            this._httpContext             = httpContext;
            this._cacheManager            = cacheManager;
            this._customerActivityService = customerActivityService;

            this._customerSettings         = customerSettings;
            this._taxSettings              = taxSettings;
            this._catalogSettings          = catalogSettings;
            this._storeInformationSettings = storeInformationSettings;
            this._emailAccountSettings     = emailAccountSettings;
            this._commonSettings           = commonSettings;
            this._blogSettings             = blogSettings;
            this._newsSettings             = newsSettings;
            this._forumSettings            = forumSettings;
            this._localizationSettings     = localizationSettings;
            this._captchaSettings          = captchaSettings;
        }
Пример #44
0
 public Pokemon(DbService db, ICurrencyService cs)
 {
     _db = db;
     _cs = cs;
 }
Пример #45
0
 public CommonModelFactory(BlogSettings blogSettings,
                           CaptchaSettings captchaSettings,
                           CatalogSettings catalogSettings,
                           CommonSettings commonSettings,
                           CustomerSettings customerSettings,
                           DisplayDefaultFooterItemSettings displayDefaultFooterItemSettings,
                           ForumSettings forumSettings,
                           IActionContextAccessor actionContextAccessor,
                           IBlogService blogService,
                           ICacheKeyService cacheKeyService,
                           ICategoryService categoryService,
                           ICurrencyService currencyService,
                           ICustomerService customerService,
                           IForumService forumService,
                           IGenericAttributeService genericAttributeService,
                           IHttpContextAccessor httpContextAccessor,
                           ILanguageService languageService,
                           ILocalizationService localizationService,
                           IManufacturerService manufacturerService,
                           INewsService newsService,
                           INopFileProvider fileProvider,
                           IPageHeadBuilder pageHeadBuilder,
                           IPermissionService permissionService,
                           IPictureService pictureService,
                           IProductService productService,
                           IProductTagService productTagService,
                           IShoppingCartService shoppingCartService,
                           ISitemapGenerator sitemapGenerator,
                           IStaticCacheManager staticCacheManager,
                           IStoreContext storeContext,
                           IThemeContext themeContext,
                           IThemeProvider themeProvider,
                           ITopicService topicService,
                           IUrlHelperFactory urlHelperFactory,
                           IUrlRecordService urlRecordService,
                           IWebHelper webHelper,
                           IWorkContext workContext,
                           LocalizationSettings localizationSettings,
                           MediaSettings mediaSettings,
                           NewsSettings newsSettings,
                           SitemapSettings sitemapSettings,
                           SitemapXmlSettings sitemapXmlSettings,
                           StoreInformationSettings storeInformationSettings,
                           VendorSettings vendorSettings)
 {
     _blogSettings     = blogSettings;
     _captchaSettings  = captchaSettings;
     _catalogSettings  = catalogSettings;
     _commonSettings   = commonSettings;
     _customerSettings = customerSettings;
     _displayDefaultFooterItemSettings = displayDefaultFooterItemSettings;
     _forumSettings           = forumSettings;
     _actionContextAccessor   = actionContextAccessor;
     _blogService             = blogService;
     _cacheKeyService         = cacheKeyService;
     _categoryService         = categoryService;
     _currencyService         = currencyService;
     _customerService         = customerService;
     _forumService            = forumService;
     _genericAttributeService = genericAttributeService;
     _httpContextAccessor     = httpContextAccessor;
     _languageService         = languageService;
     _localizationService     = localizationService;
     _manufacturerService     = manufacturerService;
     _newsService             = newsService;
     _fileProvider            = fileProvider;
     _pageHeadBuilder         = pageHeadBuilder;
     _permissionService       = permissionService;
     _pictureService          = pictureService;
     _productService          = productService;
     _productTagService       = productTagService;
     _shoppingCartService     = shoppingCartService;
     _sitemapGenerator        = sitemapGenerator;
     _staticCacheManager      = staticCacheManager;
     _storeContext            = storeContext;
     _themeContext            = themeContext;
     _themeProvider           = themeProvider;
     _topicService            = topicService;
     _urlHelperFactory        = urlHelperFactory;
     _urlRecordService        = urlRecordService;
     _webHelper                = webHelper;
     _workContext              = workContext;
     _mediaSettings            = mediaSettings;
     _localizationSettings     = localizationSettings;
     _newsSettings             = newsSettings;
     _sitemapSettings          = sitemapSettings;
     _sitemapXmlSettings       = sitemapXmlSettings;
     _storeInformationSettings = storeInformationSettings;
     _vendorSettings           = vendorSettings;
 }
Пример #46
0
 public GoodsTypeController(ICurrencyService currencyService)
 {
     _currencyService = currencyService;
 }
Пример #47
0
 public HomeController()
 {
     service = new CurrencyService();
 }
Пример #48
0
 public GraphService(ICurrencyService currencyService, IMemoryCache memoryCache)
 {
     _currencyService = currencyService;
     _cache           = memoryCache;
 }
Пример #49
0
 public CommonModelFactory(ICategoryService categoryService,
                           IProductService productService,
                           IManufacturerService manufacturerService,
                           ITopicService topicService,
                           ILanguageService languageService,
                           ICurrencyService currencyService,
                           ILocalizationService localizationService,
                           IWorkContext workContext,
                           IStoreContext storeContext,
                           ISitemapGenerator sitemapGenerator,
                           IThemeContext themeContext,
                           IThemeProvider themeProvider,
                           IForumService forumService,
                           IGenericAttributeService genericAttributeService,
                           IWebHelper webHelper,
                           IPermissionService permissionService,
                           IStaticCacheManager cacheManager,
                           IPageHeadBuilder pageHeadBuilder,
                           IPictureService pictureService,
                           IHostingEnvironment hostingEnvironment,
                           CatalogSettings catalogSettings,
                           StoreInformationSettings storeInformationSettings,
                           CommonSettings commonSettings,
                           BlogSettings blogSettings,
                           NewsSettings newsSettings,
                           ForumSettings forumSettings,
                           LocalizationSettings localizationSettings,
                           CaptchaSettings captchaSettings,
                           VendorSettings vendorSettings,
                           IProductTagService productTagService)
 {
     this._categoryService         = categoryService;
     this._productService          = productService;
     this._manufacturerService     = manufacturerService;
     this._topicService            = topicService;
     this._languageService         = languageService;
     this._currencyService         = currencyService;
     this._localizationService     = localizationService;
     this._workContext             = workContext;
     this._storeContext            = storeContext;
     this._sitemapGenerator        = sitemapGenerator;
     this._themeContext            = themeContext;
     this._themeProvider           = themeProvider;
     this._forumservice            = forumService;
     this._genericAttributeService = genericAttributeService;
     this._webHelper                = webHelper;
     this._permissionService        = permissionService;
     this._cacheManager             = cacheManager;
     this._pageHeadBuilder          = pageHeadBuilder;
     this._pictureService           = pictureService;
     this._hostingEnvironment       = hostingEnvironment;
     this._catalogSettings          = catalogSettings;
     this._storeInformationSettings = storeInformationSettings;
     this._commonSettings           = commonSettings;
     this._blogSettings             = blogSettings;
     this._newsSettings             = newsSettings;
     this._forumSettings            = forumSettings;
     this._localizationSettings     = localizationSettings;
     this._captchaSettings          = captchaSettings;
     this._vendorSettings           = vendorSettings;
     this._productTagService        = productTagService;
 }
Пример #50
0
 public CurrencyViewModelService(ICurrencyService currencyService,
                                 ISettingService settingService)
 {
     _currencyService = currencyService;
     _settingService  = settingService;
 }
 public SetupCurrency(ICurrencyService currencyService, ITaxRateManager taxRateManager, ICountryService countryService)
 {
     _currencyService = currencyService;
     _taxRateManager  = taxRateManager;
     _countryService  = countryService;
 }
Пример #52
0
 public CreditController()
 {
     incomeService   = new UserIncomeService();
     roleService     = new SiteRoleService();
     currencyService = new CurrencyService();
 }
Пример #53
0
        public new void SetUp()
        {
            _workContext = new Mock <IWorkContext>();
            _workContext.Setup(w => w.WorkingCurrency).Returns(new Currency {
                RoundingType = RoundingType.Rounding001
            });

            _currencySettings = new CurrencySettings();
            var currency1 = new Currency
            {
                Id               = 1,
                Name             = "Euro",
                CurrencyCode     = "EUR",
                DisplayLocale    = "",
                CustomFormatting = "€0.00",
                DisplayOrder     = 1,
                Published        = true,
                CreatedOnUtc     = DateTime.UtcNow,
                UpdatedOnUtc     = DateTime.UtcNow
            };
            var currency2 = new Currency
            {
                Id               = 1,
                Name             = "US Dollar",
                CurrencyCode     = "USD",
                DisplayLocale    = "en-US",
                CustomFormatting = "",
                DisplayOrder     = 2,
                Published        = true,
                CreatedOnUtc     = DateTime.UtcNow,
                UpdatedOnUtc     = DateTime.UtcNow
            };

            _currencyRepo = new Mock <IRepository <Currency> >();
            _currencyRepo.Setup(x => x.Table).Returns(new List <Currency> {
                currency1, currency2
            }.AsQueryable());

            _storeMappingService = new Mock <IStoreMappingService>();
            _measureService      = new Mock <IMeasureService>();

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

            var pluginService = new FakePluginService();

            _exchangeRatePluginManager = new ExchangeRatePluginManager(_currencySettings, new Mock <ICustomerService>().Object, pluginService);
            _currencyService           = new CurrencyService(_currencySettings,
                                                             new FakeCacheKeyService(),
                                                             null,
                                                             _exchangeRatePluginManager,
                                                             _currencyRepo.Object,
                                                             _storeMappingService.Object);

            _taxSettings = new TaxSettings();

            _localizationService = new Mock <ILocalizationService>();
            _localizationService.Setup(x => x.GetResource("Products.InclTaxSuffix", 1, false, string.Empty, false)).Returns("{0} incl tax");
            _localizationService.Setup(x => x.GetResource("Products.ExclTaxSuffix", 1, false, string.Empty, false)).Returns("{0} excl tax");

            _priceFormatter = new PriceFormatter(_currencySettings, _currencyService, _localizationService.Object,
                                                 _measureService.Object, _workContext.Object, _taxSettings);

            var nopEngine = new Mock <NopEngine>();

            nopEngine.Setup(x => x.ServiceProvider).Returns(new TestServiceProvider());
            EngineContext.Replace(nopEngine.Object);
        }
Пример #54
0
 public PlantPickCommands(ICurrencyService cs, DbService db)
 {
     _cs = cs;
     _db = db;
 }
Пример #55
0
        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,
                                                   _eventPublisher,
                                                   _currencyService,
                                                   cacheManager,
                                                   _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 BPaymentService(ICurrencyService currencyService)
 {
     _currencyService = currencyService;
 }
        public void TestInitialize()
        {
            //color choosing via DropDownList
            ca1 = new CheckoutAttribute {
                Id                   = "1",
                Name                 = "Color",
                TextPrompt           = "Select color:",
                IsRequired           = true,
                AttributeControlType = AttributeControlType.DropdownList,
                DisplayOrder         = 1,
            };
            cav1_1 = new CheckoutAttributeValue {
                Id           = "11",
                Name         = "Green",
                DisplayOrder = 1,
                //CheckoutAttribute = ca1,
                CheckoutAttributeId = ca1.Id,
            };
            cav1_2 = new CheckoutAttributeValue {
                Id           = "12",
                Name         = "Red",
                DisplayOrder = 2,
                //CheckoutAttribute = ca1,
                CheckoutAttributeId = ca1.Id,
            };
            ca1.CheckoutAttributeValues.Add(cav1_1);
            ca1.CheckoutAttributeValues.Add(cav1_2);

            //choosing via CheckBox'es
            ca2 = new CheckoutAttribute {
                Id                   = "2",
                Name                 = "Custom option",
                TextPrompt           = "Select custom option:",
                IsRequired           = true,
                AttributeControlType = AttributeControlType.Checkboxes,
                DisplayOrder         = 2,
                //CheckoutAttributeValues
            };

            cav2_1 = new CheckoutAttributeValue {
                Id           = "21",
                Name         = "Option 1",
                DisplayOrder = 1,
                //CheckoutAttribute = ca2,
                CheckoutAttributeId = ca2.Id,
            };
            cav2_2 = new CheckoutAttributeValue {
                Id           = "22",
                Name         = "Option 2",
                DisplayOrder = 2,
                //CheckoutAttribute = ca2,
                CheckoutAttributeId = ca2.Id,
            };
            ca2.CheckoutAttributeValues.Add(cav2_1);
            ca2.CheckoutAttributeValues.Add(cav2_2);

            //via MultiTextBoxes
            ca3 = new CheckoutAttribute {
                Id                   = "3",
                Name                 = "Custom text",
                TextPrompt           = "Enter custom text:",
                IsRequired           = true,
                AttributeControlType = AttributeControlType.MultilineTextbox,
                DisplayOrder         = 3,
            };



            var tempCheckoutAttributeRepo = new Mock <IRepository <CheckoutAttribute> >();
            {
                var IMongoCollection = new Mock <IMongoCollection <CheckoutAttribute> >().Object;
                IMongoCollection.InsertOne(ca1);
                IMongoCollection.InsertOne(ca2);
                IMongoCollection.InsertOne(ca3);
                tempCheckoutAttributeRepo.Setup(x => x.Table).Returns(IMongoCollection.AsQueryable());
                tempCheckoutAttributeRepo.Setup(x => x.GetByIdAsync(ca1.Id)).ReturnsAsync(ca1);
                tempCheckoutAttributeRepo.Setup(x => x.GetByIdAsync(ca2.Id)).ReturnsAsync(ca2);
                tempCheckoutAttributeRepo.Setup(x => x.GetByIdAsync(ca3.Id)).ReturnsAsync(ca3);
                _checkoutAttributeRepo = tempCheckoutAttributeRepo.Object;
            }

            var cacheManager = new TestMemoryCacheManager(new Mock <IMemoryCache>().Object);

            _storeMappingService = new Mock <IStoreMappingService>().Object;



            var tempEventPublisher = new Mock <IMediator>();

            {
                //tempEventPublisher.Setup(x => x.PublishAsync(It.IsAny<object>()));
                _eventPublisher = tempEventPublisher.Object;
            }


            _checkoutAttributeService = new CheckoutAttributeService(cacheManager, _checkoutAttributeRepo,
                                                                     _storeMappingService, _eventPublisher, null, null);

            _checkoutAttributeParser = new CheckoutAttributeParser(_checkoutAttributeService);



            var workingLanguage = new Language();
            var tempWorkContext = new Mock <IWorkContext>();

            {
                tempWorkContext.Setup(x => x.WorkingLanguage).Returns(workingLanguage);
                _workContext = tempWorkContext.Object;
            }
            _currencyService = new Mock <ICurrencyService>().Object;
            _taxService      = new Mock <ITaxService>().Object;
            _priceFormatter  = new Mock <IPriceFormatter>().Object;
            _downloadService = new Mock <IDownloadService>().Object;
            _webHelper       = new Mock <IWebHelper>().Object;

            _checkoutAttributeFormatter = new CheckoutAttributeFormatter(_workContext,
                                                                         _checkoutAttributeService,
                                                                         _checkoutAttributeParser,
                                                                         _currencyService,
                                                                         _taxService,
                                                                         _priceFormatter,
                                                                         _downloadService,
                                                                         _webHelper);
        }
Пример #58
0
        public PlantPickService(DbService db, CommandHandler cmd, NadekoBot bot, NadekoStrings strings,
                                IDataCache cache, FontProvider fonts, IBotConfigProvider bc, ICurrencyService cs,
                                CommandHandler cmdHandler, DiscordSocketClient client)
        {
            _db         = db;
            _strings    = strings;
            _images     = cache.LocalImages;
            _fonts      = fonts;
            _bc         = bc;
            _log        = LogManager.GetCurrentClassLogger();
            _cs         = cs;
            _cmdHandler = cmdHandler;
            _rng        = new NadekoRandom();
            _client     = client;

            cmd.OnMessageNoTrigger += PotentialFlowerGeneration;

            _generationChannels = new ConcurrentHashSet <ulong>(bot
                                                                .AllGuildConfigs
                                                                .SelectMany(c => c.GenerateCurrencyChannelIds.Select(obj => obj.ChannelId)));
        }
Пример #59
0
 public OrderLineExportVm(ICurrencyService currencyService) : base(currencyService)
 {
     _currencyService = currencyService;
 }
        /// <summary>
        /// Format base price (PAngV)
        /// </summary>
        /// <param name="product">Product</param>
        /// <param name="productPrice">Product price (in primary currency). Pass null if you want to use a default produce price</param>
        /// <param name="localizationService">Localization service</param>
        /// <param name="measureService">Measure service</param>
        /// <param name="currencyService">Currency service</param>
        /// <param name="workContext">Work context</param>
        /// <param name="priceFormatter">Price formatter</param>
        /// <returns>Base price</returns>
        public static string FormatBasePrice(this Product product, decimal?productPrice, ILocalizationService localizationService,
                                             IMeasureService measureService, ICurrencyService currencyService,
                                             IWorkContext workContext, IPriceFormatter priceFormatter)
        {
            if (product == null)
            {
                throw new ArgumentNullException("product");
            }

            if (localizationService == null)
            {
                throw new ArgumentNullException("localizationService");
            }

            if (measureService == null)
            {
                throw new ArgumentNullException("measureService");
            }

            if (currencyService == null)
            {
                throw new ArgumentNullException("currencyService");
            }

            if (workContext == null)
            {
                throw new ArgumentNullException("workContext");
            }

            if (priceFormatter == null)
            {
                throw new ArgumentNullException("priceFormatter");
            }

            if (!product.BasepriceEnabled)
            {
                return(null);
            }

            var productAmount = product.BasepriceAmount;

            //Amount in product cannot be 0
            if (productAmount == 0)
            {
                return(null);
            }
            var referenceAmount = product.BasepriceBaseAmount;
            var productUnit     = measureService.GetMeasureWeightById(product.BasepriceUnitId);

            //measure weight cannot be loaded
            if (productUnit == null)
            {
                return(null);
            }
            var referenceUnit = measureService.GetMeasureWeightById(product.BasepriceBaseUnitId);

            //measure weight cannot be loaded
            if (referenceUnit == null)
            {
                return(null);
            }

            productPrice = productPrice.HasValue ? productPrice.Value : product.Price;

            decimal basePrice = productPrice.Value /
                                //do not round. otherwise, it can cause issues
                                measureService.ConvertWeight(productAmount, productUnit, referenceUnit, false) *
                                referenceAmount;
            decimal basePriceInCurrentCurrency = currencyService.ConvertFromPrimaryStoreCurrency(basePrice, workContext.WorkingCurrency);
            string  basePriceStr = priceFormatter.FormatPrice(basePriceInCurrentCurrency, true, false);

            var result = string.Format(localizationService.GetResource("Products.BasePrice"),
                                       basePriceStr, referenceAmount.ToString("G29"), referenceUnit.Name);

            return(result);
        }