Exemple #1
0
 public InsertVendorReviewCommandHandler(IVendorService vendorService, IWorkContext workContext,
                                         ICustomerService customerService, IWorkflowMessageService workflowMessageService,
                                         LocalizationSettings localizationSettings, VendorSettings vendorSettings)
 {
     _vendorService          = vendorService;
     _workContext            = workContext;
     _customerService        = customerService;
     _workflowMessageService = workflowMessageService;
     _localizationSettings   = localizationSettings;
     _vendorSettings         = vendorSettings;
 }
 public GBSProductModelFactory(IPluginFinder pluginFinder,
                               IHttpContextAccessor httpContextAccessor,
                               ISpecificationAttributeService specificationAttributeService,
                               ICategoryService categoryService,
                               IManufacturerService manufacturerService,
                               IProductService productService,
                               IVendorService vendorService,
                               IProductTemplateService productTemplateService,
                               IProductAttributeService productAttributeService,
                               IWorkContext workContext,
                               IStoreContext storeContext,
                               ITaxService taxService,
                               ICurrencyService currencyService,
                               IPictureService pictureService,
                               ILocalizationService localizationService,
                               IMeasureService measureService,
                               IPriceCalculationService priceCalculationService,
                               IPriceFormatter priceFormatter,
                               IWebHelper webHelper,
                               IDateTimeHelper dateTimeHelper,
                               IProductTagService productTagService,
                               IAclService aclService,
                               IStoreMappingService storeMappingService,
                               IPermissionService permissionService,
                               IDownloadService downloadService,
                               IProductAttributeParser productAttributeParser,
                               IDateRangeService dateRangeService,
                               MediaSettings mediaSettings,
                               CatalogSettings catalogSettings,
                               VendorSettings vendorSettings,
                               CustomerSettings customerSettings,
                               CaptchaSettings captchaSettings,
                               OrderSettings orderSettings,
                               SeoSettings seoSettings,
                               IStaticCacheManager cacheManager) :
     base(specificationAttributeService,
          categoryService,
          manufacturerService,
          productService,
          vendorService,
          productTemplateService,
          productAttributeService,
          workContext,
          storeContext,
          taxService,
          currencyService,
          pictureService,
          localizationService,
          measureService,
          priceCalculationService,
          priceFormatter,
          webHelper,
          dateTimeHelper,
          productTagService,
          aclService,
          storeMappingService,
          permissionService,
          downloadService,
          productAttributeParser,
          dateRangeService,
          mediaSettings,
          catalogSettings,
          vendorSettings,
          customerSettings,
          captchaSettings,
          orderSettings,
          seoSettings,
          cacheManager)
 {
     _workContext         = workContext;
     _storeContext        = storeContext;
     _cacheManager        = cacheManager;
     _catalogSettings     = catalogSettings;
     _categoryService     = categoryService;
     _aclService          = aclService;
     _storeMappingService = storeMappingService;
     _pluginFinder        = pluginFinder;
     _httpContextAccessor = httpContextAccessor;
 }
Exemple #3
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,
                                ICacheManager cacheManager,
                                ICustomerActivityService customerActivityService,
                                IVendorService vendorService,
                                IPageHeadBuilder pageHeadBuilder,
                                IPictureService pictureService,
                                CustomerSettings customerSettings,
                                TaxSettings taxSettings,
                                CatalogSettings catalogSettings,
                                StoreInformationSettings storeInformationSettings,
                                EmailAccountSettings emailAccountSettings,
                                CommonSettings commonSettings,
                                BlogSettings blogSettings,
                                NewsSettings newsSettings,
                                ForumSettings forumSettings,
                                LocalizationSettings localizationSettings,
                                CaptchaSettings captchaSettings,
                                VendorSettings vendorSettings)
        {
            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._cacheManager            = cacheManager;
            this._customerActivityService = customerActivityService;
            this._vendorService           = vendorService;
            this._pageHeadBuilder         = pageHeadBuilder;
            this._pictureService          = pictureService;


            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;
            this._vendorSettings           = vendorSettings;
        }
Exemple #4
0
 public CommonModelFactory(BlogSettings blogSettings,
                           CaptchaSettings captchaSettings,
                           CatalogSettings catalogSettings,
                           CommonSettings commonSettings,
                           CustomerSettings customerSettings,
                           DisplayDefaultFooterItemSettings displayDefaultFooterItemSettings,
                           ForumSettings forumSettings,
                           IActionContextAccessor actionContextAccessor,
                           IBlogService blogService,
                           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;
     _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;
 }
 public VendorViewModelService(IDiscountService discountService, IVendorService vendorService, ICustomerService customerService, ILocalizationService localizationService,
                               IDateTimeHelper dateTimeHelper, ICountryService countryService, IStateProvinceService stateProvinceService, IStoreService storeService, IUrlRecordService urlRecordService,
                               IPictureService pictureService, IMediator mediator, VendorSettings vendorSettings, ILanguageService languageService,
                               SeoSettings seoSettings)
 {
     _discountService      = discountService;
     _vendorService        = vendorService;
     _customerService      = customerService;
     _localizationService  = localizationService;
     _dateTimeHelper       = dateTimeHelper;
     _countryService       = countryService;
     _stateProvinceService = stateProvinceService;
     _storeService         = storeService;
     _urlRecordService     = urlRecordService;
     _pictureService       = pictureService;
     _mediator             = mediator;
     _languageService      = languageService;
     _vendorSettings       = vendorSettings;
     _seoSettings          = seoSettings;
 }
 public VendorNavigationViewComponent(ICatalogModelFactory catalogModelFactory,
                                      VendorSettings vendorSettings)
 {
     _catalogModelFactory = catalogModelFactory;
     _vendorSettings      = vendorSettings;
 }
 public static VendorSettings ToEntity(this VendorSettingsModel model, VendorSettings destination)
 {
     return(model.MapTo(destination));
 }
Exemple #8
0
        public CatalogModelFactory(BlogSettings blogSettings,
                                   CatalogSettings catalogSettings,
                                   DisplayDefaultMenuItemSettings displayDefaultMenuItemSettings,
                                   ForumSettings forumSettings,
                                   IActionContextAccessor actionContextAccessor,
                                   ICategoryService categoryService,
                                   ICategoryTemplateService categoryTemplateService,
                                   ICurrencyService currencyService,
                                   IEventPublisher eventPublisher,
                                   IHttpContextAccessor httpContextAccessor,
                                   ILocalizationService localizationService,
                                   IManufacturerService manufacturerService,
                                   IManufacturerTemplateService manufacturerTemplateService,
                                   IPictureService pictureService,
                                   IPriceFormatter priceFormatter,
                                   IProductModelFactory productModelFactory,
                                   IProductService productService,
                                   IProductTagService productTagService,
                                   ISearchTermService searchTermService,
                                   ISpecificationAttributeService specificationAttributeService,
                                   IStaticCacheManager cacheManager,
                                   IStoreContext storeContext,
                                   ITopicService topicService,
                                   IUrlHelperFactory urlHelperFactory,
                                   IUrlRecordService urlRecordService,
                                   IVendorService vendorService,
                                   IWebHelper webHelper,
                                   IWorkContext workContext,
                                   MediaSettings mediaSettings,
                                   VendorSettings vendorSettings,
                                   LuceneSettings luceneSettings, ILuceneService luceneService,
                                   ICacheKeyService cacheKeyService, ICustomerService customerService, IStaticCacheManager staticCacheManager)
            : base(blogSettings,
                   catalogSettings,
                   displayDefaultMenuItemSettings,
                   forumSettings,
                   actionContextAccessor,
                   cacheKeyService,
                   categoryService,
                   categoryTemplateService,
                   currencyService,
                   customerService,
                   eventPublisher,
                   httpContextAccessor,
                   localizationService,
                   manufacturerService,
                   manufacturerTemplateService,
                   pictureService,
                   priceFormatter,
                   productModelFactory,
                   productService,
                   productTagService,
                   searchTermService,
                   specificationAttributeService,
                   staticCacheManager,
                   storeContext,
                   topicService,
                   urlHelperFactory,
                   urlRecordService,
                   vendorService,
                   webHelper,
                   workContext,
                   mediaSettings,
                   vendorSettings)
        {
            _blogSettings    = blogSettings;
            _catalogSettings = catalogSettings;
            _displayDefaultMenuItemSettings = displayDefaultMenuItemSettings;
            _forumSettings                 = forumSettings;
            _actionContextAccessor         = actionContextAccessor;
            _categoryService               = categoryService;
            _categoryTemplateService       = categoryTemplateService;
            _currencyService               = currencyService;
            _eventPublisher                = eventPublisher;
            _httpContextAccessor           = httpContextAccessor;
            _localizationService           = localizationService;
            _manufacturerService           = manufacturerService;
            _manufacturerTemplateService   = manufacturerTemplateService;
            _pictureService                = pictureService;
            _priceFormatter                = priceFormatter;
            _productModelFactory           = productModelFactory;
            _productService                = productService;
            _productTagService             = productTagService;
            _searchTermService             = searchTermService;
            _specificationAttributeService = specificationAttributeService;
            _cacheManager     = cacheManager;
            _storeContext     = storeContext;
            _topicService     = topicService;
            _urlHelperFactory = urlHelperFactory;
            _urlRecordService = urlRecordService;
            _vendorService    = vendorService;
            _webHelper        = webHelper;
            _workContext      = workContext;
            _mediaSettings    = mediaSettings;
            _vendorSettings   = vendorSettings;
            _customerService  = customerService;
            _cacheKeyService  = cacheKeyService;

            _luceneSettings = luceneSettings;
            _luceneService  = luceneService;
        }
 public AdminWebPushController(ProgressiveWebAppSettings progressiveWebAppSettings, ISettingService settingService, ILocalizationService localizationService, IPermissionService permissionService, IWorkContext workContext, VendorSettings vendorSettings, ICategoryService categoryService, ICacheManager cacheManager, IStoreService storeService, IShippingService shippingService, IVendorService vendorService, IManufacturerService manufacturerService, IProductService productService, IPictureService pictureService, ICustomerServiceExtend customerServiceExtend, ICustomerService customerService, CustomerSettings customerSettings, IDateTimeHelper dateTimeHelper)
 {
     _progressiveWebAppSettings = progressiveWebAppSettings;
     _settingService            = settingService;
     _localizationService       = localizationService;
     _permissionService         = permissionService;
     _categoryService           = categoryService;
     _cacheManager          = cacheManager;
     _storeService          = storeService;
     _vendorService         = vendorService;
     _manufacturerService   = manufacturerService;
     _productService        = productService;
     _customerService       = customerService;
     _customerServiceExtend = customerServiceExtend;
     _customerSettings      = customerSettings;
     _dateTimeHelper        = dateTimeHelper;
 }
Exemple #10
0
 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,
                                           IPaymentService paymentService,
                                           IPermissionService permissionService,
                                           IPictureService pictureService,
                                           IPriceCalculationService priceCalculationService,
                                           IPriceFormatter priceFormatter,
                                           IProductAttributeFormatter productAttributeFormatter,
                                           IProductService productService,
                                           IShippingService shippingService,
                                           IShoppingCartService shoppingCartService,
                                           IStateProvinceService stateProvinceService,
                                           IStaticCacheManager cacheManager,
                                           IStoreContext storeContext,
                                           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,
                                                                                 paymentService,
                                                                                 permissionService,
                                                                                 pictureService,
                                                                                 priceCalculationService,
                                                                                 priceFormatter,
                                                                                 productAttributeFormatter,
                                                                                 productService,
                                                                                 shippingService,
                                                                                 shoppingCartService,
                                                                                 stateProvinceService,
                                                                                 cacheManager,
                                                                                 storeContext,
                                                                                 taxService,
                                                                                 urlRecordService,
                                                                                 vendorService,
                                                                                 webHelper,
                                                                                 workContext,
                                                                                 mediaSettings,
                                                                                 orderSettings,
                                                                                 rewardPointsSettings,
                                                                                 shippingSettings,
                                                                                 shoppingCartSettings,
                                                                                 taxSettings,
                                                                                 vendorSettings)
 {
     this._countryService               = countryService;
     this._currencyService              = currencyService;
     this._genericAttributeService      = genericAttributeService;
     this._giftCardService              = giftCardService;
     this._httpContextAccessor          = httpContextAccessor;
     this._orderTotalCalculationService = orderTotalCalculationService;
     this._paymentService               = paymentService;
     this._priceCalculationService      = priceCalculationService;
     this._priceFormatter               = priceFormatter;
     this._shoppingCartService          = shoppingCartService;
     this._stateProvinceService         = stateProvinceService;
     this._storeContext         = storeContext;
     this._taxService           = taxService;
     this._workContext          = workContext;
     this._rewardPointsSettings = rewardPointsSettings;
     this._shippingSettings     = shippingSettings;
     this._taxSettings          = taxSettings;
 }
        public CommonWebService(
            //ICacheManager cacheManager,
            IStoreContext storeContext,
            IThemeContext themeContext,
            IPictureService pictureService,
            IWebHelper webHelper,
            ILanguageService languageService,
            IWorkContext workContext,
            ICurrencyService currencyService,
            IPermissionService permissionService,
            IPageHeadBuilder pageHeadBuilder,
            ITopicService topicService,
            IWorkflowMessageService workflowMessageService,
            ILocalizationService localizationService,
            ICategoryService categoryService,
            IManufacturerService manufacturerService,
            IProductService productService,
            ISitemapGenerator sitemapGenerator,
            IThemeProvider themeProvider,
            IForumService forumservice,
            IHttpContextAccessor httpContextAccessor,

            StoreInformationSettings storeInformationSettings,
            LocalizationSettings localizationSettings,
            TaxSettings taxSettings,
            CustomerSettings customerSettings,
            ForumSettings forumSettings,
            CatalogSettings catalogSettings,
            BlogSettings blogSettings,
            NewsSettings newsSettings,
            VendorSettings vendorSettings,
            CommonSettings commonSettings,
            CaptchaSettings captchaSettings
            )
        {
            //this._cacheManager = cacheManager;
            this._storeContext      = storeContext;
            this._themeContext      = themeContext;
            this._pictureService    = pictureService;
            this._webHelper         = webHelper;
            this._languageService   = languageService;
            this._workContext       = workContext;
            this._currencyService   = currencyService;
            this._permissionService = permissionService;
            //this._pageHeadBuilder = pageHeadBuilder;
            this._topicService           = topicService;
            this._workflowMessageService = workflowMessageService;
            this._localizationService    = localizationService;
            this._categoryService        = categoryService;
            this._manufacturerService    = manufacturerService;
            this._productService         = productService;
            this._sitemapGenerator       = sitemapGenerator;
            this._themeProvider          = themeProvider;
            this._forumservice           = forumservice;
            this._httpContextAccessor    = httpContextAccessor;

            this._storeInformationSettings = storeInformationSettings;
            this._localizationSettings     = localizationSettings;
            this._taxSettings      = taxSettings;
            this._customerSettings = customerSettings;
            this._forumSettings    = forumSettings;
            this._catalogSettings  = catalogSettings;
            this._blogSettings     = blogSettings;
            this._newsSettings     = newsSettings;
            this._vendorSettings   = vendorSettings;
            this._commonSettings   = commonSettings;
            this._captchaSettings  = captchaSettings;
        }
Exemple #12
0
 public TopCategoryVendorViewComponent(IMiniVendorModelFactory miniVendorModelFactory,
                                       VendorSettings vendorSettings)
 {
     this._miniVendorModelFactory = miniVendorModelFactory;
     this._vendorSettings         = vendorSettings;
 }
Exemple #13
0
 public BsQuickViewController(
     ICategoryService categoryService,
     IManufacturerService manufacturerService,
     IProductService productService,
     IVendorService vendorService,
     IProductTemplateService productTemplateService,
     IProductAttributeService productAttributeService,
     IWorkContext workContext,
     IStoreContext storeContext,
     ITaxService taxService,
     ICurrencyService currencyService,
     IPictureService pictureService,
     ILocalizationService localizationService,
     //change-3.7
     IMeasureService measureService,
     IPriceCalculationService priceCalculationService,
     IPriceFormatter priceFormatter,
     IWebHelper webHelper,
     ISpecificationAttributeService specificationAttributeService,
     IDateTimeHelper dateTimeHelper,
     IRecentlyViewedProductsService recentlyViewedProductsService,
     ICompareProductsService compareProductsService,
     IWorkflowMessageService workflowMessageService,
     IProductTagService productTagService,
     IOrderReportService orderReportService,
     IBackInStockSubscriptionService backInStockSubscriptionService,
     IAclService aclService,
     IStoreMappingService storeMappingService,
     IPermissionService permissionService,
     ICustomerActivityService customerActivityService,
     IProductAttributeParser productAttributeParser,
     IShippingService shippingService,
     MediaSettings mediaSettings,
     CatalogSettings catalogSettings,
     VendorSettings vendorSettings,
     ShoppingCartSettings shoppingCartSettings,
     LocalizationSettings localizationSettings,
     CustomerSettings customerSettings,
     CaptchaSettings captchaSettings,
     SeoSettings seoSettings,
     ICacheManager cacheManager,
     ISettingService settingService,
     IDownloadService downloadService, IProductModelFactory productModelFactory, IDateRangeService dateRangeService)
 {
     this._categoryService         = categoryService;
     this._manufacturerService     = manufacturerService;
     this._productService          = productService;
     this._vendorService           = vendorService;
     this._productTemplateService  = productTemplateService;
     this._productAttributeService = productAttributeService;
     this._workContext             = workContext;
     this._storeContext            = storeContext;
     this._taxService          = taxService;
     this._currencyService     = currencyService;
     this._pictureService      = pictureService;
     this._localizationService = localizationService;
     //change-3.7
     this._measureService          = measureService;
     this._priceCalculationService = priceCalculationService;
     this._priceFormatter          = priceFormatter;
     this._webHelper = webHelper;
     this._specificationAttributeService = specificationAttributeService;
     this._dateTimeHelper = dateTimeHelper;
     this._recentlyViewedProductsService  = recentlyViewedProductsService;
     this._compareProductsService         = compareProductsService;
     this._workflowMessageService         = workflowMessageService;
     this._productTagService              = productTagService;
     this._orderReportService             = orderReportService;
     this._backInStockSubscriptionService = backInStockSubscriptionService;
     this._aclService              = aclService;
     this._storeMappingService     = storeMappingService;
     this._permissionService       = permissionService;
     this._customerActivityService = customerActivityService;
     this._productAttributeParser  = productAttributeParser;
     this._shippingService         = shippingService;
     this._mediaSettings           = mediaSettings;
     this._catalogSettings         = catalogSettings;
     this._vendorSettings          = vendorSettings;
     this._shoppingCartSettings    = shoppingCartSettings;
     this._localizationSettings    = localizationSettings;
     this._customerSettings        = customerSettings;
     this._captchaSettings         = captchaSettings;
     this._seoSettings             = seoSettings;
     this._cacheManager            = cacheManager;
     this._settingService          = settingService;
     this._downloadService         = downloadService;
     _productModelFactory          = productModelFactory;
     _dateRangeService             = dateRangeService;
 }
Exemple #14
0
 public VendorViewModelService(IDiscountService discountService, IVendorService vendorService, ICustomerService customerService, ITranslationService translationService,
                               IDateTimeService dateTimeService, ICountryService countryService, IStoreService storeService, ISlugService slugService,
                               IPictureService pictureService, IMediator mediator, VendorSettings vendorSettings, ILanguageService languageService,
                               SeoSettings seoSettings)
 {
     _discountService    = discountService;
     _vendorService      = vendorService;
     _customerService    = customerService;
     _translationService = translationService;
     _dateTimeService    = dateTimeService;
     _countryService     = countryService;
     _storeService       = storeService;
     _slugService        = slugService;
     _pictureService     = pictureService;
     _mediator           = mediator;
     _languageService    = languageService;
     _vendorSettings     = vendorSettings;
     _seoSettings        = seoSettings;
 }
Exemple #15
0
 public CustomerModelFactory(IAddressModelFactory addressModelFactory,
                             IDateTimeHelper dateTimeHelper,
                             DateTimeSettings dateTimeSettings,
                             TaxSettings taxSettings,
                             ILocalizationService localizationService,
                             IWorkContext workContext,
                             IStoreContext storeContext,
                             IStoreMappingService storeMappingService,
                             ICustomerAttributeParser customerAttributeParser,
                             ICustomerAttributeService customerAttributeService,
                             IGenericAttributeService genericAttributeService,
                             RewardPointsSettings rewardPointsSettings,
                             CustomerSettings customerSettings,
                             AddressSettings addressSettings,
                             ForumSettings forumSettings,
                             OrderSettings orderSettings,
                             ICountryService countryService,
                             IStateProvinceService stateProvinceService,
                             IOrderService orderService,
                             IPictureService pictureService,
                             INewsLetterSubscriptionService newsLetterSubscriptionService,
                             IOpenAuthenticationService openAuthenticationService,
                             IDownloadService downloadService,
                             IReturnRequestService returnRequestService,
                             MediaSettings mediaSettings,
                             CaptchaSettings captchaSettings,
                             SecuritySettings securitySettings,
                             ExternalAuthenticationSettings externalAuthenticationSettings,
                             CatalogSettings catalogSettings,
                             VendorSettings vendorSettings)
 {
     this._addressModelFactory            = addressModelFactory;
     this._dateTimeHelper                 = dateTimeHelper;
     this._dateTimeSettings               = dateTimeSettings;
     this._taxSettings                    = taxSettings;
     this._localizationService            = localizationService;
     this._workContext                    = workContext;
     this._storeContext                   = storeContext;
     this._storeMappingService            = storeMappingService;
     this._customerAttributeParser        = customerAttributeParser;
     this._customerAttributeService       = customerAttributeService;
     this._genericAttributeService        = genericAttributeService;
     this._rewardPointsSettings           = rewardPointsSettings;
     this._customerSettings               = customerSettings;
     this._addressSettings                = addressSettings;
     this._forumSettings                  = forumSettings;
     this._orderSettings                  = orderSettings;
     this._countryService                 = countryService;
     this._stateProvinceService           = stateProvinceService;
     this._orderService                   = orderService;
     this._pictureService                 = pictureService;
     this._newsLetterSubscriptionService  = newsLetterSubscriptionService;
     this._openAuthenticationService      = openAuthenticationService;
     this._downloadService                = downloadService;
     this._returnRequestService           = returnRequestService;
     this._mediaSettings                  = mediaSettings;
     this._captchaSettings                = captchaSettings;
     this._securitySettings               = securitySettings;
     this._externalAuthenticationSettings = externalAuthenticationSettings;
     this._catalogSettings                = catalogSettings;
     this._vendorSettings                 = vendorSettings;
 }
Exemple #16
0
 public OverriddenProductController(AvalaraTaxManager avalaraTaxManager,
                                    IAclService aclService,
                                    IBackInStockSubscriptionService backInStockSubscriptionService,
                                    ICategoryService categoryService,
                                    ICopyProductService copyProductService,
                                    ICustomerActivityService customerActivityService,
                                    ICustomerService customerService,
                                    IDiscountService discountService,
                                    IDownloadService downloadService,
                                    IExportManager exportManager,
                                    IImportManager importManager,
                                    ILanguageService languageService,
                                    ILocalizationService localizationService,
                                    ILocalizedEntityService localizedEntityService,
                                    IManufacturerService manufacturerService,
                                    INopFileProvider fileProvider,
                                    INotificationService notificationService,
                                    IPdfService pdfService,
                                    IPermissionService permissionService,
                                    IPictureService pictureService,
                                    IProductAttributeParser productAttributeParser,
                                    IProductAttributeService productAttributeService,
                                    IProductModelFactory productModelFactory,
                                    IProductService productService,
                                    IProductTagService productTagService,
                                    ISettingService settingService,
                                    IShippingService shippingService,
                                    IShoppingCartService shoppingCartService,
                                    ISpecificationAttributeService specificationAttributeService,
                                    ITaxCategoryService taxCategoryService,
                                    ITaxPluginManager taxPluginManager,
                                    IUrlRecordService urlRecordService,
                                    IWorkContext workContext,
                                    VendorSettings vendorSettings) : base(aclService,
                                                                          backInStockSubscriptionService,
                                                                          categoryService,
                                                                          copyProductService,
                                                                          customerActivityService,
                                                                          customerService,
                                                                          discountService,
                                                                          downloadService,
                                                                          exportManager,
                                                                          importManager,
                                                                          languageService,
                                                                          localizationService,
                                                                          localizedEntityService,
                                                                          manufacturerService,
                                                                          fileProvider,
                                                                          notificationService,
                                                                          pdfService,
                                                                          permissionService,
                                                                          pictureService,
                                                                          productAttributeParser,
                                                                          productAttributeService,
                                                                          productModelFactory,
                                                                          productService,
                                                                          productTagService,
                                                                          settingService,
                                                                          shippingService,
                                                                          shoppingCartService,
                                                                          specificationAttributeService,
                                                                          urlRecordService,
                                                                          workContext,
                                                                          vendorSettings)
 {
     _avalaraTaxManager       = avalaraTaxManager;
     _localizationService     = localizationService;
     _notificationService     = notificationService;
     _permissionService       = permissionService;
     _productAttributeService = productAttributeService;
     _productService          = productService;
     _taxCategoryService      = taxCategoryService;
     _taxPluginManager        = taxPluginManager;
 }
 public CatalogController(ICategoryService categoryService,
                          IManufacturerService manufacturerService,
                          IProductService productService,
                          IVendorService vendorService,
                          ICategoryTemplateService categoryTemplateService,
                          IManufacturerTemplateService manufacturerTemplateService,
                          IWorkContext workContext,
                          IStoreContext storeContext,
                          ITaxService taxService,
                          ICurrencyService currencyService,
                          IPictureService pictureService,
                          ILocalizationService localizationService,
                          IPriceCalculationService priceCalculationService,
                          IPriceFormatter priceFormatter,
                          IWebHelper webHelper,
                          ISpecificationAttributeService specificationAttributeService,
                          IProductTagService productTagService,
                          IGenericAttributeService genericAttributeService,
                          IAclService aclService,
                          IStoreMappingService storeMappingService,
                          IPermissionService permissionService,
                          ICustomerActivityService customerActivityService,
                          ITopicService topicService,
                          IEventPublisher eventPublisher,
                          ISearchTermService searchTermService,
                          MediaSettings mediaSettings,
                          CatalogSettings catalogSettings,
                          VendorSettings vendorSettings,
                          BlogSettings blogSettings,
                          ForumSettings forumSettings,
                          ICacheManager cacheManager)
 {
     this._categoryService             = categoryService;
     this._manufacturerService         = manufacturerService;
     this._productService              = productService;
     this._vendorService               = vendorService;
     this._categoryTemplateService     = categoryTemplateService;
     this._manufacturerTemplateService = manufacturerTemplateService;
     this._workContext             = workContext;
     this._storeContext            = storeContext;
     this._taxService              = taxService;
     this._currencyService         = currencyService;
     this._pictureService          = pictureService;
     this._localizationService     = localizationService;
     this._priceCalculationService = priceCalculationService;
     this._priceFormatter          = priceFormatter;
     this._webHelper = webHelper;
     this._specificationAttributeService = specificationAttributeService;
     this._productTagService             = productTagService;
     this._genericAttributeService       = genericAttributeService;
     this._aclService              = aclService;
     this._storeMappingService     = storeMappingService;
     this._permissionService       = permissionService;
     this._customerActivityService = customerActivityService;
     this._topicService            = topicService;
     this._eventPublisher          = eventPublisher;
     this._searchTermService       = searchTermService;
     this._mediaSettings           = mediaSettings;
     this._catalogSettings         = catalogSettings;
     this._vendorSettings          = vendorSettings;
     this._blogSettings            = blogSettings;
     this._forumSettings           = forumSettings;
     this._cacheManager            = cacheManager;
 }
 public GetVendorNavigationHandler(ICacheManager cacheManager, IVendorService vendorService, VendorSettings vendorSettings)
 {
     _cacheManager   = cacheManager;
     _vendorService  = vendorService;
     _vendorSettings = vendorSettings;
 }
 public static VendorSettingsModel ToModel(this VendorSettings entity)
 {
     return(entity.MapTo <VendorSettings, VendorSettingsModel>());
 }
 public VendorNavigationViewComponent(ICatalogWebService catalogWebService,
                                      VendorSettings vendorSettings)
 {
     this._catalogWebService = catalogWebService;
     this._vendorSettings    = vendorSettings;
 }
 public CustomerModelFactory(AddressSettings addressSettings,
                             CaptchaSettings captchaSettings,
                             CatalogSettings catalogSettings,
                             CommonSettings commonSettings,
                             CustomerSettings customerSettings,
                             DateTimeSettings dateTimeSettings,
                             ExternalAuthenticationSettings externalAuthenticationSettings,
                             ForumSettings forumSettings,
                             GdprSettings gdprSettings,
                             IAddressModelFactory addressModelFactory,
                             IAuthenticationPluginManager authenticationPluginManager,
                             ICountryService countryService,
                             ICustomerAttributeParser customerAttributeParser,
                             ICustomerAttributeService customerAttributeService,
                             IDateTimeHelper dateTimeHelper,
                             IDownloadService downloadService,
                             IGdprService gdprService,
                             IGenericAttributeService genericAttributeService,
                             ILocalizationService localizationService,
                             INewsLetterSubscriptionService newsLetterSubscriptionService,
                             IOrderService orderService,
                             IPictureService pictureService,
                             IReturnRequestService returnRequestService,
                             IStateProvinceService stateProvinceService,
                             IStoreContext storeContext,
                             IStoreMappingService storeMappingService,
                             IUrlRecordService urlRecordService,
                             IWorkContext workContext,
                             MediaSettings mediaSettings,
                             OrderSettings orderSettings,
                             RewardPointsSettings rewardPointsSettings,
                             SecuritySettings securitySettings,
                             TaxSettings taxSettings,
                             VendorSettings vendorSettings)
 {
     _addressSettings  = addressSettings;
     _captchaSettings  = captchaSettings;
     _catalogSettings  = catalogSettings;
     _commonSettings   = commonSettings;
     _customerSettings = customerSettings;
     _dateTimeSettings = dateTimeSettings;
     _externalAuthenticationSettings = externalAuthenticationSettings;
     _forumSettings               = forumSettings;
     _gdprSettings                = gdprSettings;
     _addressModelFactory         = addressModelFactory;
     _authenticationPluginManager = authenticationPluginManager;
     _countryService              = countryService;
     _customerAttributeParser     = customerAttributeParser;
     _customerAttributeService    = customerAttributeService;
     _dateTimeHelper              = dateTimeHelper;
     _downloadService             = downloadService;
     _gdprService                   = gdprService;
     _genericAttributeService       = genericAttributeService;
     _localizationService           = localizationService;
     _newsLetterSubscriptionService = newsLetterSubscriptionService;
     _orderService                  = orderService;
     _pictureService                = pictureService;
     _returnRequestService          = returnRequestService;
     _stateProvinceService          = stateProvinceService;
     _storeContext                  = storeContext;
     _storeMappingService           = storeMappingService;
     _urlRecordService              = urlRecordService;
     _workContext                   = workContext;
     _mediaSettings                 = mediaSettings;
     _orderSettings                 = orderSettings;
     _rewardPointsSettings          = rewardPointsSettings;
     _securitySettings              = securitySettings;
     _taxSettings                   = taxSettings;
     _vendorSettings                = vendorSettings;
 }
 public static VendorSettingsModel ToModel(this VendorSettings entity)
 {
     return(Mapper.Map <VendorSettings, VendorSettingsModel>(entity));
 }
Exemple #23
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;
 }
 public static VendorSettings ToEntity(this VendorSettingsModel model, VendorSettings destination)
 {
     return(Mapper.Map(model, destination));
 }
Exemple #25
0
 public OrderModelFactory(AddressSettings addressSettings,
                          CatalogSettings catalogSettings,
                          IAddressModelFactory addressModelFactory,
                          IAddressService addressService,
                          ICountryService countryService,
                          ICurrencyService currencyService,
                          ICustomerService customerService,
                          IDateTimeHelper dateTimeHelper,
                          IGiftCardService giftCardService,
                          ILocalizationService localizationService,
                          IOrderProcessingService orderProcessingService,
                          IOrderService orderService,
                          IOrderTotalCalculationService orderTotalCalculationService,
                          IPaymentPluginManager paymentPluginManager,
                          IPaymentService paymentService,
                          IPriceFormatter priceFormatter,
                          IProductService productService,
                          IRewardPointService rewardPointService,
                          IShipmentService shipmentService,
                          IStateProvinceService stateProvinceService,
                          IStoreContext storeContext,
                          IUrlRecordService urlRecordService,
                          IVendorService vendorService,
                          IWorkContext workContext,
                          OrderSettings orderSettings,
                          PdfSettings pdfSettings,
                          RewardPointsSettings rewardPointsSettings,
                          ShippingSettings shippingSettings,
                          TaxSettings taxSettings,
                          VendorSettings vendorSettings)
 {
     _addressSettings              = addressSettings;
     _catalogSettings              = catalogSettings;
     _addressModelFactory          = addressModelFactory;
     _addressService               = addressService;
     _countryService               = countryService;
     _currencyService              = currencyService;
     _customerService              = customerService;
     _dateTimeHelper               = dateTimeHelper;
     _giftCardService              = giftCardService;
     _localizationService          = localizationService;
     _orderProcessingService       = orderProcessingService;
     _orderService                 = orderService;
     _orderTotalCalculationService = orderTotalCalculationService;
     _paymentPluginManager         = paymentPluginManager;
     _paymentService               = paymentService;
     _priceFormatter               = priceFormatter;
     _productService               = productService;
     _rewardPointService           = rewardPointService;
     _shipmentService              = shipmentService;
     _stateProvinceService         = stateProvinceService;
     _storeContext                 = storeContext;
     _urlRecordService             = urlRecordService;
     _vendorService                = vendorService;
     _workContext          = workContext;
     _orderSettings        = orderSettings;
     _pdfSettings          = pdfSettings;
     _rewardPointsSettings = rewardPointsSettings;
     _shippingSettings     = shippingSettings;
     _taxSettings          = taxSettings;
     _vendorSettings       = vendorSettings;
 }
Exemple #26
0
        public CommodityModelFactory(CatalogSettings catalogSettings,
                                     CurrencySettings currencySettings,
                                     IAclSupportedModelFactory aclSupportedModelFactory,
                                     IBaseAdminModelFactory baseAdminModelFactory,
                                     ICategoryService categoryService,
                                     ICurrencyService currencyService,
                                     ICustomerService customerService,
                                     IDateTimeHelper dateTimeHelper,
                                     IDiscountService discountService,
                                     IDiscountSupportedModelFactory discountSupportedModelFactory,
                                     ILocalizationService localizationService,
                                     ILocalizedModelFactory localizedModelFactory,
                                     IManufacturerService manufacturerService,
                                     IMeasureService measureService,
                                     IOrderService orderService,
                                     IPictureService pictureService,
                                     IProductAttributeFormatter productAttributeFormatter,
                                     IProductAttributeParser productAttributeParser,
                                     IProductAttributeService productAttributeService,
                                     IProductService productService,
                                     IProductTagService productTagService,
                                     IProductTemplateService productTemplateService,
                                     ISettingModelFactory settingModelFactory,
                                     IShipmentService shipmentService,
                                     IShippingService shippingService,
                                     IShoppingCartService shoppingCartService,
                                     ISpecificationAttributeService specificationAttributeService,
                                     IStaticCacheManager cacheManager,
                                     IStoreMappingSupportedModelFactory storeMappingSupportedModelFactory,
                                     IStoreService storeService,
                                     IUrlRecordService urlRecordService,
                                     IWorkContext workContext,
                                     MeasureSettings measureSettings,
                                     TaxSettings taxSettings,
                                     VendorSettings vendorSettings,

                                     ICommodityService commodityService
                                     )
        {
            _catalogSettings                   = catalogSettings;
            _currencySettings                  = currencySettings;
            _aclSupportedModelFactory          = aclSupportedModelFactory;
            _baseAdminModelFactory             = baseAdminModelFactory;
            _cacheManager                      = cacheManager;
            _categoryService                   = categoryService;
            _currencyService                   = currencyService;
            _customerService                   = customerService;
            _dateTimeHelper                    = dateTimeHelper;
            _discountService                   = discountService;
            _discountSupportedModelFactory     = discountSupportedModelFactory;
            _localizationService               = localizationService;
            _localizedModelFactory             = localizedModelFactory;
            _manufacturerService               = manufacturerService;
            _measureService                    = measureService;
            _measureSettings                   = measureSettings;
            _orderService                      = orderService;
            _pictureService                    = pictureService;
            _productAttributeFormatter         = productAttributeFormatter;
            _productAttributeParser            = productAttributeParser;
            _productAttributeService           = productAttributeService;
            _productService                    = productService;
            _productTagService                 = productTagService;
            _productTemplateService            = productTemplateService;
            _settingModelFactory               = settingModelFactory;
            _shipmentService                   = shipmentService;
            _shippingService                   = shippingService;
            _shoppingCartService               = shoppingCartService;
            _specificationAttributeService     = specificationAttributeService;
            _storeMappingSupportedModelFactory = storeMappingSupportedModelFactory;
            _storeService                      = storeService;
            _urlRecordService                  = urlRecordService;
            _workContext    = workContext;
            _taxSettings    = taxSettings;
            _vendorSettings = vendorSettings;

            _commodityService = commodityService;
        }
Exemple #27
0
 public CustomerViewModelService(
     IExternalAuthenticationService externalAuthenticationService,
     ICustomerAttributeParser customerAttributeParser,
     ICustomerAttributeService customerAttributeService,
     ILocalizationService localizationService,
     IDateTimeHelper dateTimeHelper,
     INewsLetterSubscriptionService newsLetterSubscriptionService,
     IWorkContext workContext,
     IStoreContext storeContext,
     ICountryService countryService,
     IStateProvinceService stateProvinceService,
     IGenericAttributeService genericAttributeService,
     IWorkflowMessageService workflowMessageService,
     IReturnRequestService returnRequestService,
     IStoreMappingService storeMappingService,
     IAddressViewModelService addressViewModelService,
     IOrderService orderService,
     IDownloadService downloadService,
     IPictureService pictureService,
     IProductService productService,
     IAuctionService auctionService,
     INewsletterCategoryService newsletterCategoryService,
     IServiceProvider serviceProvider,
     CustomerSettings customerSettings,
     DateTimeSettings dateTimeSettings,
     TaxSettings taxSettings,
     ForumSettings forumSettings,
     ExternalAuthenticationSettings externalAuthenticationSettings,
     SecuritySettings securitySettings,
     CaptchaSettings captchaSettings,
     RewardPointsSettings rewardPointsSettings,
     OrderSettings orderSettings,
     MediaSettings mediaSettings,
     VendorSettings vendorSettings
     )
 {
     this._externalAuthenticationService = externalAuthenticationService;
     this._customerAttributeParser       = customerAttributeParser;
     this._customerAttributeService      = customerAttributeService;
     this._localizationService           = localizationService;
     this._dateTimeHelper = dateTimeHelper;
     this._newsLetterSubscriptionService = newsLetterSubscriptionService;
     this._workContext                    = workContext;
     this._storeContext                   = storeContext;
     this._countryService                 = countryService;
     this._stateProvinceService           = stateProvinceService;
     this._genericAttributeService        = genericAttributeService;
     this._workflowMessageService         = workflowMessageService;
     this._returnRequestService           = returnRequestService;
     this._storeMappingService            = storeMappingService;
     this._addressViewModelService        = addressViewModelService;
     this._orderService                   = orderService;
     this._downloadService                = downloadService;
     this._pictureService                 = pictureService;
     this._productService                 = productService;
     this._auctionService                 = auctionService;
     this._newsletterCategoryService      = newsletterCategoryService;
     this._serviceProvider                = serviceProvider;
     this._customerSettings               = customerSettings;
     this._dateTimeSettings               = dateTimeSettings;
     this._taxSettings                    = taxSettings;
     this._forumSettings                  = forumSettings;
     this._externalAuthenticationSettings = externalAuthenticationSettings;
     this._securitySettings               = securitySettings;
     this._captchaSettings                = captchaSettings;
     this._rewardPointsSettings           = rewardPointsSettings;
     this._orderSettings                  = orderSettings;
     this._mediaSettings                  = mediaSettings;
     this._vendorSettings                 = vendorSettings;
 }
        public virtual async Task PrepareVendorAddressModel(VendorAddressModel model,
                                                            Address address, bool excludeProperties,
                                                            Func <IList <Country> > loadCountries = null,
                                                            bool prePopulateWithCustomerFields    = false,
                                                            Customer customer             = null,
                                                            VendorSettings vendorSettings = null)
        {
            if (model == null)
            {
                throw new ArgumentNullException("model");
            }

            if (!excludeProperties && address != null)
            {
                model.Company   = address.Company;
                model.CountryId = address.CountryId;
                Country country = null;
                if (!String.IsNullOrEmpty(address.CountryId))
                {
                    country = await _countryService.GetCountryById(address.CountryId);
                }
                model.CountryName = country != null?country.GetLocalized(x => x.Name, _workContext.WorkingLanguage.Id) : null;

                model.StateProvinceId = address.StateProvinceId;
                StateProvince state = null;
                if (!String.IsNullOrEmpty(address.StateProvinceId))
                {
                    state = await _stateProvinceService.GetStateProvinceById(address.StateProvinceId);
                }
                model.StateProvinceName = state != null?state.GetLocalized(x => x.Name, _workContext.WorkingLanguage.Id) : null;

                model.City          = address.City;
                model.Address1      = address.Address1;
                model.Address2      = address.Address2;
                model.ZipPostalCode = address.ZipPostalCode;
                model.PhoneNumber   = address.PhoneNumber;
                model.FaxNumber     = address.FaxNumber;
            }

            if (address == null && prePopulateWithCustomerFields)
            {
                if (customer == null)
                {
                    throw new Exception("Customer cannot be null when prepopulating an address");
                }
                model.Company = await customer.GetAttribute <string>(_genericAttributeService, SystemCustomerAttributeNames.Company);

                model.Address1 = await customer.GetAttribute <string>(_genericAttributeService, SystemCustomerAttributeNames.StreetAddress);

                model.Address2 = await customer.GetAttribute <string>(_genericAttributeService, SystemCustomerAttributeNames.StreetAddress2);

                model.ZipPostalCode = await customer.GetAttribute <string>(_genericAttributeService, SystemCustomerAttributeNames.ZipPostalCode);

                model.City = await customer.GetAttribute <string>(_genericAttributeService, SystemCustomerAttributeNames.City);

                model.PhoneNumber = await customer.GetAttribute <string>(_genericAttributeService, SystemCustomerAttributeNames.Phone);

                model.FaxNumber = await customer.GetAttribute <string>(_genericAttributeService, SystemCustomerAttributeNames.Fax);

                if (vendorSettings.CountryEnabled)
                {
                    model.CountryId = await customer.GetAttribute <string>(_genericAttributeService, SystemCustomerAttributeNames.CountryId);
                }

                if (vendorSettings.StateProvinceEnabled)
                {
                    model.StateProvinceId = await customer.GetAttribute <string>(_genericAttributeService, SystemCustomerAttributeNames.StateProvinceId);
                }
            }

            //countries and states
            if (vendorSettings.CountryEnabled && loadCountries != null)
            {
                model.AvailableCountries.Add(new SelectListItem {
                    Text = _localizationService.GetResource("Address.SelectCountry"), Value = ""
                });
                foreach (var c in loadCountries())
                {
                    model.AvailableCountries.Add(new SelectListItem
                    {
                        Text     = c.GetLocalized(x => x.Name, _workContext.WorkingLanguage.Id),
                        Value    = c.Id.ToString(),
                        Selected = c.Id == model.CountryId
                    });
                }

                if (vendorSettings.StateProvinceEnabled)
                {
                    var languageId = _workContext.WorkingLanguage.Id;
                    var states     = await _stateProvinceService
                                     .GetStateProvincesByCountryId(!String.IsNullOrEmpty(model.CountryId)?model.CountryId : "", languageId);

                    if (states.Any())
                    {
                        model.AvailableStates.Add(new SelectListItem {
                            Text = _localizationService.GetResource("Address.SelectState"), Value = ""
                        });

                        foreach (var s in states)
                        {
                            model.AvailableStates.Add(new SelectListItem
                            {
                                Text     = s.GetLocalized(x => x.Name, _workContext.WorkingLanguage.Id),
                                Value    = s.Id.ToString(),
                                Selected = (s.Id == model.StateProvinceId)
                            });
                        }
                    }
                    else
                    {
                        bool anyCountrySelected = model.AvailableCountries.Any(x => x.Selected);
                        model.AvailableStates.Add(new SelectListItem
                        {
                            Text  = _localizationService.GetResource(anyCountrySelected ? "Address.OtherNonUS" : "Address.SelectState"),
                            Value = ""
                        });
                    }
                }
            }

            //form fields
            model.CompanyEnabled         = vendorSettings.CompanyEnabled;
            model.CompanyRequired        = vendorSettings.CompanyRequired;
            model.StreetAddressEnabled   = vendorSettings.StreetAddressEnabled;
            model.StreetAddressRequired  = vendorSettings.StreetAddressRequired;
            model.StreetAddress2Enabled  = vendorSettings.StreetAddress2Enabled;
            model.StreetAddress2Required = vendorSettings.StreetAddress2Required;
            model.ZipPostalCodeEnabled   = vendorSettings.ZipPostalCodeEnabled;
            model.ZipPostalCodeRequired  = vendorSettings.ZipPostalCodeRequired;
            model.CityEnabled            = vendorSettings.CityEnabled;
            model.CityRequired           = vendorSettings.CityRequired;
            model.CountryEnabled         = vendorSettings.CountryEnabled;
            model.StateProvinceEnabled   = vendorSettings.StateProvinceEnabled;
            model.PhoneEnabled           = vendorSettings.PhoneEnabled;
            model.PhoneRequired          = vendorSettings.PhoneRequired;
            model.FaxEnabled             = vendorSettings.FaxEnabled;
            model.FaxRequired            = vendorSettings.FaxRequired;
        }
 public CommonModelFactory(BlogSettings blogSettings,
                           CaptchaSettings captchaSettings,
                           CatalogSettings catalogSettings,
                           CommonSettings commonSettings,
                           CustomerSettings customerSettings,
                           DisplayDefaultFooterItemSettings displayDefaultFooterItemSettings,
                           ForumSettings forumSettings,
                           IActionContextAccessor actionContextAccessor,
                           ICategoryService categoryService,
                           ICurrencyService currencyService,
                           ICustomerService customerService,
                           IForumService forumService,
                           IGenericAttributeService genericAttributeService,
                           IHostingEnvironment hostingEnvironment,
                           ILanguageService languageService,
                           ILocalizationService localizationService,
                           IManufacturerService manufacturerService,
                           INopFileProvider fileProvider,
                           IPageHeadBuilder pageHeadBuilder,
                           IPermissionService permissionService,
                           IPictureService pictureService,
                           IProductService productService,
                           IProductTagService productTagService,
                           ISitemapGenerator sitemapGenerator,
                           IStaticCacheManager cacheManager,
                           IStoreContext storeContext,
                           IThemeContext themeContext,
                           IThemeProvider themeProvider,
                           ITopicService topicService,
                           IUrlHelperFactory urlHelperFactory,
                           IUrlRecordService urlRecordService,
                           IWebHelper webHelper,
                           IWorkContext workContext,
                           LocalizationSettings localizationSettings,
                           NewsSettings newsSettings,
                           StoreInformationSettings storeInformationSettings,
                           VendorSettings vendorSettings)
 {
     this._blogSettings     = blogSettings;
     this._captchaSettings  = captchaSettings;
     this._catalogSettings  = catalogSettings;
     this._commonSettings   = commonSettings;
     this._customerSettings = customerSettings;
     this._displayDefaultFooterItemSettings = displayDefaultFooterItemSettings;
     this._forumSettings           = forumSettings;
     this._actionContextAccessor   = actionContextAccessor;
     this._categoryService         = categoryService;
     this._currencyService         = currencyService;
     this._customerService         = customerService;
     this._forumService            = forumService;
     this._genericAttributeService = genericAttributeService;
     this._hostingEnvironment      = hostingEnvironment;
     this._languageService         = languageService;
     this._localizationService     = localizationService;
     this._manufacturerService     = manufacturerService;
     this._fileProvider            = fileProvider;
     this._pageHeadBuilder         = pageHeadBuilder;
     this._permissionService       = permissionService;
     this._pictureService          = pictureService;
     this._productService          = productService;
     this._productTagService       = productTagService;
     this._sitemapGenerator        = sitemapGenerator;
     this._cacheManager            = cacheManager;
     this._storeContext            = storeContext;
     this._themeContext            = themeContext;
     this._themeProvider           = themeProvider;
     this._topicService            = topicService;
     this._urlHelperFactory        = urlHelperFactory;
     this._urlRecordService        = urlRecordService;
     this._webHelper                = webHelper;
     this._workContext              = workContext;
     this._localizationSettings     = localizationSettings;
     this._newsSettings             = newsSettings;
     this._storeInformationSettings = storeInformationSettings;
     this._vendorSettings           = vendorSettings;
 }
 public VendorAddressValidator(
     IEnumerable <IValidatorConsumer <VendorAddressModel> > validators,
     ITranslationService translationService,
     ICountryService countryServices,
     VendorSettings addressSettings)
     : base(validators)
 {
     if (addressSettings.CountryEnabled)
     {
         RuleFor(x => x.CountryId)
         .NotNull()
         .WithMessage(translationService.GetResource("Account.VendorInfo.Country.Required"));
         RuleFor(x => x.CountryId)
         .NotEqual("")
         .WithMessage(translationService.GetResource("Account.VendorInfo.Country.Required"));
     }
     if (addressSettings.CountryEnabled && addressSettings.StateProvinceEnabled)
     {
         RuleFor(x => x.StateProvinceId).MustAsync(async(x, y, context) =>
         {
             //does selected country has states?
             var countryId = !String.IsNullOrEmpty(x.CountryId) ? x.CountryId : "";
             var hasStates = (await countryServices.GetCountryById(countryId))?.StateProvinces.Count > 0;
             if (hasStates)
             {
                 //if yes, then ensure that state is selected
                 if (String.IsNullOrEmpty(y))
                 {
                     return(false);
                 }
             }
             return(true);
         }).WithMessage(translationService.GetResource("Account.VendorInfo.StateProvince.Required"));
     }
     if (addressSettings.CompanyRequired && addressSettings.CompanyEnabled)
     {
         RuleFor(x => x.Company).NotEmpty().WithMessage(translationService.GetResource("Account.VendorInfo.Company.Required"));
     }
     if (addressSettings.StreetAddressRequired && addressSettings.StreetAddressEnabled)
     {
         RuleFor(x => x.Address1).NotEmpty().WithMessage(translationService.GetResource("Account.VendorInfo.Address1.Required"));
     }
     if (addressSettings.StreetAddress2Required && addressSettings.StreetAddress2Enabled)
     {
         RuleFor(x => x.Address2).NotEmpty().WithMessage(translationService.GetResource("Account.VendorInfo.Address2.Required"));
     }
     if (addressSettings.ZipPostalCodeRequired && addressSettings.ZipPostalCodeEnabled)
     {
         RuleFor(x => x.ZipPostalCode).NotEmpty().WithMessage(translationService.GetResource("Account.VendorInfo.ZipPostalCode.Required"));
     }
     if (addressSettings.CityRequired && addressSettings.CityEnabled)
     {
         RuleFor(x => x.City).NotEmpty().WithMessage(translationService.GetResource("Account.VendorInfo.City.Required"));
     }
     if (addressSettings.PhoneRequired && addressSettings.PhoneEnabled)
     {
         RuleFor(x => x.PhoneNumber).NotEmpty().WithMessage(translationService.GetResource("Account.VendorInfo.phonenumber.Required"));
     }
     if (addressSettings.FaxRequired && addressSettings.FaxEnabled)
     {
         RuleFor(x => x.FaxNumber).NotEmpty().WithMessage(translationService.GetResource("Account.VendorInfo.faxnumber.Required"));
     }
 }