internal static List <PaymentProvider> GetBillingProvidersForOrder(OrderInfo orderInfo, bool useZone = true, string storeAlias = null, string currencyCode = null) { return(GetBillingProvidersForOrder(orderInfo, useZone, StoreHelper.GetLocalizationOrCurrent(storeAlias, currencyCode))); }
/// <summary> /// Returns the paymentmethods available for the current order /// If the customer has not chosen a country yet, it will use the countrycode from the shop itself to return the /// providers. /// </summary> /// <param name="orderInfo">The order information.</param> /// <param name="useCountry">if set to <c>true</c> [use country].</param> /// <param name="store">The store.</param> /// <returns></returns> public static List <PaymentProvider> GetPaymentProvidersForOrder(OrderInfo orderInfo, bool useCountry = true, Store store = null) { var storeAlias = store == null ? null : store.Alias; return(GetBillingProvidersForOrder(orderInfo, useCountry, StoreHelper.GetLocalizationOrCurrent(storeAlias, null))); }
/// <summary> /// Gets all payment providers. /// </summary> /// <returns></returns> public static IEnumerable <PaymentProvider> GetAllPaymentProviders(string storeAlias = null, string currencyCode = null) { return(IO.Container.Resolve <IPaymentProviderService>().GetAll(StoreHelper.GetLocalizationOrCurrent(storeAlias, currencyCode)).Where(x => !x.Disabled)); }
/// <summary> /// Returns a single product discount of a product /// </summary> /// <param name="itemId">The item unique identifier.</param> /// <param name="storeAlias">The store alias.</param> /// <param name="currencyCode">The currency code.</param> /// <returns> /// Sale /// </returns> public static DiscountProduct GetProductDiscount(int itemId, string storeAlias = null, string currencyCode = null) { return(IO.Container.Resolve <IProductDiscountService>().GetDiscountByProductId(itemId, StoreHelper.GetLocalizationOrCurrent(storeAlias, currencyCode))); }
/// <summary> /// Returns a list of all product variants /// </summary> /// <param name="includeDisabled">if set to <c>true</c> [include disabled].</param> /// <param name="storeAlias">The store alias.</param> /// <param name="currencyCode">The currency code.</param> /// <returns> /// List of product variants /// </returns> public static IEnumerable <ProductVariant> GetAllProductVariants(bool includeDisabled = false, string storeAlias = null, string currencyCode = null) { return(IO.Container.Resolve <IProductVariantService>().GetAll(StoreHelper.GetLocalizationOrCurrent(storeAlias, currencyCode), includeDisabled)); }
/// <summary> /// Gets the product variant by unique identifier. /// </summary> /// <param name="productVariantId">The product variant unique identifier.</param> /// <param name="storeAlias">The store alias.</param> /// <param name="currencyCode">The currency code.</param> /// <returns></returns> public static ProductVariant GetProductVariantById(int productVariantId, string storeAlias = null, string currencyCode = null) { return(IO.Container.Resolve <IProductVariantService>().GetById(productVariantId, StoreHelper.GetLocalizationOrCurrent(storeAlias, currencyCode))); }
/// <summary> /// Get object by nodeTypeAlias /// </summary> /// <typeparam name="T"></typeparam> /// <param name="nodeTypeAlias">The node type alias.</param> /// <param name="storeAlias">The store alias.</param> /// <param name="startNodeId">The start node unique identifier.</param> /// <param name="currencyCode">The currency code.</param> /// <returns></returns> public static IEnumerable <T> GetObjectsByAlias <T>(string nodeTypeAlias, string storeAlias = null, int startNodeId = 0, string currencyCode = null) { return(IO.Container.Resolve <ICMSEntityRepository>().GetObjectsByAlias <T>(nodeTypeAlias, StoreHelper.GetLocalizationOrCurrent(storeAlias, currencyCode), startNodeId)); }
/// <summary> /// Get a category by it's NodeId /// </summary> /// <param name="categoryId">NodeId of the category</param> /// <param name="storeAlias">The store alias.</param> /// <param name="currencyCode">The currency code.</param> /// <returns> /// Category Object /// </returns> public static Category GetCategoryById(int categoryId, string storeAlias, string currencyCode = null) { return(IO.Container.Resolve <ICategoryService>().GetById(categoryId, StoreHelper.GetLocalizationOrCurrent(storeAlias, currencyCode))); }