Click or drag to resize
DiscountInfoProviderGetDiscounts Method (Int32, Boolean)

Note: This API is now obsolete.

Returns dataset of all discounts for specified site.

Namespace: CMS.Ecommerce
Assembly: CMS.Ecommerce (in CMS.Ecommerce.dll) Version: 13.0.131
Syntax
C#
[ObsoleteAttribute("Use DiscountInfoProviderExtensions.GetBySite(IDiscountInfoProvider, int, bool) instead. To get an instance of the interface's implementation, use dependency injection or access the instance directly - DiscountInfo.Provider.")]
public static ObjectQuery<DiscountInfo> GetDiscounts(
	int siteId,
	bool onlyEnabled = false
)

Parameters

siteId
Type: SystemInt32
Site ID
onlyEnabled (Optional)
Type: SystemBoolean
True - only enable discounts are returned. False - both enabled and disabled discounts are returned.

Return Value

Type: ObjectQueryDiscountInfo
See Also