Exemple #1
0
 public GetProductDetailsAttributeChangeHandler(
     IMediator mediator,
     IProductAttributeParser productAttributeParser,
     IStockQuantityService stockQuantityService,
     IPermissionService permissionService,
     IPricingService priceCalculationService,
     IOutOfStockSubscriptionService outOfStockSubscriptionService,
     ITaxService taxService,
     IPriceFormatter priceFormatter,
     ITranslationService translationService,
     IPictureService pictureService,
     ShoppingCartSettings shoppingCartSettings,
     MediaSettings mediaSettings)
 {
     _mediator = mediator;
     _productAttributeParser        = productAttributeParser;
     _stockQuantityService          = stockQuantityService;
     _permissionService             = permissionService;
     _pricingService                = priceCalculationService;
     _outOfStockSubscriptionService = outOfStockSubscriptionService;
     _taxService           = taxService;
     _priceFormatter       = priceFormatter;
     _translationService   = translationService;
     _pictureService       = pictureService;
     _shoppingCartSettings = shoppingCartSettings;
     _mediaSettings        = mediaSettings;
 }
 public ShoppingCartValidator(
     IWorkContext workContext,
     ICurrencyService currencyService,
     IProductService productService,
     ITranslationService translationService,
     IProductAttributeParser productAttributeParser,
     ICheckoutAttributeService checkoutAttributeService,
     ICheckoutAttributeParser checkoutAttributeParser,
     IPriceFormatter priceFormatter,
     IMediator mediator,
     IPermissionService permissionService,
     IAclService aclService,
     IProductAttributeService productAttributeService,
     IProductReservationService productReservationService,
     IStockQuantityService stockQuantityService,
     IWarehouseService warehouseService,
     ShoppingCartSettings shoppingCartSettings)
 {
     _workContext              = workContext;
     _currencyService          = currencyService;
     _productService           = productService;
     _translationService       = translationService;
     _productAttributeParser   = productAttributeParser;
     _checkoutAttributeService = checkoutAttributeService;
     _checkoutAttributeParser  = checkoutAttributeParser;
     _priceFormatter           = priceFormatter;
     _mediator                  = mediator;
     _permissionService         = permissionService;
     _aclService                = aclService;
     _productAttributeService   = productAttributeService;
     _productReservationService = productReservationService;
     _stockQuantityService      = stockQuantityService;
     _warehouseService          = warehouseService;
     _shoppingCartSettings      = shoppingCartSettings;
 }
Exemple #3
0
        public void Init()
        {
            var tempLocalizationService = new Mock <ITranslationService>();

            {
                //tempLocalizationService.Setup(x => x.GetResource("Products.InclTaxSuffix", "1", "", false)).Returns("{0} incl tax");
                //tempLocalizationService.Setup(x => x.GetResource("Products.ExclTaxSuffix", "1", "", false)).Returns("{0} excl tax");
                _translationService = tempLocalizationService.Object;
            }
            _stockQuantityService = new StockQuantityService(
                tempLocalizationService.Object,
                new ProductAttributeParser());
        }
 public UpdateProductStockCommandHandler(
     IProductService productService,
     IInventoryManageService inventoryManageService,
     IStockQuantityService stockQuantityService,
     ICustomerActivityService customerActivityService,
     ITranslationService translationService,
     IOutOfStockSubscriptionService outOfStockSubscriptionService)
 {
     _productService                = productService;
     _inventoryManageService        = inventoryManageService;
     _stockQuantityService          = stockQuantityService;
     _customerActivityService       = customerActivityService;
     _translationService            = translationService;
     _outOfStockSubscriptionService = outOfStockSubscriptionService;
 }
 public InventoryManageService(
     IRepository <Product> productRepository,
     IRepository <InventoryJournal> inventoryJournalRepository,
     IProductAttributeParser productAttributeParser,
     IStockQuantityService stockQuantityService,
     ICacheBase cacheBase,
     IMediator mediator,
     CatalogSettings catalogSettings)
 {
     _productRepository          = productRepository;
     _inventoryJournalRepository = inventoryJournalRepository;
     _productAttributeParser     = productAttributeParser;
     _stockQuantityService       = stockQuantityService;
     _cacheBase       = cacheBase;
     _mediator        = mediator;
     _catalogSettings = catalogSettings;
 }
 public UpdateProductCommandHandler(
     IProductService productService,
     ISlugService slugService,
     ICustomerActivityService customerActivityService,
     ITranslationService translationService,
     ILanguageService languageService,
     IOutOfStockSubscriptionService outOfStockSubscriptionService,
     IStockQuantityService stockQuantityService,
     IMediator mediator,
     SeoSettings seoSettings)
 {
     _productService                = productService;
     _slugService                   = slugService;
     _customerActivityService       = customerActivityService;
     _translationService            = translationService;
     _languageService               = languageService;
     _outOfStockSubscriptionService = outOfStockSubscriptionService;
     _stockQuantityService          = stockQuantityService;
     _mediator    = mediator;
     _seoSettings = seoSettings;
 }
 public ReportsController(IOrderService orderService,
                          IOrderReportService orderReportService,
                          IProductsReportService productsReportService,
                          ICustomerReportService customerReportService,
                          ICustomerReportViewModelService customerReportViewModelService,
                          IPermissionService permissionService,
                          IWorkContext workContext,
                          IPriceFormatter priceFormatter,
                          IProductService productService,
                          IProductAttributeFormatter productAttributeFormatter,
                          IStockQuantityService stockQuantityService,
                          ITranslationService translationService,
                          IStoreService storeService,
                          ICountryService countryService,
                          IVendorService vendorService,
                          IDateTimeService dateTimeService,
                          ISearchTermService searchTermService,
                          IGroupService groupService,
                          IOrderStatusService orderStatusService)
 {
     _orderService                   = orderService;
     _orderReportService             = orderReportService;
     _productsReportService          = productsReportService;
     _customerReportService          = customerReportService;
     _customerReportViewModelService = customerReportViewModelService;
     _permissionService              = permissionService;
     _workContext               = workContext;
     _priceFormatter            = priceFormatter;
     _productService            = productService;
     _productAttributeFormatter = productAttributeFormatter;
     _stockQuantityService      = stockQuantityService;
     _translationService        = translationService;
     _storeService              = storeService;
     _countryService            = countryService;
     _vendorService             = vendorService;
     _dateTimeService           = dateTimeService;
     _searchTermService         = searchTermService;
     _groupService              = groupService;
     _orderStatusService        = orderStatusService;
 }
Exemple #8
0
 public OutOfStockSubscriptionController(IProductService productService,
                                         IWorkContext workContext,
                                         IGroupService groupService,
                                         ITranslationService translationService,
                                         IOutOfStockSubscriptionService outOfStockSubscriptionService,
                                         IProductAttributeFormatter productAttributeFormatter,
                                         IStockQuantityService stockQuantityService,
                                         IMediator mediator,
                                         CustomerSettings customerSettings,
                                         ShoppingCartSettings shoppingCartSettings)
 {
     _productService                = productService;
     _workContext                   = workContext;
     _groupService                  = groupService;
     _translationService            = translationService;
     _outOfStockSubscriptionService = outOfStockSubscriptionService;
     _productAttributeFormatter     = productAttributeFormatter;
     _stockQuantityService          = stockQuantityService;
     _mediator             = mediator;
     _customerSettings     = customerSettings;
     _shoppingCartSettings = shoppingCartSettings;
 }
 public ShipmentViewModelService(
     IOrderService orderService,
     IWorkContext workContext,
     IGroupService groupService,
     IProductService productService,
     IShipmentService shipmentService,
     IWarehouseService warehouseService,
     IMeasureService measureService,
     IDateTimeService dateTimeService,
     IProductAttributeParser productAttributeParser,
     ICountryService countryService,
     ICustomerActivityService customerActivityService,
     ITranslationService translationService,
     IDownloadService downloadService,
     IShippingService shippingService,
     IStockQuantityService stockQuantityService,
     MeasureSettings measureSettings,
     ShippingSettings shippingSettings,
     ShippingProviderSettings shippingProviderSettings)
 {
     _orderService             = orderService;
     _workContext              = workContext;
     _groupService             = groupService;
     _productService           = productService;
     _shipmentService          = shipmentService;
     _warehouseService         = warehouseService;
     _measureService           = measureService;
     _dateTimeService          = dateTimeService;
     _productAttributeParser   = productAttributeParser;
     _countryService           = countryService;
     _customerActivityService  = customerActivityService;
     _translationService       = translationService;
     _downloadService          = downloadService;
     _shippingService          = shippingService;
     _stockQuantityService     = stockQuantityService;
     _measureSettings          = measureSettings;
     _shippingSettings         = shippingSettings;
     _shippingProviderSettings = shippingProviderSettings;
 }
        public virtual async Task <IActionResult> ProductDetails_WarehouseChange(string productId, string warehouseId, [FromServices] IStockQuantityService stockQuantityService)
        {
            var product = await _productService.GetProductById(productId);

            if (product == null)
            {
                return(new JsonResult(""));
            }

            var stock = stockQuantityService.FormatStockMessage(product, warehouseId, null);

            return(Json(new
            {
                stockAvailability = stock
            }));
        }