public OrderViewModelService(
     IOrderService orderService,
     IStoreContext storeContext,
     IWorkContext workContext,
     IDateTimeHelper dateTimeHelper,
     ILocalizationService localizationService,
     ICurrencyService currencyService,
     IOrderProcessingService orderProcessingService,
     IPriceFormatter priceFormatter,
     IDownloadService downloadService,
     IProductAttributeParser productAttributeParser,
     IProductService productService,
     ICountryService countryService,
     IAddressViewModelService addressViewModelService,
     IShipmentService shipmentService,
     IPaymentService paymentService,
     IGiftCardService giftCardService,
     IShippingService shippingService,
     IRewardPointsService rewardPointsService,
     IOrderTotalCalculationService orderTotalCalculationService,
     IServiceProvider serviceProvider,
     OrderSettings orderSettings,
     PdfSettings pdfSettings,
     TaxSettings taxSettings,
     CatalogSettings catalogSettings,
     ShippingSettings shippingSettings,
     RewardPointsSettings rewardPointsSettings)
 {
     _orderService                 = orderService;
     _storeContext                 = storeContext;
     _workContext                  = workContext;
     _dateTimeHelper               = dateTimeHelper;
     _localizationService          = localizationService;
     _currencyService              = currencyService;
     _orderProcessingService       = orderProcessingService;
     _priceFormatter               = priceFormatter;
     _downloadService              = downloadService;
     _productAttributeParser       = productAttributeParser;
     _productService               = productService;
     _countryService               = countryService;
     _addressViewModelService      = addressViewModelService;
     _shipmentService              = shipmentService;
     _paymentService               = paymentService;
     _giftCardService              = giftCardService;
     _shippingService              = shippingService;
     _rewardPointsService          = rewardPointsService;
     _orderTotalCalculationService = orderTotalCalculationService;
     _serviceProvider              = serviceProvider;
     _orderSettings                = orderSettings;
     _pdfSettings                  = pdfSettings;
     _taxSettings                  = taxSettings;
     _catalogSettings              = catalogSettings;
     _shippingSettings             = shippingSettings;
     _rewardPointsSettings         = rewardPointsSettings;
 }
Beispiel #2
0
        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,
                               IDownloadService downloadService,
                               IAddressAttributeFormatter addressAttributeFormatter,
                               IStoreContext storeContext,
                               IOrderTotalCalculationService orderTotalCalculationService,
                               IRewardPointService rewardPointService,
                               CatalogSettings catalogSettings,
                               OrderSettings orderSettings,
                               TaxSettings taxSettings,
                               ShippingSettings shippingSettings,
                               AddressSettings addressSettings,
                               RewardPointsSettings rewardPointsSettings,
                               PdfSettings pdfSettings)
        {
            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._downloadService              = downloadService;
            this._addressAttributeFormatter    = addressAttributeFormatter;
            this._storeContext                 = storeContext;
            this._orderTotalCalculationService = orderTotalCalculationService;
            this._rewardPointService           = rewardPointService;

            this._catalogSettings      = catalogSettings;
            this._orderSettings        = orderSettings;
            this._taxSettings          = taxSettings;
            this._shippingSettings     = shippingSettings;
            this._addressSettings      = addressSettings;
            this._rewardPointsSettings = rewardPointsSettings;
            this._pdfSettings          = pdfSettings;
        }
 public CheckoutConfirmMapper(
     ICommonServices services,
     OrderSettings orderSettings,
     PaymentSettings paymentSettings,
     ShoppingCartSettings shoppingCartSettings)
 {
     _services             = services;
     _orderSettings        = orderSettings;
     _paymentSettings      = paymentSettings;
     _shoppingCartSettings = shoppingCartSettings;
 }
 public GetNavigationHandler(
     CustomerSettings customerSettings,
     LoyaltyPointsSettings loyaltyPointsSettings,
     OrderSettings orderSettings,
     VendorSettings vendorSettings)
 {
     _customerSettings      = customerSettings;
     _loyaltyPointsSettings = loyaltyPointsSettings;
     _orderSettings         = orderSettings;
     _vendorSettings        = vendorSettings;
 }
 public IsReturnRequestAllowedQueryHandler(
     IShipmentService shipmentService,
     IProductService productService,
     IMediator mediator,
     OrderSettings orderSettings)
 {
     _shipmentService = shipmentService;
     _productService  = productService;
     _mediator        = mediator;
     _orderSettings   = orderSettings;
 }
        public void OrderSettingsEqualityComparer_test_settings_are_not_equals()
        {
            StrategyHeader strategy1 = new StrategyHeader(1, "Strategy 1", "BP12345-RF-01", "RTS-9.13_FT", 10);
            StrategyHeader strategy2 = new StrategyHeader(2, "Strategy 2", "BP12345-RF-01", "RTS-9.13_FT", 10);
            OrderSettings  os1       = new OrderSettings(strategy1, 60);
            OrderSettings  os2       = new OrderSettings(strategy2, 60);

            OrderSettingsComparer comparer = new OrderSettingsComparer();

            Assert.IsFalse(comparer.Equals(os1, os2));
        }
Beispiel #7
0
 public GetNavigationHandler(
     CustomerSettings customerSettings,
     RewardPointsSettings rewardPointsSettings,
     OrderSettings orderSettings,
     VendorSettings vendorSettings)
 {
     _customerSettings     = customerSettings;
     _rewardPointsSettings = rewardPointsSettings;
     _orderSettings        = orderSettings;
     _vendorSettings       = vendorSettings;
 }
 public OrderModelFactory(AddressSettings addressSettings,
                          CatalogSettings catalogSettings,
                          IAddressModelFactory addressModelFactory,
                          ICountryService countryService,
                          ICurrencyService currencyService,
                          IDateTimeHelper dateTimeHelper,
                          IDownloadService downloadService,
                          ILocalizationService localizationService,
                          IOrderProcessingService orderProcessingService,
                          IOrderService orderService,
                          IOrderTotalCalculationService orderTotalCalculationService,
                          IPaymentService paymentService,
                          IPriceFormatter priceFormatter,
                          IProductService productService,
                          IRewardPointService rewardPointService,
                          IShipmentService shipmentService,
                          IStoreContext storeContext,
                          IUrlRecordService urlRecordService,
                          IVendorService vendorService,
                          IWorkContext workContext,
                          OrderSettings orderSettings,
                          PdfSettings pdfSettings,
                          RewardPointsSettings rewardPointsSettings,
                          ShippingSettings shippingSettings,
                          TaxSettings taxSettings,
                          VendorSettings vendorSettings)
 {
     this._addressSettings              = addressSettings;
     this._catalogSettings              = catalogSettings;
     this._addressModelFactory          = addressModelFactory;
     this._countryService               = countryService;
     this._currencyService              = currencyService;
     this._dateTimeHelper               = dateTimeHelper;
     this._downloadService              = downloadService;
     this._localizationService          = localizationService;
     this._orderProcessingService       = orderProcessingService;
     this._orderService                 = orderService;
     this._orderTotalCalculationService = orderTotalCalculationService;
     this._paymentService               = paymentService;
     this._priceFormatter               = priceFormatter;
     this._productService               = productService;
     this._rewardPointService           = rewardPointService;
     this._shipmentService              = shipmentService;
     this._storeContext                 = storeContext;
     this._urlRecordService             = urlRecordService;
     this._vendorService                = vendorService;
     this._workContext          = workContext;
     this._orderSettings        = orderSettings;
     this._pdfSettings          = pdfSettings;
     this._rewardPointsSettings = rewardPointsSettings;
     this._shippingSettings     = shippingSettings;
     this._taxSettings          = taxSettings;
     this._vendorSettings       = vendorSettings;
 }
Beispiel #9
0
        public void OrderSettings_constructor_test()
        {
            StrategyHeader strategyHeader    = new StrategyHeader(1, "Strategy 1", "BP12345-RF-01", "RTS-9.13_FT", 10);
            int            timeToLiveSeconds = 60;

            OrderSettings orderSettings = new OrderSettings(strategyHeader, timeToLiveSeconds);

            Assert.IsTrue(orderSettings.Id > 0);
            Assert.AreEqual(strategyHeader, orderSettings.Strategy);
            Assert.AreEqual(strategyHeader.Id, orderSettings.StrategyId);
            Assert.AreEqual(timeToLiveSeconds, orderSettings.TimeToLive);
        }
Beispiel #10
0
        public AdapterSortable(Context context, OrderSettings <T> orderSettings = null) : base(context)
        {
            if (orderSettings == null)
            {
                OrderSettings = new OrderSettings <T>(DefaultSortOrder, DefaultSortOrderPropertyName);
            }

            else
            {
                OrderSettings = orderSettings;
            }
        }
Beispiel #11
0
 public GetConfirmOrderHandler(IOrderProcessingService orderProcessingService,
                               ICurrencyService currencyService,
                               IPriceFormatter priceFormatter,
                               ILocalizationService localizationService,
                               OrderSettings orderSettings)
 {
     _orderProcessingService = orderProcessingService;
     _currencyService        = currencyService;
     _priceFormatter         = priceFormatter;
     _localizationService    = localizationService;
     _orderSettings          = orderSettings;
 }
Beispiel #12
0
 public AbcProductModelFactory(
     CaptchaSettings captchaSettings,
     CatalogSettings catalogSettings,
     CustomerSettings customerSettings,
     ICategoryService categoryService,
     ICurrencyService currencyService,
     ICustomerService customerService,
     IDateRangeService dateRangeService,
     IDateTimeHelper dateTimeHelper,
     IDownloadService downloadService,
     IGenericAttributeService genericAttributeService,
     ILocalizationService localizationService,
     IManufacturerService manufacturerService,
     IPermissionService permissionService,
     IPictureService pictureService,
     IPriceCalculationService priceCalculationService,
     IPriceFormatter priceFormatter,
     IProductAttributeParser productAttributeParser,
     IProductAttributeService productAttributeService,
     IProductService productService,
     IProductTagService productTagService,
     IProductTemplateService productTemplateService,
     IReviewTypeService reviewTypeService,
     ISpecificationAttributeService specificationAttributeService,
     IStaticCacheManager staticCacheManager,
     IStoreContext storeContext,
     IShoppingCartModelFactory shoppingCartModelFactory,
     ITaxService taxService,
     IUrlRecordService urlRecordService,
     IVendorService vendorService,
     IWebHelper webHelper,
     IWorkContext workContext,
     MediaSettings mediaSettings,
     OrderSettings orderSettings,
     SeoSettings seoSettings,
     ShippingSettings shippingSettings,
     VendorSettings vendorSettings,
     IAbcMattressListingPriceService abcMattressListingPriceService)
     : base(captchaSettings, catalogSettings, customerSettings,
            categoryService, currencyService, customerService, dateRangeService,
            dateTimeHelper, downloadService, genericAttributeService, localizationService,
            manufacturerService, permissionService, pictureService, priceCalculationService,
            priceFormatter, productAttributeParser, productAttributeService, productService,
            productTagService, productTemplateService, reviewTypeService, specificationAttributeService,
            staticCacheManager, storeContext, shoppingCartModelFactory, taxService, urlRecordService,
            vendorService, webHelper, workContext, mediaSettings, orderSettings, seoSettings,
            shippingSettings, vendorSettings
            )
 {
     _webHelper = webHelper;
     _abcMattressListingPriceService = abcMattressListingPriceService;
     _priceFormatter = priceFormatter;
 }
        public CheckoutModelFactory(IAddressModelFactory addressModelFactory,
                                    IWorkContext workContext,
                                    IStoreContext storeContext,
                                    IStoreMappingService storeMappingService,
                                    ILocalizationService localizationService,
                                    ITaxService taxService,
                                    ICurrencyService currencyService,
                                    IPriceFormatter priceFormatter,
                                    IOrderProcessingService orderProcessingService,
                                    IProductAttributeParser productAttributeParser,
                                    IProductService productService,
                                    IGenericAttributeService genericAttributeService,
                                    ICountryService countryService,
                                    IStateProvinceService stateProvinceService,
                                    IShippingService shippingService,
                                    IPaymentService paymentService,
                                    IOrderTotalCalculationService orderTotalCalculationService,
                                    IRewardPointService rewardPointService,
                                    IWebHelper webHelper,
                                    CommonSettings commonSettings,
                                    OrderSettings orderSettings,
                                    RewardPointsSettings rewardPointsSettings,
                                    PaymentSettings paymentSettings,
                                    ShippingSettings shippingSettings,
                                    AddressSettings addressSettings)
        {
            this._addressModelFactory          = addressModelFactory;
            this._workContext                  = workContext;
            this._storeContext                 = storeContext;
            this._storeMappingService          = storeMappingService;
            this._localizationService          = localizationService;
            this._taxService                   = taxService;
            this._currencyService              = currencyService;
            this._priceFormatter               = priceFormatter;
            this._orderProcessingService       = orderProcessingService;
            this._productAttributeParser       = productAttributeParser;
            this._productService               = productService;
            this._genericAttributeService      = genericAttributeService;
            this._countryService               = countryService;
            this._stateProvinceService         = stateProvinceService;
            this._shippingService              = shippingService;
            this._paymentService               = paymentService;
            this._orderTotalCalculationService = orderTotalCalculationService;
            this._rewardPointService           = rewardPointService;
            this._webHelper = webHelper;

            this._commonSettings       = commonSettings;
            this._orderSettings        = orderSettings;
            this._rewardPointsSettings = rewardPointsSettings;
            this._paymentSettings      = paymentSettings;
            this._shippingSettings     = shippingSettings;
            this._addressSettings      = addressSettings;
        }
Beispiel #14
0
        public async Task <IActionResult> Order(int storeScope, OrderSettings settings, OrderSettingsModel model)
        {
            if (!ModelState.IsValid)
            {
                return(View(model));
            }

            ModelState.Clear();

            await MapperFactory.MapAsync(model, settings);

            foreach (var localized in model.Locales)
            {
                await _localizedEntityService.ApplyLocalizedSettingAsync(settings, x => x.ReturnRequestActions, localized.ReturnRequestActions, localized.LanguageId, storeScope);

                await _localizedEntityService.ApplyLocalizedSettingAsync(settings, x => x.ReturnRequestReasons, localized.ReturnRequestReasons, localized.LanguageId, storeScope);
            }

            if (model.GiftCards_Activated_OrderStatusId.HasValue)
            {
                await Services.Settings.ApplySettingAsync(settings, x => x.GiftCards_Activated_OrderStatusId, 0);
            }
            else
            {
                await Services.Settings.RemoveSettingAsync(settings, x => x.GiftCards_Activated_OrderStatusId);
            }

            if (model.GiftCards_Deactivated_OrderStatusId.HasValue)
            {
                await Services.Settings.ApplySettingAsync(settings, x => x.GiftCards_Deactivated_OrderStatusId, 0);
            }
            else
            {
                await Services.Settings.RemoveSettingAsync(settings, x => x.GiftCards_Deactivated_OrderStatusId);
            }

            await _db.SaveChangesAsync();

            // Order ident.
            if (model.OrderIdent.HasValue)
            {
                try
                {
                    _db.DataProvider.SetTableIdent <Order>(model.OrderIdent.Value);
                }
                catch (Exception ex)
                {
                    NotifyError(ex.Message);
                }
            }

            return(NotifyAndRedirect("Order"));
        }
Beispiel #15
0
 public CheckoutModelFactory(AddressSettings addressSettings,
                             CommonSettings commonSettings,
                             IAddressModelFactory addressModelFactory,
                             IAddressService addressService,
                             ICountryService countryService,
                             ICurrencyService currencyService,
                             IGenericAttributeService genericAttributeService,
                             ILocalizationService localizationService,
                             IOrderProcessingService orderProcessingService,
                             IOrderTotalCalculationService orderTotalCalculationService,
                             IPaymentService paymentService,
                             IPluginService pluginService,
                             IPriceFormatter priceFormatter,
                             IRewardPointService rewardPointService,
                             IShippingService shippingService,
                             IShoppingCartService shoppingCartService,
                             IStateProvinceService stateProvinceService,
                             IStoreContext storeContext,
                             IStoreMappingService storeMappingService,
                             ITaxService taxService,
                             IWorkContext workContext,
                             OrderSettings orderSettings,
                             PaymentSettings paymentSettings,
                             RewardPointsSettings rewardPointsSettings,
                             ShippingSettings shippingSettings)
 {
     _addressSettings              = addressSettings;
     _commonSettings               = commonSettings;
     _addressModelFactory          = addressModelFactory;
     _addressService               = addressService;
     _countryService               = countryService;
     _currencyService              = currencyService;
     _genericAttributeService      = genericAttributeService;
     _localizationService          = localizationService;
     _orderProcessingService       = orderProcessingService;
     _orderTotalCalculationService = orderTotalCalculationService;
     _paymentService               = paymentService;
     _pluginService        = pluginService;
     _priceFormatter       = priceFormatter;
     _rewardPointService   = rewardPointService;
     _shippingService      = shippingService;
     _shoppingCartService  = shoppingCartService;
     _stateProvinceService = stateProvinceService;
     _storeContext         = storeContext;
     _storeMappingService  = storeMappingService;
     _taxService           = taxService;
     _workContext          = workContext;
     _orderSettings        = orderSettings;
     _paymentSettings      = paymentSettings;
     _rewardPointsSettings = rewardPointsSettings;
     _shippingSettings     = shippingSettings;
 }
 public ProcessOrderPaidCommandHandler(
     IWorkflowMessageService workflowMessageService,
     IMediator mediator,
     IPdfService pdfService,
     OrderSettings orderSettings,
     LocalizationSettings localizationSettings)
 {
     _workflowMessageService = workflowMessageService;
     _mediator             = mediator;
     _pdfService           = pdfService;
     _orderSettings        = orderSettings;
     _localizationSettings = localizationSettings;
 }
        public async Task <IActionResult> Edit(ReturnRequestModel model, bool continueEditing, IFormCollection form,
                                               [FromServices] IAddressAttributeService addressAttributeService,
                                               [FromServices] IAddressAttributeParser addressAttributeParser,
                                               [FromServices] OrderSettings orderSettings
                                               )
        {
            var returnRequest = await _returnRequestService.GetReturnRequestById(model.Id);

            if (returnRequest == null)
            {
                //No return request found with the specified id
                return(RedirectToAction("List"));
            }

            if (_workContext.CurrentCustomer.IsStaff() && returnRequest.StoreId != _workContext.CurrentCustomer.StaffStoreId)
            {
                return(RedirectToAction("List", "ReturnRequest"));
            }

            //a vendor should have access only to his return request
            if (_workContext.CurrentVendor != null && returnRequest.VendorId != _workContext.CurrentVendor.Id)
            {
                return(RedirectToAction("List", "ReturnRequest"));
            }

            var customAddressAttributes = string.Empty;

            if (orderSettings.ReturnRequests_AllowToSpecifyPickupAddress)
            {
                customAddressAttributes = await form.ParseCustomAddressAttributes(addressAttributeParser, addressAttributeService);

                var customAddressAttributeWarnings = await addressAttributeParser.GetAttributeWarnings(customAddressAttributes);

                foreach (var error in customAddressAttributeWarnings)
                {
                    ModelState.AddModelError("", error);
                }
            }
            if (ModelState.IsValid)
            {
                returnRequest = await _returnRequestViewModelService.UpdateReturnRequestModel(returnRequest, model, customAddressAttributes);

                SuccessNotification(_localizationService.GetResource("Admin.ReturnRequests.Updated"));
                return(continueEditing ? RedirectToAction("Edit", new { id = returnRequest.Id }) : RedirectToAction("List"));
            }

            //If we got this far, something failed, redisplay form
            await _returnRequestViewModelService.PrepareReturnRequestModel(model, returnRequest, false);

            return(View(model));
        }
        public async Task <IActionResult> Edit(MerchandiseReturnModel model, bool continueEditing, IFormCollection form,
                                               [FromServices] IAddressAttributeService addressAttributeService,
                                               [FromServices] IAddressAttributeParser addressAttributeParser,
                                               [FromServices] OrderSettings orderSettings
                                               )
        {
            var merchandiseReturn = await _merchandiseReturnService.GetMerchandiseReturnById(model.Id);

            if (merchandiseReturn == null)
            {
                //No merchandise return found with the specified id
                return(RedirectToAction("List"));
            }

            if (await _groupService.IsStaff(_workContext.CurrentCustomer) && merchandiseReturn.StoreId != _workContext.CurrentCustomer.StaffStoreId)
            {
                return(RedirectToAction("List", "MerchandiseReturn"));
            }

            //a vendor should have access only to his merchandise return
            if (_workContext.CurrentVendor != null && merchandiseReturn.VendorId != _workContext.CurrentVendor.Id)
            {
                return(RedirectToAction("List", "MerchandiseReturn"));
            }

            var customAddressAttributes = new List <CustomAttribute>();

            if (orderSettings.MerchandiseReturns_AllowToSpecifyPickupAddress)
            {
                customAddressAttributes = await form.ParseCustomAddressAttributes(addressAttributeParser, addressAttributeService);

                var customAddressAttributeWarnings = await addressAttributeParser.GetAttributeWarnings(customAddressAttributes);

                foreach (var error in customAddressAttributeWarnings)
                {
                    ModelState.AddModelError("", error);
                }
            }
            if (ModelState.IsValid)
            {
                merchandiseReturn = await _merchandiseReturnViewModelService.UpdateMerchandiseReturnModel(merchandiseReturn, model, customAddressAttributes);

                Success(_translationService.GetResource("Admin.Orders.MerchandiseReturns.Updated"));
                return(continueEditing ? RedirectToAction("Edit", new { id = merchandiseReturn.Id }) : RedirectToAction("List"));
            }

            //If we got this far, something failed, redisplay form
            await _merchandiseReturnViewModelService.PrepareMerchandiseReturnModel(model, merchandiseReturn, false);

            return(View(model));
        }
Beispiel #19
0
 public PaymentSagePayServerController(ISettingService settingService, ISagePayServerTransactionService sagePayServerTransactionService,
                                       IMobileDeviceHelper mobileDeviceHelper, ISagePayServerWorkflowService sagePayServerWorkflowService,
                                       IStoreService storeService, IWorkContext workContext,
                                       OrderSettings orderSettings, HttpContextBase httpContext)
 {
     this._settingService = settingService;
     this._sagePayServerTransactionService = sagePayServerTransactionService;
     this._storeService                 = storeService;
     this._orderSettings                = orderSettings;
     this._httpContext                  = httpContext;
     this._mobileDeviceHelper           = mobileDeviceHelper;
     this._sagePayServerWorkflowService = sagePayServerWorkflowService;
     this._workContext                  = workContext;
 }
Beispiel #20
0
        private static IEnumerable <T> ApplySorting <T>(this IQueryable <T> input, OrderSettings sort)
        {
            switch (sort.Order)
            {
            case Order.Ascending:
                return(input.OrderBy(sort.SortBy));

            case Order.Descending:
                return(input.OrderBy(sort.SortBy).Reverse());

            default:
                throw new Exception();
            }
        }
Beispiel #21
0
 public FaraBotController(IFaraBotUserService BotService, IFaraBotConfigService BotConfigService, IOrderService orderService, ICustomerRegistrationService CustomerService,
                          IWorkContext workContext, OrderSettings orderSettings, IStoreContext storeContext, ICheckoutModelFactory checkoutModelFactory, IWebHelper webHelper, CustomerSettings customerSettings)
 {
     _BotUserService       = BotService;
     _BotConfigService     = BotConfigService;
     _orderService         = orderService;
     _workContext          = workContext;
     _orderSettings        = orderSettings;
     _storeContext         = storeContext;
     _checkoutModelFactory = checkoutModelFactory;
     _customerSettings     = customerSettings;
     _webHelper            = webHelper;
     _CustomerService      = CustomerService;
 }
Beispiel #22
0
 public PayPalExpressCheckoutService(ICustomerService customerService,
                                     IOrderService orderService,
                                     IShoppingCartService shoppingCartService,
                                     IStoreContext storeContext,
                                     IWorkContext workContext,
                                     OrderSettings orderSettings)
 {
     _customerService     = customerService;
     _orderService        = orderService;
     _shoppingCartService = shoppingCartService;
     _storeContext        = storeContext;
     _workContext         = workContext;
     _orderSettings       = orderSettings;
 }
        public void OrderSettingsEqualityComparer_test_cant_add_two_equals_settings()
        {
            StrategyHeader strategy1 = new StrategyHeader(1, "Strategy 1", "BP12345-RF-01", "RTS-9.13_FT", 10);
            OrderSettings  os1       = new OrderSettings(strategy1, 60);
            OrderSettings  os2       = new OrderSettings(strategy1, 300);

            HashSet <OrderSettings> collection = new HashSet <OrderSettings>(new OrderSettingsComparer());

            collection.Add(os1);
            Assert.AreEqual(1, collection.Count);

            collection.Add(os2);
            Assert.AreEqual(1, collection.Count);
        }
Beispiel #24
0
        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,
                               CustomerSettings customerSettings,
                               RewardPointsSettings rewardPointsSettings,
                               ForumSettings forumSettings,
                               IStoreContext storeContext,
                               MediaSettings mediaSettings,
                               ICacheManager cacheManager,
                               IPictureService pictureService,
                               IDiscountService discountService)
        {
            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;
            this._customerSettings     = customerSettings;
            this._rewardPointsSettings = rewardPointsSettings;
            this._forumSettings        = forumSettings;
            this._storeContext         = storeContext;
            this._mediaSettings        = mediaSettings;
            this._cacheManager         = cacheManager;
            this._pictureService       = pictureService;
            this._discountService      = discountService;
        }
 public PaymentInfoViewComponent(ILocalizationService localizationService,
                                 INotificationService notificationService,
                                 IPaymentService paymentService,
                                 OrderSettings orderSettings,
                                 PayPalSmartPaymentButtonsSettings settings,
                                 ServiceManager serviceManager)
 {
     _localizationService = localizationService;
     _notificationService = notificationService;
     _paymentService      = paymentService;
     _orderSettings       = orderSettings;
     _settings            = settings;
     _serviceManager      = serviceManager;
 }
Beispiel #26
0
 public OrderFullfillmentShipwireController(AddressSettings addressSettings,
                                            CustomerSettings customerSettings,
                                            IAddressAttributeParser addressAttributeParser,
                                            IAddressService addressService,
                                            ICheckoutModelFactory checkoutModelFactory,
                                            ICountryService countryService,
                                            ICustomerService customerService,
                                            IGenericAttributeService genericAttributeService,
                                            ILocalizationService localizationService,
                                            ILogger logger,
                                            IOrderProcessingService orderProcessingService,
                                            IOrderService orderService,
                                            IPaymentPluginManager paymentPluginManager,
                                            IPaymentService paymentService,
                                            IShippingService shippingService,
                                            IShoppingCartService shoppingCartService,
                                            IStateProvinceService stateProvinceService,
                                            IStoreContext storeContext,
                                            IWebHelper webHelper,
                                            IWorkContext workContext,
                                            OrderSettings orderSettings,
                                            PaymentSettings paymentSettings,
                                            RewardPointsSettings rewardPointsSettings,
                                            ShippingSettings shippingSettings) : base(addressSettings,
                                                                                      customerSettings,
                                                                                      addressAttributeParser,
                                                                                      addressService,
                                                                                      checkoutModelFactory,
                                                                                      countryService,
                                                                                      customerService,
                                                                                      genericAttributeService,
                                                                                      localizationService,
                                                                                      logger,
                                                                                      orderProcessingService,
                                                                                      orderService,
                                                                                      paymentPluginManager,
                                                                                      paymentService,
                                                                                      shippingService,
                                                                                      shoppingCartService,
                                                                                      stateProvinceService,
                                                                                      storeContext,
                                                                                      webHelper,
                                                                                      workContext,
                                                                                      orderSettings,
                                                                                      paymentSettings,
                                                                                      rewardPointsSettings,
                                                                                      shippingSettings)
 {
 }
Beispiel #27
0
        public OrderModelFactory(IAddressModelFactory addressModelFactory,
                                 IOrderService orderService,
                                 IWorkContext workContext,
                                 ICurrencyService currencyService,
                                 IPriceFormatter priceFormatter,
                                 IOrderProcessingService orderProcessingService,
                                 IDateTimeHelper dateTimeHelper,
                                 IPaymentService paymentService,
                                 ILocalizationService localizationService,
                                 ILocalizedEntityService localizedEntityService,
                                 IShippingService shippingService,
                                 ICountryService countryService,
                                 IProductAttributeParser productAttributeParser,
                                 IDownloadService downloadService,
                                 IStoreContext storeContext,
                                 IOrderTotalCalculationService orderTotalCalculationService,
                                 IRewardPointService rewardPointService,
                                 ILanguageService languageService,
                                 ISettingService settingService
                                 )
        {
            this._addressModelFactory          = addressModelFactory;
            this._orderService                 = orderService;
            this._workContext                  = workContext;
            this._currencyService              = currencyService;
            this._priceFormatter               = priceFormatter;
            this._orderProcessingService       = orderProcessingService;
            this._dateTimeHelper               = dateTimeHelper;
            this._paymentService               = paymentService;
            this._localizationService          = localizationService;
            this._localizedEntityService       = localizedEntityService;
            this._shippingService              = shippingService;
            this._countryService               = countryService;
            this._productAttributeParser       = productAttributeParser;
            this._downloadService              = downloadService;
            this._storeContext                 = storeContext;
            this._orderTotalCalculationService = orderTotalCalculationService;
            this._rewardPointService           = rewardPointService;
            this._languageService              = languageService;
            this._settingService               = settingService;

            this._catalogSettings      = _settingService.LoadSetting <CatalogSettings>();
            this._orderSettings        = _settingService.LoadSetting <OrderSettings>();
            this._taxSettings          = _settingService.LoadSetting <TaxSettings>();
            this._shippingSettings     = _settingService.LoadSetting <ShippingSettings>();
            this._addressSettings      = _settingService.LoadSetting <AddressSettings>();
            this._rewardPointsSettings = _settingService.LoadSetting <RewardPointsSettings>();
            this._pdfSettings          = _settingService.LoadSetting <PdfSettings>();
        }
Beispiel #28
0
 public CheckoutController(
     IWorkContext workContext,
     IStoreContext storeContext,
     IShoppingCartService shoppingCartService,
     ILocalizationService localizationService,
     ITaxService taxService,
     ICurrencyService currencyService,
     IPriceFormatter priceFormatter,
     IOrderProcessingService orderProcessingService,
     ICustomerService customerService,
     IGenericAttributeService genericAttributeService,
     ICountryService countryService,
     IStateProvinceService stateProvinceService,
     IShippingService shippingService,
     IPaymentService paymentService,
     IOrderTotalCalculationService orderTotalCalculationService,
     IOrderService orderService,
     HttpContextBase httpContext,
     OrderSettings orderSettings,
     PaymentSettings paymentSettings,
     AddressSettings addressSettings,
     ShoppingCartSettings shoppingCartSettings,
     ShippingSettings shippingSettings,
     PluginMediator pluginMediator)
 {
     _workContext                  = workContext;
     _storeContext                 = storeContext;
     _shoppingCartService          = shoppingCartService;
     _localizationService          = localizationService;
     _taxService                   = taxService;
     _currencyService              = currencyService;
     _priceFormatter               = priceFormatter;
     _orderProcessingService       = orderProcessingService;
     _customerService              = customerService;
     _genericAttributeService      = genericAttributeService;
     _countryService               = countryService;
     _stateProvinceService         = stateProvinceService;
     _shippingService              = shippingService;
     _paymentService               = paymentService;
     _orderTotalCalculationService = orderTotalCalculationService;
     _orderService                 = orderService;
     _httpContext                  = httpContext;
     _orderSettings                = orderSettings;
     _paymentSettings              = paymentSettings;
     _addressSettings              = addressSettings;
     _shippingSettings             = shippingSettings;
     _shoppingCartSettings         = shoppingCartSettings;
     _pluginMediator               = pluginMediator;
 }
 public PayPalExpressCheckoutConfirmOrderService(
     IOrderProcessingService orderProcessingService,
     ICurrencyService currencyService,
     OrderSettings orderSettings,
     IWorkContext workContext,
     ILocalizationService localizationService,
     IPriceFormatter priceFormatter)
 {
     _orderProcessingService = orderProcessingService;
     _currencyService        = currencyService;
     _orderSettings          = orderSettings;
     _workContext            = workContext;
     _localizationService    = localizationService;
     _priceFormatter         = priceFormatter;
 }
Beispiel #30
0
 public OrderStatusCommandHandler(
     IOrderService orderService,
     IPdfService pdfService,
     IWorkflowMessageService workflowMessageService,
     IMediator mediator,
     OrderSettings orderSettings,
     RewardPointsSettings rewardPointsSettings)
 {
     _orderService           = orderService;
     _pdfService             = pdfService;
     _workflowMessageService = workflowMessageService;
     _mediator             = mediator;
     _orderSettings        = orderSettings;
     _rewardPointsSettings = rewardPointsSettings;
 }
 /// <summary>
 /// Ctor
 /// </summary>
 /// <param name="orderService">Order service</param>
 /// <param name="webHelper">Web helper</param>
 /// <param name="localizationService">Localization service</param>
 /// <param name="languageService">Language service</param>
 /// <param name="productService">Product service</param>
 /// <param name="paymentService">Payment service</param>
 /// <param name="logger">Logger</param>
 /// <param name="orderTotalCalculationService">Order total calculationservice</param>
 /// <param name="priceCalculationService">Price calculation service</param>
 /// <param name="priceFormatter">Price formatter</param>
 /// <param name="productAttributeParser">Product attribute parser</param>
 /// <param name="productAttributeFormatter">Product attribute formatter</param>
 /// <param name="giftCardService">Gift card service</param>
 /// <param name="shoppingCartService">Shopping cart service</param>
 /// <param name="checkoutAttributeFormatter">Checkout attribute service</param>
 /// <param name="shippingService">Shipping service</param>
 /// <param name="shipmentService">Shipment service</param>
 /// <param name="taxService">Tax service</param>
 /// <param name="customerService">Customer service</param>
 /// <param name="discountService">Discount service</param>
 /// <param name="encryptionService">Encryption service</param>
 /// <param name="workContext">Work context</param>
 /// <param name="workflowMessageService">Workflow message service</param>
 /// <param name="vendorService">Vendor service</param>
 /// <param name="customerActivityService">Customer activity service</param>
 /// <param name="currencyService">Currency service</param>
 /// <param name="affiliateService">Affiliate service</param>
 /// <param name="eventPublisher">Event published</param>
 /// <param name="pdfService">PDF service</param>
 /// <param name="paymentSettings">Payment settings</param>
 /// <param name="shippingSettings">Shipping settings</param>
 /// <param name="rewardPointsSettings">Reward points settings</param>
 /// <param name="orderSettings">Order settings</param>
 /// <param name="taxSettings">Tax settings</param>
 /// <param name="localizationSettings">Localization settings</param>
 /// <param name="currencySettings">Currency settings</param>
 public OrderProcessingService(IOrderService orderService,
     IWebHelper webHelper,
     ILocalizationService localizationService,
     ILanguageService languageService,
     IProductService productService,
     IPaymentService paymentService,
     ILogger logger,
     IOrderTotalCalculationService orderTotalCalculationService,
     IPriceCalculationService priceCalculationService,
     IPriceFormatter priceFormatter,
     IProductAttributeParser productAttributeParser,
     IProductAttributeFormatter productAttributeFormatter,
     IGiftCardService giftCardService,
     IShoppingCartService shoppingCartService,
     ICheckoutAttributeFormatter checkoutAttributeFormatter,
     IShippingService shippingService,
     IShipmentService shipmentService,
     ITaxService taxService,
     ICustomerService customerService,
     IDiscountService discountService,
     IEncryptionService encryptionService,
     IWorkContext workContext,
     IWorkflowMessageService workflowMessageService,
     IVendorService vendorService,
     ICustomerActivityService customerActivityService,
     ICurrencyService currencyService,
     IAffiliateService affiliateService,
     IEventPublisher eventPublisher,
     IPdfService pdfService,
     ShippingSettings shippingSettings,
     PaymentSettings paymentSettings,
     RewardPointsSettings rewardPointsSettings,
     OrderSettings orderSettings,
     TaxSettings taxSettings,
     LocalizationSettings localizationSettings,
     CurrencySettings currencySettings,
     IGenericAttributeService genericAttributeService,
     PromoSettings promoSettings,
     IPromoUtilities promoUtilities,
     IPromoOrderService promoOrderService,
     IPromoService promoService,
     IStoreContext storeContext)
     : base(orderService, webHelper, localizationService, languageService, productService, paymentService,
                                                 logger, orderTotalCalculationService, priceCalculationService, priceFormatter, productAttributeParser,
                                                 productAttributeFormatter, giftCardService, shoppingCartService, checkoutAttributeFormatter, shippingService,
                                                 shipmentService, taxService, customerService, discountService, encryptionService, workContext, workflowMessageService,
                                                 vendorService, customerActivityService, currencyService, affiliateService, eventPublisher, pdfService,
                                                 shippingSettings, paymentSettings, rewardPointsSettings, orderSettings, taxSettings,
                                                 localizationSettings, currencySettings)
 {
     this._orderService = orderService;
     this._webHelper = webHelper;
     this._localizationService = localizationService;
     this._languageService = languageService;
     this._productService = productService;
     this._paymentService = paymentService;
     this._logger = logger;
     this._orderTotalCalculationService = orderTotalCalculationService;
     this._priceCalculationService = priceCalculationService;
     this._priceFormatter = priceFormatter;
     this._productAttributeParser = productAttributeParser;
     this._productAttributeFormatter = productAttributeFormatter;
     this._giftCardService = giftCardService;
     this._shoppingCartService = shoppingCartService;
     this._checkoutAttributeFormatter = checkoutAttributeFormatter;
     this._workContext = workContext;
     this._workflowMessageService = workflowMessageService;
     this._vendorService = vendorService;
     this._shippingService = shippingService;
     this._shipmentService = shipmentService;
     this._taxService = taxService;
     this._customerService = customerService;
     this._discountService = discountService;
     this._encryptionService = encryptionService;
     this._customerActivityService = customerActivityService;
     this._currencyService = currencyService;
     this._affiliateService = affiliateService;
     this._eventPublisher = eventPublisher;
     this._pdfService = pdfService;
     this._paymentSettings = paymentSettings;
     this._shippingSettings = shippingSettings;
     this._rewardPointsSettings = rewardPointsSettings;
     this._orderSettings = orderSettings;
     this._taxSettings = taxSettings;
     this._localizationSettings = localizationSettings;
     this._currencySettings = currencySettings;
     this._genericAttributeService = genericAttributeService;
     this._promoSettings = promoSettings;
     this._promoUtilities = promoUtilities;
     this._promoOrderService = promoOrderService;
     this._promoService = promoService;
     this._storeContext = storeContext;
 }