public OrderService(IRepository<ProductRecord> productRepository, IContentManager contentManager, IRepository<OrderRecord> orderRepository, IRepository<CustomerRecord> customerRepository, ISiteService siteService, IClock clock) { _productRepository = productRepository; _contentManager = contentManager; _orderRepository = orderRepository; _customerRepository = customerRepository; _siteService = siteService; _webShopSettings = _siteService.GetSiteSettings().As<WebShopSettingsPart>(); _clock = clock; }
public OrderService(IRepository <ProductRecord> productRepository, IContentManager contentManager, IRepository <OrderRecord> orderRepository, IRepository <CustomerRecord> customerRepository, ISiteService siteService, IClock clock) { _productRepository = productRepository; _contentManager = contentManager; _orderRepository = orderRepository; _customerRepository = customerRepository; _siteService = siteService; _webShopSettings = _siteService.GetSiteSettings().As <WebShopSettingsPart>(); _clock = clock; }
public OrderService(/*IDateTimeService dateTimeService,*/ IRepository<ProductRecord> productRepository, IContentManager contentManager, IRepository<OrderRecord> orderRepository, IRepository<OrderDetailRecord> orderDetailRepository, IRepository<CustomerRecord> customerRepository, ISiteService siteService) { //_dateTimeService = dateTimeService; _productRepository = productRepository; _contentManager = contentManager; _orderRepository = orderRepository; _orderDetailRepository = orderDetailRepository; _customerRepository = customerRepository; _siteService = siteService; _webShopSettings = _siteService.GetSiteSettings().As<WebShopSettingsPart>(); }
public void Map(WebShopSettingsPart part, WebShopSettingsVM vm) { if (vm.ShippingProductRecordId.HasValue) { part.ShippingProductRecord = GetShippingProduct(vm.ShippingProductRecordId.Value); } part.AdministratorEmailAddress = vm.AdministratorEmailAddress; part.ContinueShoppingUrl = vm.ContinueShoppingUrl; part.ShowSubscribeToMailingList = vm.ShowSubscribeToMailingList; part.SendWelcomeEmail = vm.SendWelcomeEmail; part.ShowTermsAndConditions = vm.ShowTermsAndConditions; part.TermsAndConditionsUrl = vm.TermsAndConditionsUrl; part.PrivacyUrl = vm.PrivacyUrl; part.WelcomeBodyTemplate = vm.WelcomeBodyTemplate; part.WelcomeSubject = vm.WelcomeSubject; part.UnsubscribeEmail = vm.UnsubscribeEmail; part.UseMailChimp = vm.UseMailChimp; part.MailChimpApiKey = vm.MailChimpApiKey; part.MailChimpListName = vm.MailChimpListName; part.MailChimpGroupName = vm.MailChimpGroupName; part.MailChimpGroupValue = vm.MailChimpGroupValue; }
public WebShopSettingsVM BuildWebShopVM(WebShopSettingsPart part) { return(new WebShopSettingsVM { ShippingProducts = ShippingProductRecords(), ShippingProductRecordId = part.ShippingProductRecord == null ? 0 : part.ShippingProductRecord.Id, AdministratorEmailAddress = part.AdministratorEmailAddress, ContinueShoppingUrl = part.ContinueShoppingUrl, ShowSubscribeToMailingList = part.ShowSubscribeToMailingList, SendWelcomeEmail = part.SendWelcomeEmail, ShowTermsAndConditions = part.ShowTermsAndConditions, TermsAndConditionsUrl = part.TermsAndConditionsUrl, PrivacyUrl = part.PrivacyUrl, WelcomeBodyTemplate = part.WelcomeBodyTemplate, WelcomeSubject = part.WelcomeSubject, UnsubscribeEmail = part.UnsubscribeEmail, UseMailChimp = part.UseMailChimp, MailChimpApiKey = part.MailChimpApiKey, MailChimpListName = part.MailChimpListName, MailChimpGroupName = part.MailChimpGroupName, MailChimpGroupValue = part.MailChimpGroupValue }); }
public void Map(WebShopSettingsPart part, WebShopSettingsVM vm) { if(vm.ShippingProductRecordId.HasValue) part.ShippingProductRecord = GetShippingProduct(vm.ShippingProductRecordId.Value); part.AdministratorEmailAddress = vm.AdministratorEmailAddress; part.ContinueShoppingUrl = vm.ContinueShoppingUrl; part.ShowSubscribeToMailingList = vm.ShowSubscribeToMailingList; part.SendWelcomeEmail = vm.SendWelcomeEmail; part.ShowTermsAndConditions = vm.ShowTermsAndConditions; part.TermsAndConditionsUrl = vm.TermsAndConditionsUrl; part.PrivacyUrl = vm.PrivacyUrl; part.WelcomeBodyTemplate = vm.WelcomeBodyTemplate; part.WelcomeSubject = vm.WelcomeSubject; part.UnsubscribeEmail = vm.UnsubscribeEmail; part.UseMailChimp = vm.UseMailChimp; part.MailChimpApiKey = vm.MailChimpApiKey; part.MailChimpListName = vm.MailChimpListName; part.MailChimpGroupName = vm.MailChimpGroupName; part.MailChimpGroupValue = vm.MailChimpGroupValue; }
public WebShopSettingsVM BuildWebShopVM(WebShopSettingsPart part) { return new WebShopSettingsVM { ShippingProducts = ShippingProductRecords(), ShippingProductRecordId = part.ShippingProductRecord == null ? 0 : part.ShippingProductRecord.Id, AdministratorEmailAddress = part.AdministratorEmailAddress, ContinueShoppingUrl = part.ContinueShoppingUrl, ShowSubscribeToMailingList = part.ShowSubscribeToMailingList, SendWelcomeEmail = part.SendWelcomeEmail, ShowTermsAndConditions = part.ShowTermsAndConditions, TermsAndConditionsUrl = part.TermsAndConditionsUrl, PrivacyUrl = part.PrivacyUrl, WelcomeBodyTemplate = part.WelcomeBodyTemplate, WelcomeSubject = part.WelcomeSubject, UnsubscribeEmail = part.UnsubscribeEmail, UseMailChimp = part.UseMailChimp, MailChimpApiKey = part.MailChimpApiKey, MailChimpListName = part.MailChimpListName, MailChimpGroupName = part.MailChimpGroupName, MailChimpGroupValue = part.MailChimpGroupValue }; }