Click or drag to resize
ECommerceHelper Class
Custom E-commerce helper.
Inheritance Hierarchy
SystemObject
  CMS.EcommerceECommerceHelper

Namespace: CMS.Ecommerce
Assembly: CMS.Ecommerce (in CMS.Ecommerce.dll) Version: 9.0.0
Syntax
C#
public static class ECommerceHelper

The ECommerceHelper type exposes the following members.

Fields
  NameDescription
Public fieldStatic memberECOMMERCE_RESOURCE_NAME
Resource name for Ecommerce.
Top
Methods
  NameDescription
Public methodStatic memberApplyDiscounts
Applies given discounts to specified price. Reflects discounts ordering. Discount value is calculated using discountCalculator function.
Public methodStatic memberDeleteOrDisable
Checks dependencies of given object and deletes it when nothing depends. Disables object otherwise. Needs EnabledColumn to be filled in TypeInfo of given object.
Public methodStatic memberGetAllCouponCodesQuery
Returns data query with codes in CouponCodeCode column from MultiBuyCouponCodes and CouponCodes on specified site.
Public methodStatic memberGetDependencyMessage
Gets the message containing list of dependencies for specified ecommerce info object.
Public methodStatic memberGetDiscountsTypeEnum
Converts discount type string value to DiscountTypeEnum. Default value is DiscountTypeEnum.CustomDiscount.
Public methodStatic memberGetDiscountTypeString
Converts DiscountTypeEnum to discount type string value.
Public methodStatic memberGetDiscountValue(Double, IItemDiscount, FuncDouble, Double)
Returns discount calculated from given price. Exchange rate applicator function will be applied if discount is global and flat.
Public methodStatic memberGetDiscountValue(Double, Double, Boolean)
Returns discount calculated from the specified price.
Public methodStatic memberGetSiteID
Returns 0 if specified site uses global objects based on the specified e-commerce setting, otherwise returns site ID of the specified site.
Public methodStatic memberGetTableColumnSum
Returns sum of all values from the specified table column.
Public methodStatic memberCheckMainCurrency
Checks if the site specified by the site ID has a main currency defined. Returns null if the main currency is defined, otherwise returns a warning message.
Public methodStatic memberIsUserAuthorizedForDepartment
Checks whether the user is authorized to access products from the specified department. Returns true if user is global admin or is granted with 'AccessAllDepartments' e-commerce module permission or he is administrator of the given department.
Public methodStatic memberIsUserAuthorizedForPermission(String, String, IUserInfo)
Checks the specified ecommerce permission for the given user.
Public methodStatic memberIsUserAuthorizedForPermission(String, String, IUserInfo, Boolean)
Checks the specified ecommerce permission for the given user.
Public methodStatic memberIsUserAuthorizedToModifyConfiguration(Boolean, String, IUserInfo)
Checks whether the user is authorized to modify site/global e-commerce configuration.
Public methodStatic memberIsUserAuthorizedToModifyConfiguration(Boolean, String, IUserInfo, Boolean)
Checks whether the user is authorized to modify site/global e-commerce configuration.
Public methodStatic memberSignChanged
Returns true if signs of two doubles are different.
Public methodStatic memberTrackAddToShoppingCartConversion(ShoppingCartItemInfo)
Tracks add to shopping cart conversion.
Public methodStatic memberTrackAddToShoppingCartConversion(ShoppingCartItemInfo, String)
Tracks add to shopping cart conversion.
Public methodStatic memberTrackOrderConversion(ShoppingCartInfo)
Tracks order conversion.
Public methodStatic memberTrackOrderConversion(ShoppingCartInfo, String)
Tracks order conversion.
Public methodStatic memberTrackOrderItemsConversions
Tracks conversions of all order items
Public methodStatic memberTrackRegistrationConversion(String)
Tracks registration conversion.
Public methodStatic memberTrackRegistrationConversion(String, String)
Tracks registration conversion.
Top
See Also