public ECUtilitiesController(ISiteService siteService, IShoppingService shoppingService, ISKUInfoProvider sKUInfoProvider) { this.siteService = siteService; this.shoppingService = shoppingService; this.sKUInfoProvider = sKUInfoProvider; }
public ProductController(IPageDataContextRetriever dataRetriever, ICalculationService calculationService, VariantRepository variantRepository, TypedProductViewModelFactory typedProductViewModelFactory, IShoppingService shoppingService, ISKUInfoProvider skuInfoProvider) { this.dataRetriever = dataRetriever; this.calculationService = calculationService; this.variantRepository = variantRepository; this.typedProductViewModelFactory = typedProductViewModelFactory; this.shoppingService = shoppingService; this.skuInfoProvider = skuInfoProvider; }
//DocSection:Constructor /// <summary> /// Constructor for the ProductController class. /// </summary> public ProductController(IShoppingService shoppingService, ICatalogPriceCalculatorFactory priceCalculatorFactory, IPageDataContextRetriever pageRetriever, ISiteService siteService, ISKUInfoProvider skuInfoProvider) { // Initializes instances of services required to manage product price calculation and the shopping cart this.shoppingService = shoppingService; this.priceCalculatorFactory = priceCalculatorFactory; this.pageRetriever = pageRetriever; this.siteService = siteService; this.skuInfoProvider = skuInfoProvider; }
public CheckoutController(IShoppingService shoppingService, IContactRepository contactRepository, IProductRepository productRepository, ICheckoutService checkoutService, IPageUrlRetriever pageUrlRetriever, ISKUInfoProvider skuInfoProvider, ICountryInfoProvider countryInfoProvider, IStateInfoProvider stateInfoProvider) { this.shoppingService = shoppingService; this.contactRepository = contactRepository; this.checkoutService = checkoutService; this.productRepository = productRepository; this.pageUrlRetriever = pageUrlRetriever; this.skuInfoProvider = skuInfoProvider; this.countryInfoProvider = countryInfoProvider; this.stateInfoProvider = stateInfoProvider; }
private IEnumerable <SKUInfo> GetOptions(int skuID, int categoryID, ISKUInfoProvider skuInfoProvider) { // Get all variant's options var variantOptionIDs = VariantOptionInfo.Provider.Get() .WhereIn("VariantSKUID", VariantHelper.GetVariants(skuID).Column("SKUID")) .Column("OptionSKUID"); var variantOptionsList = skuInfoProvider.Get() .WhereIn("SKUID", variantOptionIDs) .OrderBy("SKUOrder") .ToList(); // Create option categories with selectable variant options return(variantOptionsList.Where(o => o.SKUOptionCategoryID == categoryID)); }
//DocSection:Constructor /// <summary> /// Initializes a instances of services required to manage the checkout process. /// </summary> public CheckoutController(IShoppingService shoppingService, IPaymentOptionInfoProvider paymentOption, IShippingOptionInfoProvider shippingOption, ISKUInfoProvider skuInfo, IAddressInfoProvider addressInfo, ICountryInfoProvider countryInfo, IStateInfoProvider stateInfo, IPageRetriever pageRetriever, IPageUrlRetriever pageUrlRetriever) { this.shoppingService = shoppingService; this.pageRetriever = pageRetriever; this.pageUrlRetriever = pageUrlRetriever; this.skuInfo = skuInfo; this.paymentOption = paymentOption; this.shippingOption = shippingOption; this.addressInfo = addressInfo; this.countryInfo = countryInfo; this.stateInfo = stateInfo; }
/// <summary> /// Initializes a new instance of the <see cref="VariantRepository"/> class. /// </summary> /// <param name="skuInfoProvider">Provider for <see cref="SKUInfo"/> management.</param> /// <param name="repositoryCacheHelper">Handles caching of retrieved objects.</param> public VariantRepository(ISKUInfoProvider skuInfoProvider, RepositoryCacheHelper repositoryCacheHelper) { this.skuInfoProvider = skuInfoProvider; this.repositoryCacheHelper = repositoryCacheHelper; }
public ProductOptionCategoryViewModel(int skuID, int selectedOptionID, OptionCategoryInfo category, ISKUInfoProvider skuInfoProvider) { SelectedOptionId = selectedOptionID; Category = category; Options = GetOptions(skuID, category.CategoryID, skuInfoProvider); }
/// <summary> /// Initializes a new instance of the <see cref="KenticoVariantRepository"/> class. /// </summary> /// <param name="skuInfoProvider">Provider for <see cref="SKUInfo"/> management.</param> public KenticoVariantRepository(ISKUInfoProvider skuInfoProvider) { this.skuInfoProvider = skuInfoProvider; }
/// <summary> /// Initializes a new instance of the <see cref="KenticoProductRepository"/> class that returns products. /// </summary> /// <param name="pageRetriever">Retriever for pages based on given parameters.</param> /// <param name="skuInfoProvider">Provider for <see cref="SKUInfo"/> management.</param> public KenticoProductRepository(IPageRetriever pageRetriever, ISKUInfoProvider skuInfoProvider) { this.pageRetriever = pageRetriever; this.skuInfoProvider = skuInfoProvider; }
/// <summary> /// Initializes a new instance of the <see cref="ProductRepository"/> class that returns products. /// </summary> /// <param name="pageRetriever">Retriever for pages based on given parameters.</param> /// <param name="skuInfoProvider">Provider for <see cref="SKUInfo"/> management.</param> /// <param name="repositoryCacheHelper">Handles caching of retrieved objects.</param> public ProductRepository(IPageRetriever pageRetriever, ISKUInfoProvider skuInfoProvider, RepositoryCacheHelper repositoryCacheHelper) { this.pageRetriever = pageRetriever; this.skuInfoProvider = skuInfoProvider; this.repositoryCacheHelper = repositoryCacheHelper; }