• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# IShoppingCartService类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中IShoppingCartService的典型用法代码示例。如果您正苦于以下问题:C# IShoppingCartService类的具体用法?C# IShoppingCartService怎么用?C# IShoppingCartService使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



IShoppingCartService类属于命名空间,在下文中一共展示了IShoppingCartService类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: ExternalAuthorizer

 public ExternalAuthorizer(IAuthenticationService authenticationService,
     IOpenAuthenticationService openAuthenticationService,
     IGenericAttributeService genericAttributeService,
     ICustomerRegistrationService customerRegistrationService, 
     ICustomerActivityService customerActivityService, 
     ILocalizationService localizationService,
     IWorkContext workContext,
     IStoreContext storeContext,
     CustomerSettings customerSettings,
     ExternalAuthenticationSettings externalAuthenticationSettings,
     IShoppingCartService shoppingCartService,
     IWorkflowMessageService workflowMessageService,
     IEventPublisher eventPublisher,
     LocalizationSettings localizationSettings)
 {
     this._authenticationService = authenticationService;
     this._openAuthenticationService = openAuthenticationService;
     this._genericAttributeService = genericAttributeService;
     this._customerRegistrationService = customerRegistrationService;
     this._customerActivityService = customerActivityService;
     this._localizationService = localizationService;
     this._workContext = workContext;
     this._storeContext = storeContext;
     this._customerSettings = customerSettings;
     this._externalAuthenticationSettings = externalAuthenticationSettings;
     this._shoppingCartService = shoppingCartService;
     this._workflowMessageService = workflowMessageService;
     this._eventPublisher = eventPublisher;
     this._localizationSettings = localizationSettings;
 }
开发者ID:491134648,项目名称:nopCommerce,代码行数:30,代码来源:ExternalAuthorizer.cs


示例2: CommonController

 public CommonController(IPaymentService paymentService, 
     IShippingService shippingService,
     IShoppingCartService shoppingCartService,
     ICurrencyService currencyService,
     IMeasureService measureService,
     ICustomerService customerService,
     IUrlRecordService urlRecordService,
     IWebHelper webHelper,
     CurrencySettings currencySettings,
     MeasureSettings measureSettings,
     IDateTimeHelper dateTimeHelper,
     ILanguageService languageService,
     IWorkContext workContext,
     IStoreContext storeContext,
     IPermissionService permissionService,
     ILocalizationService localizationService)
 {
     this._paymentService = paymentService;
     this._shippingService = shippingService;
     this._shoppingCartService = shoppingCartService;
     this._currencyService = currencyService;
     this._measureService = measureService;
     this._customerService = customerService;
     this._urlRecordService = urlRecordService;
     this._webHelper = webHelper;
     this._currencySettings = currencySettings;
     this._measureSettings = measureSettings;
     this._dateTimeHelper = dateTimeHelper;
     this._languageService = languageService;
     this._workContext = workContext;
     this._storeContext = storeContext;
     this._permissionService = permissionService;
     this._localizationService = localizationService;
 }
开发者ID:emretiryaki,项目名称:paymill-nopcommerce,代码行数:34,代码来源:CommonController.cs


示例3: BuildCart

        public void BuildCart(IShoppingCartService ShoppingCartService, ShoppingCart Cart)
        {
            LocationsStateRecord state = null;
            LocationsCountryRecord country = null;

            // Based on user selected location
            Int32 countryId = ShoppingCartService.GetProperty<int>("CountryId");
            if (countryId > 0) {
                country = _locationsService.GetCountry(countryId);
                Int32 stateId = ShoppingCartService.GetProperty<int>("StateId");
                if (stateId > 0) {
                    state = _locationsService.GetState(stateId);
                }
            }
            else {
                // Set default country
                country = _locationsService.GetDefaultCountry();
                if (country != null) {
                    ShoppingCartService.SetProperty<int>("CountryId", country.Id);
                }
            }

            Cart.Properties["BillingCountry"] = country;
            Cart.Properties["BillingState"] = state;
            Cart.Properties["ShippingCountry"] = country;
            Cart.Properties["ShippingState"] = state;
        }
开发者ID:rtpHarry,项目名称:OShop,代码行数:27,代码来源:LocationResolver.cs


示例4: ShoppingCartController

 public ShoppingCartController(IOrchardServices orchardServices, ICatalogService catalogService, IShoppingCartService shoppingCartService)
     : base(orchardServices)
 {
     _orchardServices = orchardServices;
     _catalogService = catalogService;
     _shoppingCartService = shoppingCartService;
 }
开发者ID:priaonehaha,项目名称:vc-orchard-cms,代码行数:7,代码来源:ShoppingCartController.cs


示例5: CheckoutController

        public CheckoutController(IWorkContext workContext,
            IShoppingCartService shoppingCartService, ILocalizationService localizationService,
            ITaxService taxService, ICurrencyService currencyService,
            IPriceFormatter priceFormatter, IOrderProcessingService orderProcessingService,
            ICustomerService customerService,  ICountryService countryService,
            IStateProvinceService stateProvinceService, IShippingService shippingService,
            IPaymentService paymentService, IOrderTotalCalculationService orderTotalCalculationService,
            ILogger logger, IOrderService orderService, IWebHelper webHelper,
            OrderSettings orderSettings, RewardPointsSettings rewardPointsSettings,
            PaymentSettings paymentSettings)
        {
            this._workContext = workContext;
            this._shoppingCartService = shoppingCartService;
            this._localizationService = localizationService;
            this._taxService = taxService;
            this._currencyService = currencyService;
            this._priceFormatter = priceFormatter;
            this._orderProcessingService = orderProcessingService;
            this._customerService = customerService;
            this._countryService = countryService;
            this._stateProvinceService = stateProvinceService;
            this._shippingService = shippingService;
            this._paymentService = paymentService;
            this._orderTotalCalculationService = orderTotalCalculationService;
            this._logger = logger;
            this._orderService = orderService;
            this._webHelper = webHelper;

            this._orderSettings = orderSettings;
            this._rewardPointsSettings = rewardPointsSettings;
            this._paymentSettings = paymentSettings;
        }
开发者ID:cmcginn,项目名称:StoreFront,代码行数:32,代码来源:CheckoutController.cs


示例6: ProductController

        public ProductController(
			ICommonServices services,
			IManufacturerService manufacturerService,
			IProductService productService,
			IProductAttributeService productAttributeService,
			IProductAttributeParser productAttributeParser,
			ITaxService taxService,
			ICurrencyService currencyService,
			IPictureService pictureService,
			IPriceCalculationService priceCalculationService, 
			IPriceFormatter priceFormatter,
			ICustomerContentService customerContentService, 
			ICustomerService customerService,
			IShoppingCartService shoppingCartService,
			IRecentlyViewedProductsService recentlyViewedProductsService, 
			IWorkflowMessageService workflowMessageService, 
			IProductTagService productTagService,
			IOrderReportService orderReportService,
			IBackInStockSubscriptionService backInStockSubscriptionService, 
			IAclService aclService,
			IStoreMappingService storeMappingService,
			MediaSettings mediaSettings, 
			CatalogSettings catalogSettings,
			ShoppingCartSettings shoppingCartSettings,
			LocalizationSettings localizationSettings, 
			CaptchaSettings captchaSettings,
			CatalogHelper helper,
            IDownloadService downloadService,
            ILocalizationService localizationService)
        {
            this._services = services;
            this._manufacturerService = manufacturerService;
            this._productService = productService;
            this._productAttributeService = productAttributeService;
            this._productAttributeParser = productAttributeParser;
            this._taxService = taxService;
            this._currencyService = currencyService;
            this._pictureService = pictureService;
            this._priceCalculationService = priceCalculationService;
            this._priceFormatter = priceFormatter;
            this._customerContentService = customerContentService;
            this._customerService = customerService;
            this._shoppingCartService = shoppingCartService;
            this._recentlyViewedProductsService = recentlyViewedProductsService;
            this._workflowMessageService = workflowMessageService;
            this._productTagService = productTagService;
            this._orderReportService = orderReportService;
            this._backInStockSubscriptionService = backInStockSubscriptionService;
            this._aclService = aclService;
            this._storeMappingService = storeMappingService;
            this._mediaSettings = mediaSettings;
            this._catalogSettings = catalogSettings;
            this._shoppingCartSettings = shoppingCartSettings;
            this._localizationSettings = localizationSettings;
            this._captchaSettings = captchaSettings;
            this._helper = helper;
            this._downloadService = downloadService;
            this._localizationService = localizationService;
        }
开发者ID:mandocaesar,项目名称:Mesinku,代码行数:59,代码来源:ProductController.cs


示例7: BuildOrder

        public void BuildOrder(IShoppingCartService ShoppingCartService, IContent Order)
        {
            var customer = _customersService.GetCustomer();

            if (customer == null) {
                return;
            }

            OrderAddressRecord billingAddress = null, shippingAddress = null;
            Int32 billingAddressId = ShoppingCartService.GetProperty<int>("BillingAddressId");
            if (billingAddressId > 0) {
                var customerBillingAddress = customer.Addresses.Where(a => a.Id == billingAddressId).FirstOrDefault();
                if (customerBillingAddress != null) {
                    billingAddress = new OrderAddressRecord();
                    customerBillingAddress.CopyTo(billingAddress);
                }
            }
            Int32 shippingAddressId = ShoppingCartService.GetProperty<int>("ShippingAddressId");
            if (shippingAddressId > 0) {
                if (shippingAddressId == billingAddressId) {
                    shippingAddress = billingAddress;
                }
                else {
                    var customerShippingAddress = customer.Addresses.Where(a => a.Id == shippingAddressId).FirstOrDefault();
                    if (customerShippingAddress != null) {
                        shippingAddress = new OrderAddressRecord();
                        customerShippingAddress.CopyTo(shippingAddress);
                    }
                }
            }

            var customerOrderPart = Order.As<CustomerOrderPart>();
            if (customerOrderPart != null) {
                customerOrderPart.Customer = customer;
            }

            var orderPart = Order.As<OrderPart>();
            if (orderPart != null && billingAddress != null) {
                orderPart.BillingAddress = billingAddress;
            }

            var shippingPart = Order.As<OrderShippingPart>();
            if (shippingPart != null) {
                //  Shipping address
                if (shippingAddress != null) {
                    // Set address
                    shippingPart.ShippingAddress = shippingAddress;

                    // Set shipping zone
                    var workContext = _workContextAccessor.GetContext();
                    if (shippingAddress.State != null && shippingAddress.State.Enabled && shippingAddress.State.ShippingZoneRecord != null) {
                        workContext.SetState("OShop.Orders.ShippingZone", shippingAddress.State.ShippingZoneRecord);
                    }
                    else if (shippingAddress.Country != null && shippingAddress.Country.Enabled && shippingAddress.Country.ShippingZoneRecord != null) {
                        workContext.SetState("OShop.Orders.ShippingZone", shippingAddress.Country.ShippingZoneRecord);
                    }
                }
            }
        }
开发者ID:rtpHarry,项目名称:OShop,代码行数:59,代码来源:CustomerResolver.cs


示例8: BuildCart

 public void BuildCart(IShoppingCartService ShoppingCartService, ShoppingCart Cart)
 {
     var shippingPrice = Cart.Shipping as IPrice;
     var shippingVat = (Cart.Shipping as IContent).GetVatRate();
     if (shippingPrice != null && shippingVat != null && shippingPrice.Price != 0) {
         Cart.AddTax(shippingVat, shippingPrice.Price);
     }
 }
开发者ID:rtpHarry,项目名称:OShop,代码行数:8,代码来源:ShippingVatResolver.cs


示例9: CustomerOrderServiceImpl

		public CustomerOrderServiceImpl(Func<IOrderRepository> orderRepositoryFactory, IOperationNumberGenerator operationNumberGenerator, IEventPublisher<OrderChangeEvent> eventPublisher, IShoppingCartService shoppingCartService, IItemService productService)
		{
			_repositoryFactory = orderRepositoryFactory;
			_shoppingCartService = shoppingCartService;
			_operationNumberGenerator = operationNumberGenerator;
			_eventPublisher = eventPublisher;
			_productService = productService;
		}
开发者ID:alt-soft,项目名称:vc-community,代码行数:8,代码来源:CustomerOrderServiceImpl.cs


示例10: CheckoutController

		public CheckoutController(IShoppingCartService shoppingCartService, ICatalogService catalogService, IFinanceService financeService, IErpService erpService, ApplicationUserManager userManager)
		{
			this.shoppingCartService = shoppingCartService;
			this.catalogService = catalogService;
			this.financeService = financeService;
			this.erpService = erpService;
			this.userManager = userManager;
		}
开发者ID:NikunjTank,项目名称:WebShop,代码行数:8,代码来源:CheckoutController.cs


示例11: HomeController

 public HomeController(
     IShoppingCartService shoppingCartService,
     ICustomerService customerService,
     ICatalogueService catalogueService)
 {
     _shoppingCartService = shoppingCartService;
     _customerService = customerService;
     _catalogueService = catalogueService;
 }
开发者ID:csMacnzBlog,项目名称:BaseClassAntiPattern,代码行数:9,代码来源:HomeController.cs


示例12: CheckoutController

        public CheckoutController(IWorkContext workContext,
            IStoreContext storeContext,
            IStoreMappingService storeMappingService,
            IShoppingCartService shoppingCartService, 
            ILocalizationService localizationService, 
            ITaxService taxService, 
            ICurrencyService currencyService, 
            IPriceFormatter priceFormatter, 
            IOrderProcessingService orderProcessingService,
            ICustomerService customerService, 
            IGenericAttributeService genericAttributeService,
            ICountryService countryService,
            IStateProvinceService stateProvinceService,
            IShippingService shippingService, 
            IPaymentService paymentService,
            IPluginFinder pluginFinder,
            IOrderTotalCalculationService orderTotalCalculationService,
            ILogger logger,
            IOrderService orderService,
            IWebHelper webHelper,
            HttpContextBase httpContext,
            IMobileDeviceHelper mobileDeviceHelper,
            OrderSettings orderSettings, 
            RewardPointsSettings rewardPointsSettings,
            PaymentSettings paymentSettings,
            ShippingSettings shippingSettings,
            AddressSettings addressSettings)
        {
            this._workContext = workContext;
            this._storeContext = storeContext;
            this._storeMappingService = storeMappingService;
            this._shoppingCartService = shoppingCartService;
            this._localizationService = localizationService;
            this._taxService = taxService;
            this._currencyService = currencyService;
            this._priceFormatter = priceFormatter;
            this._orderProcessingService = orderProcessingService;
            this._customerService = customerService;
            this._genericAttributeService = genericAttributeService;
            this._countryService = countryService;
            this._stateProvinceService = stateProvinceService;
            this._shippingService = shippingService;
            this._paymentService = paymentService;
            this._pluginFinder = pluginFinder;
            this._orderTotalCalculationService = orderTotalCalculationService;
            this._logger = logger;
            this._orderService = orderService;
            this._webHelper = webHelper;
            this._httpContext = httpContext;
            this._mobileDeviceHelper = mobileDeviceHelper;

            this._orderSettings = orderSettings;
            this._rewardPointsSettings = rewardPointsSettings;
            this._paymentSettings = paymentSettings;
            this._shippingSettings = shippingSettings;
            this._addressSettings = addressSettings;
        }
开发者ID:haithemChkel,项目名称:nopCommerce_33,代码行数:57,代码来源:CheckoutController.cs


示例13: ShoppingCartController

 public ShoppingCartController(IProductService productService, IPictureService pictureService,
     IShoppingCartService shoppingCartService, SystemSetting sysSetting, IUserContext userContext)
 {
     _productService = productService;
     _shoppingCartService = shoppingCartService;
     _userContext = userContext;
     _pictureService = pictureService;
     _sysSetting = sysSetting;
 }
开发者ID:yubowave,项目名称:bongstore,代码行数:9,代码来源:ShoppingCartController.cs


示例14: BuildCart

 public void BuildCart(IShoppingCartService ShoppingCartService, ShoppingCart Cart)
 {
     foreach (var entry in Cart.Items) {
         var vat = entry.Item.GetVatRate();
         if (vat != null && entry.SubTotal() != 0) {
             Cart.AddTax(vat, entry.SubTotal());
         }
     }
 }
开发者ID:rtpHarry,项目名称:OShop,代码行数:9,代码来源:ItemsVatResolver.cs


示例15: OrderController

 public OrderController(IShoppingCartService shoppingCartService,
                         ITicketsService ticketsService,
                         IDelliveryAddressesService delliveryAddressesService,
                         IOrdersService ordersService)
 {
     this.shoppingCartService = shoppingCartService;
     this.ticketsService = ticketsService;
     this.delliveryAddressesService = delliveryAddressesService;
     this.ordersService = ordersService;
 }
开发者ID:TomaNikolov,项目名称:EventSystem,代码行数:10,代码来源:OrderController.cs


示例16: ShoppingCartController

        public ShoppingCartController(IProductService productService, IWorkContext workContext,
            IShoppingCartService shoppingCartService, IPictureService pictureService,
            ILocalizationService localizationService, IProductAttributeFormatter productAttributeFormatter,
            ITaxService taxService, ICurrencyService currencyService, 
            IPriceCalculationService priceCalculationService, IPriceFormatter priceFormatter,
            ICheckoutAttributeParser checkoutAttributeParser, ICheckoutAttributeFormatter checkoutAttributeFormatter, 
            IOrderProcessingService orderProcessingService,
            IDiscountService discountService,ICustomerService customerService, 
            IGiftCardService giftCardService, ICountryService countryService,
            IStateProvinceService stateProvinceService, IShippingService shippingService, 
            IOrderTotalCalculationService orderTotalCalculationService,
            ICheckoutAttributeService checkoutAttributeService, IPaymentService paymentService,
            IWorkflowMessageService workflowMessageService,
            IPermissionService permissionService, 
            IDownloadService downloadService,
            MediaSettings mediaSetting, ShoppingCartSettings shoppingCartSettings,
            CatalogSettings catalogSettings, OrderSettings orderSettings,
            ShippingSettings shippingSettings, TaxSettings taxSettings,
            CaptchaSettings captchaSettings)
        {
            this._productService = productService;
            this._workContext = workContext;
            this._shoppingCartService = shoppingCartService;
            this._pictureService = pictureService;
            this._localizationService = localizationService;
            this._productAttributeFormatter = productAttributeFormatter;
            this._taxService = taxService;
            this._currencyService = currencyService;
            this._priceCalculationService = priceCalculationService;
            this._priceFormatter = priceFormatter;
            this._checkoutAttributeParser = checkoutAttributeParser;
            this._checkoutAttributeFormatter = checkoutAttributeFormatter;
            this._orderProcessingService = orderProcessingService;
            this._discountService = discountService;
            this._customerService = customerService;
            this._giftCardService = giftCardService;
            this._countryService = countryService;
            this._stateProvinceService = stateProvinceService;
            this._shippingService = shippingService;
            this._orderTotalCalculationService = orderTotalCalculationService;
            this._checkoutAttributeService = checkoutAttributeService;
            this._paymentService = paymentService;
            this._workflowMessageService = workflowMessageService;
            this._permissionService = permissionService;
            this._downloadService = downloadService;

            this._mediaSetting = mediaSetting;
            this._shoppingCartSettings = shoppingCartSettings;
            this._catalogSettings = catalogSettings;
            this._orderSettings = orderSettings;
            this._shippingSettings = shippingSettings;
            this._taxSettings = taxSettings;
            this._captchaSettings = captchaSettings;
        }
开发者ID:CCSW,项目名称:desnivell,代码行数:54,代码来源:ShoppingCartController.cs


示例17: BuildCart

        public void BuildCart(IShoppingCartService ShoppingCartService, ShoppingCart Cart)
        {
            var country = Cart.Properties["ShippingCountry"] as LocationsCountryRecord;
            var state = Cart.Properties["ShippingState"] as LocationsStateRecord;

            if (state != null && state.Enabled && state.ShippingZoneRecord != null) {
                Cart.Properties["ShippingZone"] = state.ShippingZoneRecord;
            }
            else if (country != null && country.Enabled && country.ShippingZoneRecord != null) {
                Cart.Properties["ShippingZone"] = country.ShippingZoneRecord;
            }
        }
开发者ID:rtpHarry,项目名称:OShop,代码行数:12,代码来源:ShippingZoneResolver.cs


示例18: AccountController

 public AccountController(IShoppingCartService shoppingCartService,
                          IAuthenticationService authenticationService,
                          IPersonalizationService personalizationService,
                          IUserRepository userRepository,
                          IAuthorizationService authorizationService)
 {
     _shoppingCartService = shoppingCartService;
     _authenticationService = authenticationService;
     _personalizationService = personalizationService;
     _userRepository = userRepository;
     _authorizationService = authorizationService;
 }
开发者ID:Ordojan,项目名称:Online-movie-store,代码行数:12,代码来源:AccountController.cs


示例19: BuildOrder

 public void BuildOrder(IShoppingCartService ShoppingCartService, IContent Order)
 {
     // Attach VAT infos to OrderDetails
     var orderPart = Order.As<OrderPart>();
     if (orderPart != null) {
         var vatParts = _contentManager.GetMany<VatPart>(orderPart.Details.Select(d => d.ContentId), VersionOptions.Published, QueryHints.Empty);
         foreach(var vatDetailPair in orderPart.Details.Join(vatParts, od => od.ContentId, vat => vat.Id, (od, vat) => new { Detail = od, Vat = vat})) {
             if (vatDetailPair.Vat.VatRate != null) {
                 vatDetailPair.Detail.SetProperty("VAT", new Tax(vatDetailPair.Vat.VatRate));
             }
         }
     }
 }
开发者ID:rtpHarry,项目名称:OShop,代码行数:13,代码来源:OrderVatResolver.cs


示例20: ShoppingCartController

 public ShoppingCartController(
     IShoppingCartService shoppingCartService,
     IEnumerable<ICheckoutProvider> checkoutProviders,
     IShapeFactory shapeFactory,
     ILocationsService locationService = null,
     IShippingService shippingService = null)
 {
     _shoppingCartService = shoppingCartService;
     _checkoutProviders = checkoutProviders;
     _shapeFactory = shapeFactory;
     _locationService = locationService;
     _shippingService = shippingService;
 }
开发者ID:rtpHarry,项目名称:OShop,代码行数:13,代码来源:ShoppingCartController.cs



注:本文中的IShoppingCartService类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# ISignals类代码示例发布时间:2022-05-24
下一篇:
C# IShippingService类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap