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;
 }
Esempio n. 2
0
 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;
 }
Esempio n. 3
0
 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>();
 }
Esempio n. 4
0
 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;
 }
Esempio n. 5
0
 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
     };
 }