CustomDiscountCouponInfoProvider

Top  Previous  Next

This class works with discount coupon information. It uses the CMS.Ecommerce.DiscountCouponInfo class.

 

•object GetDiscountCouponInfo(int discountCouponId) – returns DiscountCouponInfo object selected by given discount coupon ID.
•object GetDiscountCouponInfo(string discountCouponCode) – returns the DiscountCouponInfo object selected by given coupon code.
•void SetDiscountCouponInfo(object discountCoupon) – updates the discount coupon record with the data from given DiscountCouponInfo object. If DiscoutCouponID is set, it updates the record, else it inserts a new record and initializes its ID.
•void DeleteDiscountCouponInfo(int discountCouponId) – deletes specified coupon record by given ID.
•bool CheckDependencies(int discountCouponId) – returns true if there are some objects dependent on the given coupon.
•DataSet GetCouponProducts(int couponId) – returns the DataSet products assigned to the discount coupon. There is an N:N relationship between products (SKUs) and coupons.
•DataSet GetCouponProducts(int couponId, string where, string orderBy) – returns the DataSet of coupon products selected with given condition and order.
•void AddSKUToDiscountCoupon(int skuId, int discountId) – adds the relationship between product and coupon.
•void RemoveSKUToDiscountCoupon(int skuId, int discountId) - removes the relationship between product and coupon.
•bool IsSKUAssignedToDiscountCoupon(int skuId, int discountId) – returns true if product is assigned to the discount coupon.
•bool IsSKURelatedToDiscountCoupon(int skuId, int discountId) - returns true if there is a relation between specified discount coupon and SKU.
•DataSet GetDiscountCoupons() – returns the DataSet of all discount coupons. See database reference for required fields.
•DataSet GetDiscountCoupons(string where, string orderBy) – returns the coupons with specified condition and order applied.