public AddressesController( IOrderService orderService, IPaymentService paymentService, IShoppingCart shoppingCart, IOrchardServices orchardServices, ICurrencyProvider currencyProvider, INwazetCommunicationService nwazetCommunicationService, IWorkContextAccessor workContextAccessor, IShapeFactory shapeFactory, ITransactionManager transactionManager, IContentManager contentManager, INotifier notifier, IProductPriceService productPriceService, IAddressConfigurationService addressConfigurationService, IEnumerable <IOrderAdditionalInformationProvider> orderAdditionalInformationProviders, IEnumerable <IValidationProvider> validationProvider) { _orderService = orderService; _paymentService = paymentService; _shoppingCart = shoppingCart; _orchardServices = orchardServices; _currencyProvider = currencyProvider; _nwazetCommunicationService = nwazetCommunicationService; _workContextAccessor = workContextAccessor; _shapeFactory = shapeFactory; _transactionManager = transactionManager; _contentManager = contentManager; _notifier = notifier; _productPriceService = productPriceService; _addressConfigurationService = addressConfigurationService; _orderAdditionalInformationProviders = orderAdditionalInformationProviders; _validationProvider = validationProvider; T = NullLocalizer.Instance; }
public static AddressEditViewModel CreateVM( IAddressConfigurationService _addressConfigurationService, AddressRecordType addressRecordType, AddressEditViewModel viewModel) { if (viewModel == null) { viewModel = CreateVM(_addressConfigurationService); } else { viewModel.Countries = _addressConfigurationService .CountryOptions(); if (addressRecordType == AddressRecordType.ShippingAddress) { viewModel.ShippingCountries = _addressConfigurationService .CountryOptions(AddressRecordType.ShippingAddress, viewModel.CountryId); } if (addressRecordType == AddressRecordType.BillingAddress) { viewModel.BillingCountries = _addressConfigurationService .CountryOptions(AddressRecordType.BillingAddress, viewModel.CountryId); } if (viewModel.ProvinceId <= 0 && !string.IsNullOrWhiteSpace(viewModel.Province)) { viewModel.ProvinceId = -1; } if (viewModel.CityId <= 0 && !string.IsNullOrWhiteSpace(viewModel.City)) { viewModel.CityId = -1; } } viewModel.AddressType = addressRecordType; return(viewModel); }
public AddressConfigurationAdminController( IAuthorizer authorizer, ISiteService siteService, IContentManager contentManager, ITransactionManager transactionManager, INotifier notifier, IAddressConfigurationService addressConfigurationService, IAddressConfigurationSettingsService addressSettingsService, ITerritoryPartRecordService territoryPartRecordService) { _authorizer = authorizer; _siteService = siteService; _contentManager = contentManager; _transactionManager = transactionManager; _notifier = notifier; _addressConfigurationService = addressConfigurationService; _addressSettingsService = addressSettingsService; _territoryPartRecordService = territoryPartRecordService; T = NullLocalizer.Instance; administrativeTypeNames = new Dictionary <TerritoryAdministrativeType, string>(); administrativeTypeNames.Add(TerritoryAdministrativeType.None, T("Undefined").Text); administrativeTypeNames.Add(TerritoryAdministrativeType.Country, T("Country").Text); administrativeTypeNames.Add(TerritoryAdministrativeType.Province, T("Province").Text); administrativeTypeNames.Add(TerritoryAdministrativeType.City, T("City").Text); }
public static AddressEditViewModel CreateVM( IAddressConfigurationService _addressConfigurationService, AddressRecordType addressRecordType) { var vm = CreateVM(_addressConfigurationService); vm.AddressType = addressRecordType; return(vm); }
public AddressOrderPartDriver( IAuthorizer authorizer, IAddressConfigurationService addressConfigurationService, IContentManager contentManager) { _authorizer = authorizer; _addressConfigurationService = addressConfigurationService; _contentManager = contentManager; T = NullLocalizer.Instance; }
public AddressConfigurationSiteSettingsPartDriver( IContentManager contentManager, IAddressConfigurationService addressConfigurationService, ITerritoriesRepositoryService territoriesRepositoryService, IAddressConfigurationSettingsService addressConfigurationSettingsService) { _contentManager = contentManager; _addressConfigurationService = addressConfigurationService; _territoriesRepositoryService = territoriesRepositoryService; _addressConfigurationSettingsService = addressConfigurationSettingsService; }
public TerritoriesApiController( IContentManager contentManager, IAuthorizer authorizer, IAddressConfigurationService addressConfigurationService) { _contentManager = contentManager; _authorizer = authorizer; _addressConfigurationService = addressConfigurationService; T = NullLocalizer.Instance; }
public static void ReinflateViewModelAddresses( CheckoutViewModel vm, IContentManager contentManager, IAddressConfigurationService addressConfigurationService) { // addresses if ((vm.ShippingAddressVM == null || vm.BillingAddressVM == null) && !string.IsNullOrWhiteSpace(vm.SerializedAddresses)) { vm.DecodeAddresses(); } Func <string, int, string> inflateName = (str, id) => { if (string.IsNullOrWhiteSpace(str)) { var territory = addressConfigurationService .SingleTerritory(id); if (territory != null) { return(contentManager .GetItemMetadata(territory).DisplayText); } } return(str); }; if (vm.ShippingAddressVM != null) { if (vm.ShippingAddress == null) { vm.ShippingAddress = AddressFromVM(vm.ShippingAddressVM); } // reinflate the names of country, province and city vm.ShippingAddressVM.Country = inflateName( vm.ShippingAddressVM.Country, vm.ShippingAddressVM.CountryId); vm.ShippingAddressVM.Province = inflateName( vm.ShippingAddressVM.Province, vm.ShippingAddressVM.ProvinceId); vm.ShippingAddressVM.City = inflateName( vm.ShippingAddressVM.City, vm.ShippingAddressVM.CityId); } if (vm.BillingAddressVM != null) { if (vm.BillingAddress == null) { vm.BillingAddress = AddressFromVM(vm.BillingAddressVM); } // reinflate the names of country, province and city vm.BillingAddressVM.Country = inflateName( vm.BillingAddressVM.Country, vm.BillingAddressVM.CountryId); vm.BillingAddressVM.Province = inflateName( vm.BillingAddressVM.Province, vm.BillingAddressVM.ProvinceId); vm.BillingAddressVM.City = inflateName( vm.BillingAddressVM.City, vm.BillingAddressVM.CityId); } }
public ValidationAddressViewModelService( IAddressConfigurationService addressConfigurationService, ISiteService siteService, ICacheManager cacheManager, ISignals signals) { _addressConfigurationService = addressConfigurationService; _siteService = siteService; _cacheManager = cacheManager; _signals = signals; T = NullLocalizer.Instance; }
public static AddressEditViewModel CreateVM( IAddressConfigurationService _addressConfigurationService) { return(new AddressEditViewModel() { Countries = _addressConfigurationService .CountryOptions(), ShippingCountries = _addressConfigurationService .CountryOptions(AddressRecordType.ShippingAddress), BillingCountries = _addressConfigurationService .CountryOptions(AddressRecordType.BillingAddress) }); }
public DestinationTerritoryCriteria( ITerritoriesRepositoryService territoriesRepositoryService, IAddressConfigurationService addressConfigurationService, ITerritoryPartRecordService territoryPartRecordService, IAddressConfigurationSettingsService addressConfigurationSettingsService) { _territoriesRepositoryService = territoriesRepositoryService; _addressConfigurationService = addressConfigurationService; _territoryPartRecordService = territoryPartRecordService; _addressConfigurationSettingsService = addressConfigurationSettingsService; T = NullLocalizer.Instance; }
public CheckoutController( IWorkContextAccessor workContextAccessor, IAddressConfigurationService addressConfigurationService, INwazetCommunicationService nwazetCommunicationService, IEnumerable <IValidationProvider> validationProviders, IEnumerable <IShippingMethodProvider> shippingMethodProviders, IShoppingCart shoppingCart, ICurrencyProvider currencyProvider, IContentManager contentManager, IEnumerable <IPosService> posServices, ICheckoutHelperService checkoutHelperService, ShellSettings shellSettings, IProductPriceService productPriceService, INotifier notifier, IEnumerable <ICheckoutExtensionProvider> checkoutExtensionProviders) { _workContextAccessor = workContextAccessor; _addressConfigurationService = addressConfigurationService; _nwazetCommunicationService = nwazetCommunicationService; _validationProviders = validationProviders; _shippingMethodProviders = shippingMethodProviders; _shoppingCart = shoppingCart; _currencyProvider = currencyProvider; _contentManager = contentManager; _posServices = posServices; _checkoutHelperService = checkoutHelperService; _shellSettings = shellSettings; _productPriceService = productPriceService; _notifier = notifier; _checkoutExtensionProviders = checkoutExtensionProviders; if (!string.IsNullOrEmpty(_shellSettings.RequestUrlPrefix)) { _urlPrefix = new UrlPrefix(_shellSettings.RequestUrlPrefix); } T = NullLocalizer.Instance; }
public ValidationAddressViewModelService( IAddressConfigurationService addressConfigurationService) { _addressConfigurationService = addressConfigurationService; }