本文整理汇总了C#中IShoppingCartService类的典型用法代码示例。如果您正苦于以下问题:C# IShoppingCartService类的具体用法?C# IShoppingCartService怎么用?C# IShoppingCartService使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IShoppingCartService类属于命名空间,在下文中一共展示了IShoppingCartService类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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;
}
示例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;
}
示例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;
}
示例4: ShoppingCartController
public ShoppingCartController(IOrchardServices orchardServices, ICatalogService catalogService, IShoppingCartService shoppingCartService)
: base(orchardServices)
{
_orchardServices = orchardServices;
_catalogService = catalogService;
_shoppingCartService = shoppingCartService;
}
示例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;
}
示例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;
}
示例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);
}
}
}
}
示例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);
}
}
示例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;
}
示例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;
}
示例11: HomeController
public HomeController(
IShoppingCartService shoppingCartService,
ICustomerService customerService,
ICatalogueService catalogueService)
{
_shoppingCartService = shoppingCartService;
_customerService = customerService;
_catalogueService = catalogueService;
}
示例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;
}
示例13: ShoppingCartController
public ShoppingCartController(IProductService productService, IPictureService pictureService,
IShoppingCartService shoppingCartService, SystemSetting sysSetting, IUserContext userContext)
{
_productService = productService;
_shoppingCartService = shoppingCartService;
_userContext = userContext;
_pictureService = pictureService;
_sysSetting = sysSetting;
}
示例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());
}
}
}
示例15: OrderController
public OrderController(IShoppingCartService shoppingCartService,
ITicketsService ticketsService,
IDelliveryAddressesService delliveryAddressesService,
IOrdersService ordersService)
{
this.shoppingCartService = shoppingCartService;
this.ticketsService = ticketsService;
this.delliveryAddressesService = delliveryAddressesService;
this.ordersService = ordersService;
}